The Hardware/Software Interface Flashcards

1
Q

DEFINE: Abstraction

A

The use of simple calls to replace complex processes from the high-level developer or user.

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

What are the three levels of the computer? What languages or processors do they utilize?

A

Applications software: Written in a high-level language (C, Python…)

System software: Assembly and machine code (binary)

Hardware: Not code, processors, memory, and I/O controllers

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

DEFINE: ISA

A

Instruction Set Architecture. The abstraction between hardware and software.

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

TRUE/FALSE: An ISA needs to be adjusted for every computer.

A

FALSE. As long as two computers have the same architecture, they can both run the same ISA.

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

What are the three levels of program code? In RISC-V, what language do they use?

A

High-level language: C

Assembly language: Assembly for RISC-V

Hardware representation: Binary

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

How many bytes do RISC-V instructions take up?

A

4 bytes (32 bits also OK)

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

Even today, what is Intel’s biggest selling point in regards to its processors?

A

Backwards Compatability

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

What three important criteria do we want to focus on when designing a “good” ISA?

A

High performance, power efficiency, and low cost

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

Why can Apple design “more efficient” chips than Intel, ARM, or NVIDEA?

A

They design their chips for their own software, so they can focus on the areas they need.

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

Against what is performance measured by?

A

Execution time (for a process, function, application, etc. Software).

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

DEFINE: CPU Time

A

Time spent by the processor on a given job. Ignores anything else (such as I/O, other threads)

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

What’s an equation that expresses the relation between clock period and clock frequency (rate)?

A

1ns = Clock Period (in ns) x Clock frequency (in GHz)

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

What is an equation describing the CPU Time in relation to Instruction Count, CPI, and Clock Frequency?

A

Many answers.

CPU Time = Instruction Count x CPI x Clock Period

CPU Time = Instruction Count x CPI / Clock Frequency/Rate

CPU Time = Instruction Count / Program x Cycles / Instruction (CPI) x Seconds / Cycle

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

DEFINE: CPI

A

Cycles per Instruction. The average number of cycles run for a single instruction.

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

DEFINE: RISC

A

Reduced Instruction Set Composition. A type of ISA that limits its number and complexity of instructions in order to increase clock rate.

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

DEFINE: CISC

A

Complex Instruction Set Composition. A type of ISA that uses many complex, powerful instructions to alleviate a slightly slower clock rate.

17
Q

TRUE/FALSE: RISC uses fixed-width encoding, CISC uses variable-width.

18
Q

What’s an example of a RISC ISA (outside of RISC-V)?

A

ARM (Advanced RISC Machines).

19
Q

What’s an example of a CISC ISA?

A

Intel x86.

20
Q

What are the two hallmarks of RISC ISA’s?

A

Fixed-width encoding and keeping memory and computational instructions separate.

21
Q

Why are CISC systems able to compete with RISC despite RISC winning the race as it stands?

A

CISC processors now use RISC internals, and translate on the fly from the complex instructions to many simple ones.

22
Q

What does the following RISC-V assembly do?

add x5 x6 x7

A

It adds x6 and x7 (register values) and stores the result in x5

23
Q

Which of the following won’t you see in RISC-V (or really any RISC) ISA’s?

A) Instructions that use registers to commit to other registers
B) Instructions that combine register values and immediates to compute
C) Instructions that store the result of an operation in memory
D) Instructions that jump to other places in code

A

C. RISC is hallmarked on not mixing memory and computation.

24
Q

DEFINE: Program counter

A

The special register that stores the memory address of the next instruction to be executed.

25
Q

DEFINE: ALU

A

Arithmetic Logic Unit. Hardware that does computation.

26
Q

Why are there no more than 32 registers in RISC-V (Think 256+, not 64)?

A

Encoding becomes more limited with more register id bits to contend with, and the computer has to read through the register file in each pass, which takes more time as the number of registers increase. It also simply takes up more silicon and power.

27
Q

Why are there no less than 32 registers in RISC-V?

A

Less registers mean more spillover, where memory must be pulled from more often to access the same power level as 32 registers.

Notably, x86 has only 8 registers, so it’s not unthinkable to use less. ARM uses 16, for a RISC example.

28
Q

TRUE/FALSE: Accessing memory is a significant bottleneck in performance.

29
Q

TRUE/FALSE: When the Program Counter completes an instruction that doesn’t jump it, it moves forward by 1 byte in the RISC-V system.

A

FALSE. Since RISC-V has 32-bit encoding, it moves forward 4 bytes.