Topic 8 – Processors and hardware Flashcards

1
Q

regarding the items below how does each handle

porting to different computer hardware

  • linux
  • windows
A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is the

SYSCALL machine instruction

used for

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

this is achieved by the OS

it will save and restore the states of all of these upon each context switch

A

the values held in the registers is unique to every process

so how is multitasking achieved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

the process for this is as follows:

  1. the main code makes a CALL to the subroutine A (CALL A)
  2. the address held in the instruction pointer register is transferred to the stack pointer register
  3. the address of subroutine A is put inside the instruction pointer register
  4. execution of subroutine A begins
  5. when subroutine A has finished execution it will use the RETURN machine instruction
  6. the address held in the stack pointer register is returned back to the instruction pointer register
  7. execution of the main code is resumed
A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is a

subroutine

A

this is simply a saved set of instructions in memory that can be called upon by any part of the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is an

interrupt service routine (ISR)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what are

functional components

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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
A

what is an

instruction set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is

porting

A

this is the process of moving an application from one platform to another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

one of the jobs of an operating sytem is to provide

hardware independence

how does it achieve this upon install of itself

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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)

A

describe the instruction set

AMD64 (also referred to as x86-64 or Intel 64

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is a

subroutine variably known as

A

this may also be called a

  • function
  • procedure
  • method
  • routine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

for each of the items below give its purpose:

  • instruction pointer register
  • general purpose registers
  • stack pointer register
A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

can subroutines call other subroutines

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

what is the

Stack Pointer (SP)

used for

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is the

Stack Pointer (SP)

used for

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

this is a combinaion of

  • the instruction set
  • functional devices
A

what is

computer architecture

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

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

A

what is an

interrupt service routine (ISR)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what is the

CALL machine instruction

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

using the items below create two platforms

  • linux operating sytem
  • windows operating system
  • AMD processor
  • Intel processor
A

two platforms could be

platform 1

  • linux opearting system
  • AMD processor

platform 2

  • windows operating system
  • Intel processor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

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

A

what are

functional components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

the values held in the registers is unique to every process

so how is multitasking achieved

A

this is achieved by the OS

it will save and restore the states of all of these upon each context switch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

these could be:

  • x86 (also referred to as i386 or IA-32)
  • AMD64 (also referred to as x86-64 or Intel 64
  • ARM
A

name 3 different

instruction sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

what is a

central processing unit (CPU)

able to do and what

components will it contain

A

this is able to perform:

  1. any instructions it has hard coded
  2. arithemtic
  3. boolean comparisons

it will typically contain its own L1 and L2 cache and will share any higher levels of cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

why might a chip manufacturer include a compatibilty mode in there new processor

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

what is a

benefit of subroutines

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

describe the instruction set

AMD64 (also referred to as x86-64 or Intel 64

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

two platforms could be

platform 1

  • linux opearting system
  • AMD processor

platform 2

  • windows operating system
  • Intel processor
A

using the items below create two platforms

  • linux operating sytem
  • windows operating system
  • AMD processor
  • Intel processor
29
Q

this is a combination of an operating system and the hardware

A

what is a

platform

30
Q

name 3 different

instruction sets

A

these could be:

  • x86 (also referred to as i386 or IA-32)
  • AMD64 (also referred to as x86-64 or Intel 64
  • ARM
31
Q

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

A

what was the first operating system that could

be ported to a different computer architecture

32
Q

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

A

what is an

interrupt

33
Q

this is simply a saved set of instructions in memory that can be called upon by any part of the program

A

what is a

subroutine

34
Q

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

A

the process for this is as follows:

  1. the main code makes a CALL to the subroutine A (CALL A)
  2. the address held in the instruction pointer register is transferred to the stack pointer register
  3. the address of subroutine A is put inside the instruction pointer register
  4. execution of subroutine A begins
  5. when subroutine A has finished execution it will use the RETURN machine instruction
  6. the address held in the stack pointer register is returned back to the instruction pointer register
  7. execution of the main code is resumed
35
Q

describe the steps of a processor receiving a

interrupt request (IRQ)

A

the steps following this are:

  1. the processor pauses its current execution
  2. the address inside the instruction pointer register is placed on the top of the stack inside the stack pointer register
  3. the processor mode is switched to kernel mode
  4. Place the address of the appropriate interrupt service routine (ISR) that is stored in the os into the instruction pointer register
  5. execution of the interrupt service routine (ISR) commences
36
Q

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

A

what actions take place when the

RETURN machine instruction

is used

37
Q

what is a

platform

A

this is a combination of an operating system and the hardware

38
Q

this is able to perform:

  1. any instructions it has hard coded
  2. arithemtic
  3. boolean comparisons

it will typically contain its own L1 and L2 cache and will share any higher levels of cache

A

what is a

central processing unit (CPU)

able to do and what

components will it contain

39
Q

this will typically contain:

  • multiple central processing units (CPU)
  • cache
  • memory mangement unit (MMU)
A

name 3 componets you will typically find with a

processor

40
Q

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
A

for each of the items below what should be taken into account in regards to platform porting

  • application
  • operating system
41
Q

this is the process of moving an application from one platform to another

A

what is

porting

42
Q

what was the first operating system that could

be ported to a different computer architecture

A

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

43
Q

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
A

regarding the items below how does each handle

porting to different computer hardware

  • linux
  • windows
44
Q

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
A

can subroutines call other subroutines

45
Q

for each of the items below what should be taken into account in regards to platform porting

  • application
  • operating system
A

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
46
Q

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

A

what is a

benefit of subroutines

47
Q

describe the instruction set

ARM

A

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)

48
Q

what is the

Instruction Pointer (IP)/program counter

used for

A

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

49
Q

what actions take place when the

RETURN machine instruction

is used

A

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

50
Q

most registers are general purpose however there are dedicated registers

name 2

dedicated registers

A

these include:

  • Instruction Pointer (IP)/program counter
  • Stack Pointer (SP)
51
Q

describe the instruction set

x86 (also referred to as i386 or IA-32

A

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)

52
Q

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
A

for each of the items below give its purpose:

  • instruction pointer register
  • general purpose registers
  • stack pointer register
53
Q

this may also be called a

  • function
  • procedure
  • method
  • routine
A

what is a

subroutine variably known as

54
Q

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

A

why might a chip manufacturer include a compatibilty mode in there new processor

55
Q

what is an

interrupt

A

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

56
Q

what is a

register

A

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

57
Q

what is an

instruction set

A

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
58
Q

these include:

  • Instruction Pointer (IP)/program counter
  • Stack Pointer (SP)
A

most registers are general purpose however there are dedicated registers

name 2

dedicated registers

59
Q

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

A

what is the

SYSCALL machine instruction

used for

60
Q

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

A

what is the

Instruction Pointer (IP)/program counter

used for

61
Q

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

A

one of the jobs of an operating sytem is to provide

hardware independence

how does it achieve this upon install of itself

62
Q

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

A

what is a

register

63
Q

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)

A

describe the instruction set

x86 (also referred to as i386 or IA-32

64
Q

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

A

what is the

CALL machine instruction

65
Q

the steps following this are:

  1. the processor pauses its current execution
  2. the address inside the instruction pointer register is placed on the top of the stack inside the stack pointer register
  3. the processor mode is switched to kernel mode
  4. Place the address of the appropriate interrupt service routine (ISR) that is stored in the os into the instruction pointer register
  5. execution of the interrupt service routine (ISR) commences
A

describe the steps of a processor receiving a

interrupt request (IRQ)

66
Q

what is

computer architecture

A

this is a combinaion of

  • the instruction set
  • functional devices
67
Q

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)

A

describe the instruction set

ARM

68
Q

name 3 componets you will typically find with a

processor

A

this will typically contain:

  • multiple central processing units (CPU)
  • cache
  • memory mangement unit (MMU)