Set 2 Flashcards

1
Q

Describe what an interrupt is and explain the purpose of interrupts.

A

A signal is sent to the processor (from a hardware
device or program)
So that a device or source that needs the immediate attention of the processor can be dealt with.

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

Describe how an interrupt runs.

A

The processor receives the interrupt
The processor completes the fetch-decode-execute cycle of the instruction that it was running when it received the interrupt
The current contents of the processor registers (including the program counter) are saved to memory
The origin of the interrupt is identified so that the appropriate ISR is called
All other lower-priority interrupts are put on hold to allow the ISR to finish running
The program counter is updated with the address of the first instruction of the ISR
The ISR completes its execution
The processor registers are reloaded with the values that were saved to memory
The lower-priority interrupts that were put on hold are re-established
The program counter is set to point to the address of the next instruction that needs to be executed in the program that the processor was running when it received the interrupt

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

How could you improve the performance of a computer?

A

Replace the processor with one which has more cores
Replace the processor with one which has more cache memory
Increase clock speed of processor
Use a parallel processor architecture
Use a processor with a bigger word size
Use a processor that makes better use of pipelining
Install more RAM
Use RAM with a faster access time
Replace the motherboard with one which has buses which run at a faster clock speed
Replace the motherboard with one which has more lines in data bus

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

How many bytes are in a kilo/mega/giga byte?

A

1 thousand/1 million/1 billion or 1000/1,000,000/1,000,000,000

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

How many bytes are in a kibibtye?

A

1024 bytes

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

How many kibibytes are in a mebibyte?

A

1024 bibibytes

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

List the prefixes starting kibi…

A
  • kibi
  • mebi
  • gibi
  • tebi
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a character set?

A

A character set is a standardised collection of characters and the bit-patterns used to represent them

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

How many bits does ASCII use? How many characters can it represent?

A
  • ASCII uses 7 bits to represent characters (hence max 128 characters)
  • However, 8 bits are used to store each character (preceding 0)
  • The leading 0 sometimes used as parity bit instead
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does ASCII work?

A
  • Each of the characters is assigned a denary character code
  • Which is represented and stored in the computer as binary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the downside of ASCII?

A

ASCII is not sufficient to represent all of the languages and scripts used around the world

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

Why is unicode needed?

A
  1. ASCII can’t represent all languages and scripts
  2. ASCII can’t represent all possible symbols
  3. The World Wide Web made it important to have a universal international coding system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which is the most common unicode encoding standard used?

A

UTF-8

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

What are the first 128 codes in unicode the same as?

A

The first 128 codes in ASCII

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

What is clock speed?

A

The frequency at which the system clock ticks

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

What is word length?

A

Word Length is the number of bits in a word

(A word is the fixed size unit of data used across the computer)

17
Q

What is word length?

A

Word Length is the number of bits in a word

(A word is the fixed size unit of data used across the computer)

18
Q

What is the address bus width?

A
  • The number of bits that can be used to form an address of a memory location
  • Or the number of parallel wires allocated to the address bus
19
Q

What is the data bus width?

A
  • The number of bits that can be transferred to or from memory in one operation
  • Or the number of parallel wires allocated to the data bus
20
Q

How is fetch time affected if the data bus isn’t big enough for a piece of data?

A
  • the piece of data will be split into two parts
  • meaning fetch time will be doubled.
21
Q

What is cache memory? What does it contain?

A

Cache memory is a small capacity of very fast memory that sits on or close to the processor.

Cache memory contains:
1. Copies of data from frequently used memory locations
2. Pre-fetched instructions
3. Data to be written to main memory

22
Q

How does increasing cache memory size affect processor performance?

A
  1. Increasing cache size means more instructions and data can be stored in cache
  2. So main memory needs to be accessed less frequently
  3. Cache memory is faster to access than main memory
  4. So throughput and response time is increased
23
Q

How does increasing the number of cores affect processor performance?

A
  • Multiple tasks can be run at the same time
  • A single task can be split over multiple processors
    • Many programs are now written to optimise the use of parallel processing
  • This increases throughput
  • Although the efficiency depends on the nature of the required task
  • However, increasing the number of cores greatly increasing complexity
24
Q

4 reasons secondary storage is needed

A
  • Main memory is volatile, so secondary storage needed to store files that are needed multiple times
  • Secondary storage can be used to store larger files, as it usually has a much higher capacity than main memory
  • Secondary storage can be used for virtual memory
  • Main memory is expensive
25
Q

What is the effect of increasing data bus width?

A
  • more bits can be transferred between main memory and the processor in one operation
  • so fewer read/write operations are needed
  • so there are fewer delays when retrieving data
26
Q

What is the effect of increasing address bus width?

A
  1. The processor can access a larger number of memory locations
  2. so the CPU doesn’t have to access secondary storage as often
  3. which reduces the reliance on virtual memory
  4. Increased scalability and increased throughput
27
Q

What is the effect (and downside) of increasing word length?

A
  • Longer word length means registers can store more bits, so the processor can process more bits in one go
  • Also, complicated value splitting is required if the operand size is larger than the word length
  • however if word length is increased, more memory is wasted when storing small values
28
Q

What is the effect (and drawbacks) of increasing clock speed?

A
  • Higher clock speed means more instructions can be executed per unit time
    however
  • All machine code instructions take a certain amount of time to execute anyway
  • And heat dissipation becomes more of an issue as clock speed increases
29
Q

Give 4 advantages of Harvard architecture

A
  • Instruction and data can be accessed simultaneously
  • Instruction and data memory can have different word lengths
  • Different technologies can be used to implement instruction and data memory
  • For systems with a predetermined use, instruction memory can be implemented as ROM which protects the programs from hacking
30
Q

Give 3 items stored in a stack frame

A
  • Return address
  • Parameters
  • Local variables