Computer Hardware Flashcards

1
Q

What is an integrated circuit

A

Millions of transistors interconnected by microscopic wires. A CPU is an example of an integrated circuit

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

How are CPUs made?

A

Hundreds of copies of the same integrated circuit are etched onto a wafer of silicon. These copies are tested, and each error-free copy is cut (diced) from the wafer, and called a die. Error-free dies are mounted in a package with the die’s pads connected to the package pins.

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

How do multi-core processors work?

A

Multiple independent cores (CPUs) are manufactured on the same integrated circuit

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

What is Moore’s Law?

A

Transistor capacity/density doubles every 18-24 months. Power dissipation is a problem, with power required being proportional to the number of transistors switched x the frequency of switching (clock speed)

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

If we are given a function f(x0, x1, x2, …, xN) : {0, 1}^n => {0, 1}^m, then…

A

We can build a circuit that computes f using only AND, OR and NOT gates

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

What does the datapath on a processor do?

A

Performs data processing operations
Includes the arithmetic logic unit, and registers

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

What does the control part of a processor do?

A

Tells the datapath, memory and I/O devices what to do

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

What is the cache?

A

Small, fast, relatively expensive on-chip memory

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

What is the von Neumann architecture?

A

It means that the program and its data both share the same memory (e.g. Little Man Computer), allowing for self-modifying programs

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

What is the von Neumann bottleneck?

A

The limitation of the data transfer rate between the CPU and memory. It led to the use of cache

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

What is the Harvard architecture?

A

Instruction memory and data memory are separated, each with their own buses, doubling data bandwidth

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

What does memory consist of?

A

Pigeon-holes containing data, each holding 8 bits and having a unique address

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

Address bus

A

Carries an address, width determines size of addressable memory

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

Data bus

A

Carries contents of memory, width determines the word size

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

Control bus

A

Deals with information transfer, specifies whether data is being read or written, signals to input/output devices

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

External storage, RAM, cache

A

External storage: cheap, slow, far from the CPU
RAM: Each bit is stored by a capacitor, somewhat slow and cheap, must be refreshed by the memory controller
Cache: expensive, fast, split into Level 1 (small, fast, in the CPU) and Level 2 (slightly larger and slower, either in the CPU or a short distance away), and Level 3. These need to be refreshed

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

CPU manufacturing process

A

Start with a silicon ingot
Slicer turns it into thin wafers
Etch the IC onto the wafers
Test the wafers to determine which parts are defective
Dice the wafers up and throw away the dies previously found to be defective
Bond die to package
Packaged dies
Part tester
Tested packaged dies

18
Q

What do we use transistors for?

A

Building gates which take binary inputs (voltage/no voltage) and produce binary outputs

19
Q

Describe a half-adder

A

Output: Sum = (A OR B) AND NOT(A AND B) = A XOR B
Output: Carry = A AND B
1+1 = 0 with carry
Carry + 0 + 0 = 1
Carry + anything else = results in carry

20
Q

Describe an adder

A

Made up of two half-adders
Overall input: A, B, Carry in
First adder input: A, B
First adder output: S1, C1
Second adder input: Carry, S1
Output: S2, (C1 OR C2)

21
Q

What is the modified Harvard architecture?

A

CPU cache is separated into data cache and instruction cache, with more space for data. Before, data was kicking instructions out.

22
Q

FETCH, decode, fetch, execute (instruction fetch)

A

CPU sends value of Program Counter to Address Bus
Memory puts contents at this memory address on the data bus
Instruction is stored in the CPU’s Instruction Registers

23
Q

fetch, DECODE, fetch, execute

A

The instruction word in the Instruction Registers is decoded by internal logic to provide control signals to ALU and other internal circuits inside the CPU
Program counter value pushed onto Address Bus, the ALU picks it up, increments it by the word size and puts it back into the Program Counter

24
Q

fetch, decode, FETCH, execute (operand fetch)

A

The instruction registers send the address of the data to be processed (operand address), to the address bus
Memory supplies the operand data to the data bus, and it goes to the ALU ready for processing

25
Q

fetch, decode, fetch, EXECUTE

A

The ALU processes the operand according to the instruction and puts the result in the accumulator
The program counter might need to be updated, if it was a jump instruction
The result from the accumulator might have to be written back into memory

26
Q

What is the Instruction Set Architecture?

A

The interface between hardware and software, the view the programmer has of hardware
Includes everything programmers need to know to program the processor

27
Q

What does the ISA include?

A

Structure of programmable storage (memory)
Instruction sets for using the processor
Modes of addressing and accessing data items within memory
Process of execution (FDFE)
A primary component is its assembly language (very low-level and goes on to be implemented as machine code)

28
Q

Describe MIPS

A

4GB memory, 32 bit address bus, 4 byte words, 32-bit registers $zero $s1 $s2 etc.
When we request the contents of a memory address m, we get the contents of m, m+1, m+2 and m+3

29
Q

I-type instructions

A

6-bit opcode (instruction code)
5-bit source register (Rs)
5-bit destination register (Rd)
16-bit memory address or constant (use offsets and indirect addressing)
e.g. addi $s3, $s3, 1 =
001000 10011 10011 0000000000000001

30
Q

R-type instructions

A

6-bit opcode
two 5-bit source registers (Rs1 and Rs2)
5-bit destination register (Rd)
5-bit shift amount for shift instructions
6-bit funct (supplement for opcode in some instructions)
e.g.
slt $s6, $s1, $s5

31
Q

J-type instructions

A

6-bit opcode
26-bit address to jump to
e.g.
j 8

32
Q

Process of compiling and executing source code

A

Source code => compilation/translation => assembly/bytecode => machine code => voltages

33
Q

Main functions of an operating system

A

Interface between applications and hardware
Virtualisation: you don’t have to manage specific memory addresses of variables or the exact location of a file on the disk, the OS abstracts it away and deals with it for you
Manages memory and the starting/stopping of programs (frees memory when a program is closed) and time slicing
Handles input/output (interrupts)

34
Q

What is a bus?

A

Lines of communication (physical wires)
Cheap and versatile but very slow, causing bottlenecks

35
Q

What is an interrupt?

A

When a device wants to send input, it raises an interrupt on a bus line, which is a request for the CPU to interrupt currently executing code and process the input. Dealt with by the interrupt handler

36
Q

What is a process?

A

A program in execution (a thread + address space/allocated memory)
A thread is a sequence of instructions in memory

37
Q

What is mutual exclusion?

A

When the OS prevents two different threads from accessing the same memory location
Each thread has to ask the OS for permission to access c (critical section)

38
Q

List the different process states

A

new: Process being created
ready: Not on CPU, but ready to run
running: executing on CPU
blocked: waiting for an event (usually I/O)
exit: process finished

39
Q

List the different process state transitions

A

admit: process control set up, move to run queue (new => ready)
dispatch: scheduler gives CPU time a process which is ready
timeout/yield: running process gives up CPU time and becomes ready
event-wait: process waiting for event gives up CPU time and becomes blocked
event: event occurs, process goes from blocked to ready
release: process terminates, resources can be released

40
Q

Process control block

A

A data structure used by the kernel to manage a process:
- Unique process ID
- Process state
- CPU scheduling information: priority, events pending
- Location of address space
- When the process was last run, CPU time lapsed
When not running: program counter, values in other CPU registers

40
Q

What is a context switch?

A

Switching between two different processes (moving from ready to running)
Process A saves state into PCB A and becomes ready
Process B restores old state from PCB B and becomes running

41
Q

What is the current trend in microprocessor design so as to overcome difficulties with power dissipation as we build faster and faster single processors?

A

Multi-core processors where one CPU with a high clock-speed is replaced with a number of CPUs with lower clock-speeds but which, when working together, can give better computational power.