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
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
26
what is a ## Footnote **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
27
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)
28
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
29
this is a combination of an operating system and the hardware
what is a ## Footnote **platform**
30
name 3 different ## Footnote **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**
31
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 ## Footnote **be ported to a different computer architecture**
32
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 ## Footnote **interrupt**
33
this is simply a saved set of instructions in memory that can be called upon by any part of the program
what is a ## Footnote **subroutine**
34
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: 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
describe the steps of a processor receiving a ## Footnote **interrupt request (IRQ)**
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
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
37
what is a ## Footnote **platform**
this is a combination of an operating system and the hardware
38
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
what is a **central processing unit (CPU)** able to do and what **components will it contain**
39
this will typically contain: * multiple central processing units (CPU) * cache * memory mangement unit (MMU)
name 3 componets you will typically find with a ## Footnote **processor**
40
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
41
this is the process of moving an application from one platform to another
what is ## Footnote **porting**
42
what was the first operating system that could ## Footnote **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
43
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
44
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
45
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
46
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 ## Footnote **benefit of subroutines**
47
describe the instruction set ## Footnote **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)
48
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
49
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
50
most registers are general purpose however there are dedicated registers name 2 **dedicated registers**
these include: * Instruction Pointer (IP)/program counter * Stack Pointer (SP)
51
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)
52
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**
53
this may also be called a * function * procedure * method * routine
what is a ## Footnote **subroutine variably known as**
54
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
55
what is an ## Footnote **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
56
what is a ## Footnote **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
57
what is an ## Footnote **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
58
these include: * Instruction Pointer (IP)/program counter * Stack Pointer (SP)
most registers are general purpose however there are dedicated registers name 2 **dedicated registers**
59
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
60
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
61
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
62
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 ## Footnote **register**
63
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
64
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 ## Footnote **CALL machine instruction**
65
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
describe the steps of a processor receiving a ## Footnote **interrupt request (IRQ)**
66
what is ## Footnote **computer architecture**
this is a combinaion of * the instruction set * functional devices
67
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 ## Footnote **ARM**
68
name 3 componets you will typically find with a ## Footnote **processor**
this will typically contain: * multiple central processing units (CPU) * cache * memory mangement unit (MMU)