Computer Architecture Flashcards

(108 cards)

1
Q

What is a bus?

A

Group of wires used to transmit data and electronic signals between components within a computer system

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

What is the width of a bus?

A

Number of wires (lines) used to make up the bus

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

What is an I/O controller?

A

Circuit that provides an interface between the processor and other external components

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

What do all computer systems contain?

A
  • A processor
  • Some non-volatile storage
  • Some form of I/O controller to communicate with external systems
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the motherboard do?

A
  • Provides connectivity between components via buses
  • Contains networking, sound and video chips
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is RAM used for?

A

Temporarily store data and instructions that are being processed by the CPU

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

What other components may a computer contain?

A
  • Dedicated graphics card
  • Dedicated networking card
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is inside the CPU?

A
  • Control Unit: contains decoder
  • ALU: contains logic circuits
  • Registers
  • Cache: store recent or anticipated instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the clock do?

A

Sends out electronic pulses at fixed intervals to coordinate connected components in the FEC.

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

How does the processor and main memory work together?

A
  • All instructions come from main memory and must be transferred from secondary storage
  • ROM contains the start-up instructions and information such as the connected hardware and location of bootloader
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the buses that make up the system bus?

A
  • Address bus
  • Data bus
  • Control bus
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the address bus?

A
  • Carries the memory location being accessed by the CPU
  • unidirectional coming out of the CPU
  • width determines the amount of memory of physical memory that can be addressed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the data bus?

A
  • Carries the actual data being used
  • bidirectional
  • width determines the rate of data transfer and hence performance
  • Even if it transfers more data than it can handle, it will be stored in registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the control bus?

A
  • Carries control signals to enable, facilitate and control operation
  • bidirectional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the two main types of computer architecture?

A
  • von Neumann
  • Harvard
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the idea behind the von Neumann architecture?

A

A single shared main memory can be used to store both instructions and data.

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

What is the idea behind the Harvard architecture?

A

Utilises distinct memory for program instructions and data, accessed by separate instruction and data buses.

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

What is the von Neumann architecture used for?

A

General purpose computer systems

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

What is the Harvard architecture used for?

A

Embedded Systems

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

What are the advantages of the von Neumann architecture?

A

More flexible and allows for different programs to be installed and removed

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

What are the advantages of the Harvard architecture?

A
  • Allows for different bus widths for instructions and data, matching the perfect size for each
  • Reduces delays waiting for memory fetches
  • Avoids possibility of data being executed as code (often used by hackers)
  • Allows for different technologies to be used to implement the two memories
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the stored program concept?

A

Machine code instructions are treated as data that can be encoded and stored in memory. They can then be fetched, decoded and executed by the processor.

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

What is the use of the stored program concept?

A

Allows for different programs to be moved in and out of main memory. Used in both types of architecture

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

What is the role of the processor?

A
  • Fetch instructions from memory
  • Decode the fetched instructions
  • Execute the decoded instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the internal components of a processor?
- Control Unit - ALU - Clock - Registers (General and Special purpose)
26
What are the different special purpose registers?
- Program Counter - Current Instruction Registers - Memory Address Register - Memory Buffer Register - Status Register
27
What is the purpose of the control unit?
- Decode fetched instructions to identify what operations must be executed - Done by breaking down into steps and sending control signals to the necessary components - Controls the FEC
28
What is the purpose of the ALU?
Performs arithmetic and logical operations like: - +,-,*,/ - If value is < 0 - = ,<, > - Shifts - AND, OR , NOT and results are stored in registers
29
What is the purpose of registers?
- Small units of memory used to store values required by the processor. - Has special-purpose and general-purpose that can store any type of data
30
What is the purpose of the program counter?
Stores the address of the **next** instruction to be fetched
31
What is the purpose of the current instruction register?
Stores the fetched instructions that is to be decoded and executed
32
What is the purpose of the memory address register?
Stores the address that will be read or written to, transferred by the address bus
33
What is the purpose of the memory buffer register?
Stores the data that will be sent or is received via the data bus
34
What is the purpose of the status registers?
Stores the status of the processor and executed instructions e.g. overflows or interrupts
35
What are the steps in the Fetch stage?
1. PC stores the **address** of the **next instruction** 2. Contents of the PC are copied into MAR 3. MAR places this address on the address bus 4. Instruction at the address is copied into the MBR 5. PC is incremented
36
What are the steps in the Decode stage?
1. Contents of the MBR are copied to the CIR 2. Decoder identifies the **operations** that must be carries out to execute the instruction
37
What are some of the operations the CPU can perform?
- Jump - change the PC to point to a different next instruction - Arithmetic calculation - Logical operation - Load / Store contents of the general purpose registers - Halt
38
What happens in the Execute stage?
Control unit send control signals to the correct components to carry out the operations
39
What is an interrupt?
Allows the currently executing process to be **suspended** so that a device or error that requires the **immediate attention** of the processor can be **serviced**
40
What extra step is added to the FEC to handle interrupts?
Between executing the instruction and fetching the next instruction, the processor checks the interrupt register
41
What are the different types of interrupt?
- Hardware - Software - Exception
42
What is a hardware interrupt?
- Raised by I/O controllers - E.g. a key press
43
What is a software interrupt?
- Raised by applications that have been terminated or need access to a piece of hardware - Handled by the OS
44
What is an exception interrupt?
- Raised by the processor itself as a result of events like errors - e.g. divide by zero or accessing invalid address
45
What is an Interrupt Service Routine (ISR)
Small program in memory that contains the instructions required to respond to the interrupt
46
What is the Vectored Interrupt Mechanism?
Interrupting device supplies an offset relative to the Interrupt Vector Table to give the **start address** of the ISR which is loaded into the PC
47
What is an Interrupt Vector Table?
A data structure that maps interrupt requests to the starting addresses of associated ISR
48
What steps are required if a computer system has an interrupt mechanism?
- Test for an interrupt - Identify the **source** of the interrupt - Save the volatile environment - **Service** the interrupt - Disable lower priority interrupts
49
What are the advantages of the vectored interrupt mechanism?
- Different routines can be easily introduced - Routines can be relocated
50
What must be done before an interrupt is serviced and why?
- Preserve the volatile environment of the processor’s registers in the system stack (memory) - So that the previous process can be returned to
51
What is context switching?
The process of switching from process —> ISR —> process
52
How are multiple interrupts handled?
Interrupts are serviced in order of priority
53
What is an instruction set?
Set of bit patterns that define the machine operations that the processor can perform
54
What is the difference between an operation and an instruction?
- An instruction can be made up of several operations - Operations are performed and instructions are executed
55
What do instructions consist of?
- Opcode - Operand
56
What is an opcode?
Pattern of bits that specifies the instruction to be executed
57
What is an operand?
- The parameters used by the operation - Includes literal values, memory addresses or registers
58
What are the two types of addressing modes?
- Immediate addressing - Direct addressing
59
What is immediate addressing?
- Operand is the value to be used - Denoted in assembly with a #
60
What is direct addressing?
Operand is the address of the memory location storing the value to use
61
How many opcodes are there for each instruction?
2, one for direct addressing and one for immediate addressing
62
What is assembly?
A low-level programming language that uses mnemonics that to represent each instruction. Each mnemonic has a 1:1 mapping to a machine code operation.
63
What is a word length and what is its impact on CPU Performance?
Measure of the size of the instructions that a CPU can process. A larger word size increases performance especially when working with large values. For example a calculation that would have been split can now be done all in one
64
What is the effect of increasing the size of the address bus on CPU performance?
- Can address a larger number of memory location so has potential for larger primary memory - Can run larger applications - More address space for memory-mapped I/O addresses
65
What is the effect of increasing the size of the data bus on CPU performance?
- Larger instruction sets - More accurate floating point numbers - Less likely to encounter overflow
66
What does the width of the address bus determine?
The number of physical memory locations that can be accessed
67
What does the width of the data bus determine?
How many bits can be transferred at once
68
What is a CPU core?
Each core has its own Control Unit, ALU, registers and low level cache
69
What are the benefits and limitations of increasing the number of CPU cores?
- CPU can process multiple instructions simultaneously, leading to a potential increase in performance. - Only benefits programs that have been written to take advantage of multiple cores
70
What is cache?
Very fast memory located within or very close to the CPU.
71
What is cache used for?
Store recently fetched and anticipated instructions so that the CPU can access them more quickly
72
What is the benefits and limitations of increasing the amount of cache memory?
- Store more instructions, reducing the amount of time lost waiting to fetch the next instruction from RAM - Cache is physically large and expensive
73
What are barcode readers and what is their purpose?
- Input devices that facilitate the automated capture of numeric data - Significantly increase the speed with which data can be entered whilst reducing error rate
74
Where are barcode readers used?
- Product Codes - Tickets - Boarding Pass - Membership - ID Card
75
What validation techniques do barcodes use?
- Check Digit - Odd parity on the left and even parity on the right
76
How do barcodes work?
1. Light source within the barcode readers is used to illuminate the barcode 2. Moving mirror sweeps light beam across the barcode which is reflected back to the reader 3. Black and white bands reflect different amount of light 4. Light sensor within the reader measures the amount of reflected light which is converted to an electrical signal 5. Electrical signal translates binary numbers which are sent to the computer in an appropriate form
77
What are imaging barcode readers?
Use an array of CCD sensors to capture patterns which an analysed using image analysis hardware
78
What are the advantages and disadvantages of laser barcode readers over imaging barcode readers?
+ Cheaper to produce - Code needs to be in good condition and reasonably flat
79
What are the advatages and disadvantages of imaging barcode readers over laser barcode readers?
+ Able to scan codes in poorer condition and at various perspectives + Used to scan QR codes - More expensive
80
How do digital cameras work?
1. When the shutter opens, light is focused by a lens and passes through a coloured filter before it hits a CCD or CMOS sensor 2. Electrical current is generated that represents that pixel’s light level 3. Coloured filter splits into red, green and blue channels such that the signal generated by each sensor represents the amount of that colour light only 4. Signal converted by an ADC and stored in camera’s memory
81
What are the uses of digital cameras?
- Security systems - Sports ground or entertainment venue - Airport
82
What are the two types of sensors found in digital cameras?
- Charge-coupled devices (CCD) - Complementary Metal-Oxide Semiconductors (CMOS)
83
What does RFID stand for?
Radio Frequency Indentification
84
What is RFID chip?
Very small microchip with an antenna
85
How does RFID work?
1. And RFID readers sends electromagnetic signal which are received via the antenna in the RFID tag in the object 2. Signal energises the RFID tag causing the microchip to transmit its stored data 3. Transmitted data is received by the RFID reader where it is decoded and processed further
86
What are the uses of RFID?
- Contactless payment cards - Entry Systems - Implementing microchips in pets and cattle - Protection against theft
87
How do laser printers work?
1. Bitmap image of the negative of the page is generated by the printer 2. Inside the surface of a cylindrical drum is covered with a static charge 3. Laser is used to imprint the negative image onto the surface of the rotating drum causing them to lose their charge 4. Toner particles are transferred to the drum by becoming charged and getting attracted to it 5. Toner transferred onto pages as its fed past the drum and fused to the paper by heated rollers 6. For colour printing, 4 toner cartridges are used with different colours
88
What are the advatantages and disadvantages of using laser printers?
+ High quality and fast prints + Low running costs - High initial costs
89
What is secondary storage?
Long-term, non-volatile storage of programs and data that is not directly accessible to the CPU
90
What are the primary needs for secondary storage?
1. Persistent long-term storage of programs and data 2. Large capacity 3. Modifiable 4. Providing virtual memory
91
What are the other needs for secondary storage?
- Expandable - Portable
92
What are the 3 main types of secondary storage?
- Hard Disk Drives - Solid State Drives - Optical Drives
93
How do HDDs work?
1. Magnetic charges are used to store binary data on metal discs called platters which spin at very high speeds 2. Electromagnetic read-write head is used to magnetise regions on the surface of the platters 3. Platter is divided into tracks and sectors, allowing the OS to specify where the data is stored 4. Read-write head is moved radially to access different tracks where data is read or written to 5. Data transferred to and from the HDD via a cable connected to an I/O controller 6. Data can be accessed from any point on the disc so it is a random access storage device
94
What are the uses of HDDs?
- Main form of secondary storage - Holds OS, application and user data - Backups
95
What are the advantages of HDDs?
- Large capacity - Cheap per GB - Reliable - Portable so can be used to transport large amounts of data
96
What are the disadvantages of HDDs?
- Relatively slow access times compared to SSDs - Susceptible to wear and tear due to moving parts - Can get damaged if moved or dropped so not robust - Noisy
97
How does optical storage work?
1. Surface of the disc covered with pits and lands arranged in a single track starting at the centre and working outwards 2. Laser light is shone at a point on the disc’s surface as it spins at a constant linear velocity 3. Amount of laser light reflected from the surface measured by a photodiode 4. Hardware can detect transitions between pits and lands due to changes in reflected light 5. Transitions encode a 1 and continuations encode a 0 6. Laser and photodiode can move radially allowing any point on the track to be read
98
What are the different types of optical media?
- ROM: Data is pressed onto disc and cannot be altered - R (Recordable): Data can be burned onto disc once - RW (Rr-writable): Data can be re-written multiple times
99
How is higher capacity achieved with optical storage?
- Smaller pits must be used - Wavelength of light must decrease such that its is still causes destructive interference in a pit
100
What are the advanatages of optical storage?
- Cheap to mass produce - Portable - Relatively cheap per B
101
What are the uses of optical storage?
- Physical distribution of digital content - Home backups
102
What are the disadvantages of optical storage?
- Limited number of writes - Slower than HDDs and SSDs - Prone to scratches that can corrupt data - Chemicals used for RW discs unreliable due to long-term stability issues
103
What do SSDs consist of?
NAND flash memory and a controller that manages pages, blocks and writing to them
104
How do SSDs work?
1. Memory consists of an array of NAND flash memory cells made of floating-gate transistors 2. Binary data is stored as a presence or absence of trapped electrons 3. Controller chip manages the reading and writing of data to the memory cells 4. Memory cells arranged into pages, which themselves form blocks 5. To write data, the whole block must be erased so it is first copied, modified and then written to the new block
105
What are the uses of SSDs?
- Portable devices
106
What are the advatages of SSDs?
- All-electric results in faster access times and data transfer rates than HDDs - More compact than HDDs - No moving parts making them more robust, low-power and silent - Large capacity suitable for consumer products
107
What are the disadvantages of SSDs?
- Higher cost per GB - Limited read-write cycles before degrading - Smaller capacity the HDDs - Less suitable for backups
108
What is a disadvantage of solid state media?
Some media (e.g. SD cards) are no faster than HDDs but have a smaller capacity at a greater cost per GB