Topic 8 – Processors and hardware Flashcards
regarding the items below how does each handle
porting to different computer hardware
- linux
- windows
this is handled:
- linux - follows a style as UNIX did and makes it easy to port to different architectures
- windows - is more limited and for most of its life has only ran on Intel chips or intel compatible chips
what is the
SYSCALL machine instruction
used for
this works in a similar manner to the CALL instruction however this will swith the processor mode to kernel mode.
this is typically used by any application that is running in user mode and would like to use hardware
example
an application wants to save a value to memory so uses the os API that handles that the API makes one of these to the appropriate OS module. the task is then carried out by the OS
this is achieved by the OS
it will save and restore the states of all of these upon each context switch
the values held in the registers is unique to every process
so how is multitasking achieved
the process for this is as follows:
- the main code makes a CALL to the subroutine A (CALL A)
- the address held in the instruction pointer register is transferred to the stack pointer register
- the address of subroutine A is put inside the instruction pointer register
- execution of subroutine A begins
- when subroutine A has finished execution it will use the RETURN machine instruction
- the address held in the stack pointer register is returned back to the instruction pointer register
- execution of the main code is resumed

describe the process of a programs main execution code using a CALL to the subroutine A and the subroutine using a RETURN to give control back to the main code
what is a
subroutine
this is simply a saved set of instructions in memory that can be called upon by any part of the program
what is an
interrupt service routine (ISR)
this is specific code that is held in the operating system and is called after a processor recives an interrupt request (IRQ) from hardware
one basic task this may carry out is collecting data from a keyboard or mouse
what are
functional components
this is any hardware on the system that the operating system must be aware of such as:
- processor
- ram
- display
- leds
- hard drive
in practice an operating system will only deal with major components such as a processor and the control and management of less major components is delegated to device drivers
this is a set of instructions held in a processor that can be used by applications and the operating system to perform actions such as
- arithmetic
- jumping to a memory address
- fetching and storing data
what is an
instruction set
what is
porting
this is the process of moving an application from one platform to another
one of the jobs of an operating sytem is to provide
hardware independence
how does it achieve this upon install of itself
when an operating system is installing itself it achieves this by detecting the hardware being used and selecting the correct components of itslef that will work with that hardware
This is a 64-bit instruction set, first defined by AMD and subsequently adopted by Intel. (Confusingly, Intel also define an IA-64 instruction set that is quite different but not widely used.)
(open university, 2020)
describe the instruction set
AMD64 (also referred to as x86-64 or Intel 64
what is a
subroutine variably known as
this may also be called a
- function
- procedure
- method
- routine
for each of the items below give its purpose:
- instruction pointer register
- general purpose registers
- stack pointer register
what registers are involved for each of the items below:
- Knowing where we are in execution
- Knowing what values are currently being evaluated or calculated
- What subroutines have been called
can subroutines call other subroutines
YES
this follow the same principle as if the main code was calling this. making use of:
- CALL instruction
- instruction pointer register
- stack pointer register
- RETURN instruction

this is used to hold the address held in the Instruction Pointer (IP) when a change in execution happens such as a CALL, SYSCALL or interrupt
the values are held in a stack following a last in first out model
the RETURN machine instruction is used to retrieve and restore the address from this back to the instruction pointer
what is the
Stack Pointer (SP)
used for
what is the
Stack Pointer (SP)
used for
this is used to hold the address held in the Instruction Pointer (IP) when a change in execution happens such as a CALL, SYSCALL or interrupt
the values are held in a stack following a last in first out model
the RETURN machine instruction is used to retrieve and restore the address from this back to the instruction pointer
this is a combinaion of
- the instruction set
- functional devices
what is
computer architecture
this is specific code that is held in the operating system and is called after a processor recives an interrupt request (IRQ) from hardware
one basic task this may carry out is collecting data from a keyboard or mouse
what is an
interrupt service routine (ISR)
what is the
CALL machine instruction
this is used by a programs main execution code and also subroutines of the program so that it can pause its own execution and make use of a subroutine
using the items below create two platforms
- linux operating sytem
- windows operating system
- AMD processor
- Intel processor
two platforms could be
platform 1
- linux opearting system
- AMD processor
platform 2
- windows operating system
- Intel processor
this is any hardware on the system that the operating system must be aware of such as:
- processor
- ram
- display
- leds
- hard drive
in practice an operating system will only deal with major components such as a processor and the control and management of less major components is delegated to device drivers
what are
functional components
the values held in the registers is unique to every process
so how is multitasking achieved
this is achieved by the OS
it will save and restore the states of all of these upon each context switch
these could be:
- x86 (also referred to as i386 or IA-32)
- AMD64 (also referred to as x86-64 or Intel 64
- ARM
name 3 different
instruction sets
what is a
central processing unit (CPU)
able to do and what
components will it contain
this is able to perform:
- any instructions it has hard coded
- arithemtic
- boolean comparisons
it will typically contain its own L1 and L2 cache and will share any higher levels of cache
why might a chip manufacturer include a compatibilty mode in there new processor
a chip manufacturer may decide to include this when they make radical changes such as going from 32 bit to 64 bit
the reason being that there would otherwise be no software that could amke use of the new processor and this is bad for any software developers as well as the chip manufacturer itself
what is a
benefit of subroutines
the benefit of these is that it is an efficient way of creating code when we know in advance it will be used repeatedly in various parts of a program
example
there could be a one of these to change a string from upppercase to lower case
describe the instruction set
AMD64 (also referred to as x86-64 or Intel 64
This is a 64-bit instruction set, first defined by AMD and subsequently adopted by Intel. (Confusingly, Intel also define an IA-64 instruction set that is quite different but not widely used.)
(open university, 2020)
two platforms could be
platform 1
- linux opearting system
- AMD processor
platform 2
- windows operating system
- Intel processor
using the items below create two platforms
- linux operating sytem
- windows operating system
- AMD processor
- Intel processor
this is a combination of an operating system and the hardware
what is a
platform
name 3 different
instruction sets
these could be:
- x86 (also referred to as i386 or IA-32)
- AMD64 (also referred to as x86-64 or Intel 64
- ARM
UNIX was the first operating system that could achieve this
it was made possible because it was mainly written in a higher level language C and on out of neccessitty was parts written in machine code
what was the first operating system that could
be ported to a different computer architecture
this is a signal instead of code that is sent from hardware to the processor letting it know that an action has occured such as new data has arrived and it needs urgent attention
these work in a similar fashion to SYSCALLS in the sense that the processor mode is switched to kernel mode
what is an
interrupt
this is simply a saved set of instructions in memory that can be called upon by any part of the program
what is a
subroutine
describe the process of a programs main execution code using a CALL to the subroutine A and the subroutine using a RETURN to give control back to the main code
the process for this is as follows:
- the main code makes a CALL to the subroutine A (CALL A)
- the address held in the instruction pointer register is transferred to the stack pointer register
- the address of subroutine A is put inside the instruction pointer register
- execution of subroutine A begins
- when subroutine A has finished execution it will use the RETURN machine instruction
- the address held in the stack pointer register is returned back to the instruction pointer register
- execution of the main code is resumed

describe the steps of a processor receiving a
interrupt request (IRQ)
the steps following this are:
- the processor pauses its current execution
- the address inside the instruction pointer register is placed on the top of the stack inside the stack pointer register
- the processor mode is switched to kernel mode
- Place the address of the appropriate interrupt service routine (ISR) that is stored in the os into the instruction pointer register
- execution of the interrupt service routine (ISR) commences

when this instruction is used
the top address held in the stack pointer is ‘popped off the stack’ and is transferred to the instruction pointer register
what actions take place when the
RETURN machine instruction
is used
what is a
platform
this is a combination of an operating system and the hardware
this is able to perform:
- any instructions it has hard coded
- arithemtic
- boolean comparisons
it will typically contain its own L1 and L2 cache and will share any higher levels of cache
what is a
central processing unit (CPU)
able to do and what
components will it contain
this will typically contain:
- multiple central processing units (CPU)
- cache
- memory mangement unit (MMU)
name 3 componets you will typically find with a
processor
in regards to this:
- an application must have a different version created so that it can be ported to different operating systems
- an operating system must have different versions created so that it can be ported to different hardware, importantly a different processor
for each of the items below what should be taken into account in regards to platform porting
- application
- operating system
this is the process of moving an application from one platform to another
what is
porting
what was the first operating system that could
be ported to a different computer architecture
UNIX was the first operating system that could achieve this
it was made possible because it was mainly written in a higher level language C and on out of neccessitty was parts written in machine code
this is handled:
- linux - follows a style as UNIX did and makes it easy to port to different architectures
- windows - is more limited and for most of its life has only ran on Intel chips or intel compatible chips
regarding the items below how does each handle
porting to different computer hardware
- linux
- windows
YES
this follow the same principle as if the main code was calling this. making use of:
- CALL instruction
- instruction pointer register
- stack pointer register
- RETURN instruction

can subroutines call other subroutines
for each of the items below what should be taken into account in regards to platform porting
- application
- operating system
in regards to this:
- an application must have a different version created so that it can be ported to different operating systems
- an operating system must have different versions created so that it can be ported to different hardware, importantly a different processor
the benefit of these is that it is an efficient way of creating code when we know in advance it will be used repeatedly in various parts of a program
example
there could be a one of these to change a string from upppercase to lower case
what is a
benefit of subroutines
describe the instruction set
ARM
ARM licences a range of processor designs to chip manufacturers. ARM designs have several instruction sets, including 32-bit and 64-bit versions intended for personal computers.
(open university, 2020)
what is the
Instruction Pointer (IP)/program counter
used for
this holds the address of the next instruction to be fetched and executed. This address is usually incremented however can be changed by an instruction in the case of selection/branching/loops
what actions take place when the
RETURN machine instruction
is used
when this instruction is used
the top address held in the stack pointer is ‘popped off the stack’ and is transferred to the instruction pointer register
most registers are general purpose however there are dedicated registers
name 2
dedicated registers
these include:
- Instruction Pointer (IP)/program counter
- Stack Pointer (SP)
describe the instruction set
x86 (also referred to as i386 or IA-32
This is the instruction set of a family of 32-bit processors starting with the Intel 80386, now with many extensions, and made by Intel and other manufacturers including AMD.
(open university, 2020)
what registers are involved for each of the items below:
- Knowing where we are in execution
- Knowing what values are currently being evaluated or calculated
- What subroutines have been called
for each of the items below give its purpose:
- instruction pointer register
- general purpose registers
- stack pointer register
this may also be called a
- function
- procedure
- method
- routine
what is a
subroutine variably known as
a chip manufacturer may decide to include this when they make radical changes such as going from 32 bit to 64 bit
the reason being that there would otherwise be no software that could amke use of the new processor and this is bad for any software developers as well as the chip manufacturer itself
why might a chip manufacturer include a compatibilty mode in there new processor
what is an
interrupt
this is a signal instead of code that is sent from hardware to the processor letting it know that an action has occured such as new data has arrived and it needs urgent attention
these work in a similar fashion to SYSCALLS in the sense that the processor mode is switched to kernel mode
what is a
register
this is used by a Central Processing Unit (CPU) to store values. it is the fastest type of memory that is available to a CPU
example
typically actions such as addition can be carried out using these in one clock cycle
what is an
instruction set
this is a set of instructions held in a processor that can be used by applications and the operating system to perform actions such as
- arithmetic
- jumping to a memory address
- fetching and storing data
these include:
- Instruction Pointer (IP)/program counter
- Stack Pointer (SP)
most registers are general purpose however there are dedicated registers
name 2
dedicated registers
this works in a similar manner to the CALL instruction however this will swith the processor mode to kernel mode.
this is typically used by any application that is running in user mode and would like to use hardware
example
an application wants to save a value to memory so uses the os API that handles that the API makes one of these to the appropriate OS module. the task is then carried out by the OS
what is the
SYSCALL machine instruction
used for
this holds the address of the next instruction to be fetched and executed. This address is usually incremented however can be changed by an instruction in the case of selection/branching/loops
what is the
Instruction Pointer (IP)/program counter
used for
when an operating system is installing itself it achieves this by detecting the hardware being used and selecting the correct components of itslef that will work with that hardware
one of the jobs of an operating sytem is to provide
hardware independence
how does it achieve this upon install of itself
this is used by a Central Processing Unit (CPU) to store values. it is the fastest type of memory that is available to a CPU
example
typically actions such as addition can be carried out using these in one clock cycle
what is a
register
This is the instruction set of a family of 32-bit processors starting with the Intel 80386, now with many extensions, and made by Intel and other manufacturers including AMD.
(open university, 2020)
describe the instruction set
x86 (also referred to as i386 or IA-32
this is used by a programs main execution code and also subroutines of the program so that it can pause its own execution and make use of a subroutine
what is the
CALL machine instruction
the steps following this are:
- the processor pauses its current execution
- the address inside the instruction pointer register is placed on the top of the stack inside the stack pointer register
- the processor mode is switched to kernel mode
- Place the address of the appropriate interrupt service routine (ISR) that is stored in the os into the instruction pointer register
- execution of the interrupt service routine (ISR) commences

describe the steps of a processor receiving a
interrupt request (IRQ)
what is
computer architecture
this is a combinaion of
- the instruction set
- functional devices
ARM licences a range of processor designs to chip manufacturers. ARM designs have several instruction sets, including 32-bit and 64-bit versions intended for personal computers.
(open university, 2020)
describe the instruction set
ARM
name 3 componets you will typically find with a
processor
this will typically contain:
- multiple central processing units (CPU)
- cache
- memory mangement unit (MMU)