Introduction to computer design Flashcards

1
Q

What is Moore’s law?

A

The number of transistors double every 18 months.
However, this is now slowing down.

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

Define the internet of things/embedded systems

A

Computers that are integrated as components in systems. Have very few applications and are not programmamble by the end user.
(cars, washing machine, …)

Power, performance and costs set the constraints for embedded systems

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

What are personal mobile devices?

A

Wireless devices with multimedia user interfaces.

As embedded systems, they are power, performance and cost constrained

(phones, tablet, …)

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

What are desktop computers?

A

General purpose running a variety of software.

Limited by power, but not as much because of the ability to an outlet.

Performance constrained

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

What are servers?

A

Network based computers.
Have high throughput and need to be reliable.
High capacity.
Energy constrained.

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

What is one way to improve computer performance?

A

Exploiting parallellism

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

What two types of parallelism are there?

A

Data-level parallelism: Same operation of multiple data

Task-level parallelism: Divide the work into tasks that can operate mostly in parallell

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

What are the sources of parallelism in computers(5)?

A

Instruction-level parallelism

Thread-level parallelism

Request-level parallelism

Memory-level parallelism

Vector processing (SIMD - single instruction multiple data)

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

What are Instruction level paralellism?

A

Observing that if instructions are independent of each other, they can be executed in parallell.

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

What is vector processing / SIMD (Single input multiple data)

A

You operate the same instruction on multiple data

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

What is thread level parallelism?

A

Software is organized as different threads that can run in parallell.
Threads can communicate with each other.

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

What type of parallelism can be implemented in request-respons systems?

A

Request-level parallelism

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

What is request-level parallelism?

A

In these systems, such as servers, requests tend to be independent of each other.

Request-level parallelism is when systems processes requests in parallell.

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

What type of parallelism can be implemented for load and store requests?

A

Memory-level parallelism.

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

What is Memory-level parallelism?

A

Processor memory requests can be issued in parallell to hide memory latencies

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

Name the categories in Flynn’s taxonomy

A

SISD: Single instruction, single data (sequential)

SIMD: Single input, multiple data (Vector architectures, GPU)

MISD: Multiple instructions, single data (not commonly used, very impractical, more theoretical)

MIMD: Multiple instruction multiple data

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

What are the two categories of MIMD systems?

A

Tightly-coupled: Multi-cores, many-cores

Loosely-coupled: Clusters, data centers

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

Define computer architecture

A

The instruction set architecture (ISA).
The set of instructions that can be executed by the hardware.

Todays objective of computer architecture is to design the organization and the hardware to meet objectives and functional requirements.

Final definition: Computer architeture covers the ISA, the organization and the hardware

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

What does the ISA define (7)?

A

Operand types (registers, memory locations)

Memory addressing (is the memory byte addressible…?)

Addressing modes (registers, immediate, displacement)

Types and sizes of operands (word, char, double word)

Operations

control flow (conditional branches, unconditional jumps)

Encoding (are all instructions the same size, variable lengths to not waste bits)

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

What is computer organization?

A

High-level aspects of a computer’s design.
Memory system, interconnects - how components are connected to each other, CPU design

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

What is computer hardware?

A

Logic design and packaging of the computer.

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

Name the levels of a computer

A

Application software: Software in high-level language

System software: Compiler (translates HLL to machine code), OS (provides service code, I/O, scheduling, share resources)

Hardware: RAM, CPU, I/O

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

What are the levels of program code

A

High-level language:
- Level of abstraction closer to problem domain
- readable for humans (productivity)

Assembly language:
- Textual representation of instructions

Hardware representation:
- stream of bits
- encoded instructions and data

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

What does a CPU need to be able to do, to compute any function?

A

arithemtic, conditional branches, memory access

23
Q

What implements arithmetic in the CPU?

A

Arithmetic is implemented in the datapath

24
Q

How is conditional brancing implemented in the CPU?

A

Control path selects next instruction based on branch outcome. Enables the parts of the datapath needed to execute a given instruction.

25
Q

How is memory acccess implemented in CPU?

A

Because of memory latency, memory caches are implementes.

26
Q

Why did the single-core processor performance growth decrease around 2003?

A

You could no longer scale up the number of transistors without increasing the power consumption

27
Q

What is bandwith?

A

The amount of data that can be transferred each unit of time.

28
Q

What prevents clock frequency of continuing scaling?

A

Clock frequency affect power consumption, and in 2003 the power ceiling was reached and frequencies could not scale anymore.

29
Q

Define the quantitative approach of designing CPUs

A

Take advantage of parallelism: This is now the way of improving performance

Leverage locality: Utilize temporal and spatial locality in programs (use same data again and again (loop), programs often use data that is close to each other (arrays))

Focus on common case: lot of trade off in computer architecture. Favour the frequent case over the infrequent gives better performance. (Amdahl’slaw)

30
Q

What is Amdahl’s law?

A

A mistake that can be made is thinking that improving one aspect of a computer and expecting a proportional improvement in overall performance. This isnot the case.

Massive improvement of an infrequent case gives negligible overall improvement.

T_improved = (T_affected/Improvement_factor) + T_unaffected

31
Q

What 4 aspects can affect performance?

A

Algorithm: Determines number of operations executed

Programming language, compiler, architecture: Number of machine instructions executed per operation

Processor and memory system: How fast instructions are executed

I/O systems: Can affect performance. Determines how fast I/O operations are executed.

32
Q

What metrics are often used to measure performance in computer systems?

A

Time: response-, turnaround- and execution time,

Throughput

33
Q

What is turn-around time?

A

The time from issuing a command to its completion

34
Q

What is response time?

A

Time from issuing a command to first response

35
Q

What is execution time?

A

The time the processor is busy executing the program.
Does not include the time waitingfor acommand to be executed.

36
Q

What are the two categories you can divide execution time into?

A

User execution time: Time spent executing user code

System execution time: Time spent in OS to service the application

37
Q

What is throughput

A

Amount of work done per unit time.

38
Q

When replacing the CPU with a faster one, how is response time and throughput affected?

A

Both will increase

39
Q

When adding more CPUs, how is response time and throughput affected?

A

Response time won’t be affected, but throughput will increase.

40
Q

How can execution time be measured?

A

Elapsed time / Wall clock time: Total turnaroun time, including all aspects, this determines the system performance

CPU time: Time spent processing a given job. User/system CPU time. Bias: different programs are affected differently by CPU and system performance.

41
Q

What is benchmarking?

A

A way of measuring computer performance.

When benchmarking, you should use real applications. As programs consist of phases, the relative importance of each phase creates bias. Different computer architecture techniques pay off in different phases, and recreating this bias synthetically is difficult. Therefor should be using real applications with real input data.

Should use a collection of real applications. This is because a computer is general purpose and you want to measure how it performs across all of them.

Want realistic applications that pushes the computer to its limits.

42
Q

What are benchmark suites?

A

Tools used when doing benchmarking.

The suits attempts to be representative for the workloads of different domains.

43
Q

What are some benchmarking approaches that you should be careful with, and why?

A

Kernels, toy programs and synthetic benchmark.

They do not accurately recreate the behaviour of real program.

It is easy to cheat if the benchmarks are simple.

44
Q

How does CPU clocking work.

A

The operations of hardware follows a constant clock.

Follows a constant clock frequency (times the clock changes per unit of time, cycles per second).

45
Q

What is a clock frequency?

A

Cycles per second

46
Q

What is the clock period?

A

Duration of a clock cycle.
Time between a rising edge.

47
Q

What is often done at the rising edge of the clock.

A

Update the state (registers, flip flops)

48
Q

How can you define CPU time using CPU clock?

A

CPU time = cycles * cycle time

= cycles / clock rate

49
Q

How can you improve performance when looking at CPU clocking?

A

Increasing the clock rate or reducing the number of clock cycles

50
Q

Define clock cycles in terms of instructions

A

cycles = Instruction count * cycles per instruction

51
Q

Define CPU time in terms of instruction time

A

CPU time = Instruction count * CPI (cycle per instruction) * clock cycle time

= (instruction count * CPI) / clock rate

52
Q

What determines the instruction count

A

Program, ISA and compiler

53
Q
A
54
Q

What determines the avarage cycles per instructions (CPI)?

A

CPU hardware.
Different instructions takes different number of cycles. When measuring performance, we therefor need to find an avarage to use.

55
Q

What is the weighted avarage of CPI?

A

Weighted by instruction count.

Clock cycles = sum from i = 1 to n, (CPI_i * instruction count_i)

CPI = cycles / count = sum from i = 1 to n, (CPI_i * (count_i/count))

Where count_i/count gives relative frequency

56
Q

What is the Iron Law and what does it measure?

A

The Iron Law gives that performance depends on:
- algorithm (affecting count, possibly CPI)

  • Programming language (count, CPI)
  • Compiler: IC, CPI
  • ISA: IC, CPI, Clock cycle time

CPU time = (instructions / program) * (cycles / instruction) * (seconds / cycle)