Exam 1 Flashcards

1
Q

Code Motion

A

Code motion is when you reduce the frequency that a computation is performed. Especially moving code out of loop

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

Strength Reduction

A

Reduction in strength is when you replace a costly operation with a simpler one. Ie, replacing multiplication with addition.

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

In-Lining

A

In-lining is an optimization technique that may be used to improve performance when a small function is called from within a high iteration loop

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

Loop-unrolling

A

Loop unrolling is when you move code outside of a loop and expand it to minimize the number of instructions that are executed; the performance improvement comes from the fact that fewer instrs are being executed

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

Superscalar architecture

A

Can issue and execute multiple instructions in one cycle; they’re retrieved from a sequential instruction stream and are usually scheduled dynamically. Can take advantage of instruction level parallelism

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

Speculative execution

A

Speculative execution is an optimization where the system performs a task way ahead of time, that may or may not be needed, in order to prevent a delay from occurring when and if the work is actually needed.

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

RAS and CAS

A

Row Address Strobe

Column Address Strobe

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

Platters

A

Construct the disk; consist of two sides called surfaces

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

Surfaces

A

Make up platters and are coated with magnetic recording material

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

Cylinders

A

The collection of tracks on all the surfaces that are equidistant from the center of the spindle

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

Rotational rate

A

Measured in RPM; how fast the spindle spins on the platter

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

Track

A

Located on surfaces in concentric rings

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

Sector

A

How each individual track is partitioned

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

Recording density

A

(bits/in) The number of bits that can be squeezed into a 1 inch segment of the track

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

Track density

A

(tracks/in) The number of tracks that can be sequeezed into a 1-inch segment of the radius extending from the center of the platter

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

Areal density

A

The product of the recording density and the track density

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

Disk capacity

A

bytes/sector * average # sectors/track * # tracks/surface * #surfaces/platter * # platters/disk

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

Seek time

A

The time required to move the arm over the track that contains the target sector

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

Rotational latency

A

Once the head is in position over the track, the amount of time it takes for the first bit of the target sector to pass under the head

20
Q

Transfer time

A

1/RPM * 1/average # sector/track * 60 secs/1 min

21
Q

Cache Block

A

The data in the cache

22
Q

Cache line

A

cache size/block size

23
Q

Cach Sets

A

number of lines/lines per set

24
Q

Cache associativity

A

of lines per set

25
Q

Direct-mapped cache

A

Each main memory address maps to exactly one cache block
Advantages: Simple technique and the mapping scheme is easy to implement.
Disadvantages: Each block of main memory maps to a fixed location in the cache; therefore, if two different blocks map to the same location in cache and they are continually referenced, the two blocks will be continually swapped in and out (known as thrashing)

26
Q

Fully associative cache

A

Permits data to be stored in any cache block, instead of forcing each memory address into one particular block.
Advantages: Much better hit rate
Disadvantages: Slower access time

27
Q

Write-through

A

Write immediately to memory

28
Q

Write-allocate

A

Load into cache, update line in cache

29
Q

Write-back

A

Defer write to memory until replacement of line; need a dirty bit

30
Q

No-write-allocate

A

Writes straight to memory, does not load into cache

31
Q

What happens when you increase cache size?

A

Decrease miss rate, increase hit time

32
Q

What happens when you increase block size?

A

decrease miss rate, increase miss penalty

33
Q

What happens when you increase associativity?

A

decrease miss rate, increase hit time, increase miss penalty

34
Q

Trap

A

The type of exception that occurs intentionally as a result of executing an instruction. Example: User program opens a file

35
Q

Interrupts

A

The type of exception that is generated by an I/O device. Example: I/O device completes request

36
Q

Fault

A

If a process causes an access to data or instruction that is not currently in main memory. Example: Read of a instruction not currently in main memory

37
Q

Abort

A

If a process causes an access to corrupted data or instructions. Example: Hardware error

38
Q

Concurrent processing

A

Single processor executes multiple processes concurrently. Register values for nonexecuting process saved in memory

39
Q

Logical control flow

A

Each program seems to have exclusive use of the CPU, provided by kernel mechanism called context switching.

40
Q

Private virtual address space

A

Each program seems to have exclusive use of main memory. Provided by kernel mechanism called virtual memory

41
Q

Context switch

A

Processes are managed by a shared chunk of memory resident OS code called the kernel. Important: the kernel is not a separate process, but rather runs as part of some existing process. Control flow passes from one process to another via a context switch

42
Q

errno

A

On error, Linux system-level functions typically return -1 and set global variable errno to indicate cause.

43
Q

exit()

A

Terminates with an exit status of status. Convention: normal return status is 0, nonzero on error. Another way to explicitly set the exit status is to return an integer value from the main routine

44
Q

zombie

A

When process terminates, it still consumes system resources. Examples: Exit status, various OS tables. Called a “zombie”. Living corpse, half alive and half dead

45
Q

Rotation time

A

1/RPM * 60 secs/1 minute

46
Q

Seek time

A

60 seconds/RPM