DA

hw7

Storing copies of data at places that can be accessed more quickly → Caching

Recently referenced locations are more likely to be referenced soon → Temporal Locality

Reference locations tend to be clustered → Spatial Locality

Leaving behind cache content with no localities → Cache Pollution

Data brought into the cache for the first time → Compulsory Misses

Caused by the limited size of a cache → Capacity Misses

Immediately propagates update through various levels of caching → Write-through Caching Policy

Delays the propagation until the cached item is replaced → Write-back Caching Policy

What is the effective access time of memory (in decimals) through L1 and L2 caches for the following hardware characteristics? 1.75

access time

cache hit rate

L1 cache

1 clock cycle

75% or 3/4

L2 cache

2 clock cycles

75% of 3/4

memory

4 clock cycles

100% or 1

Allowing pages that are referenced actively to be loaded into memory → Demand Paging

A referenced page is not in memory → Page Fault

Adding more memory results in more page faults → Belady's Anomaly

When the memory is overcommitted → Thrashing

Pages that are referenced within the past T seconds → Working Set

For the following reference stream, what is the content of page 2 at the end of the reference stream under FIFO?

D

A

R

E

D

E

A

R

D

E

E

R

1

2

3

E

For the following reference stream, what is the content of page 2 at the end of the reference stream under MIN?

D

A

R

E

D

E

A

R

D

E

E

R

1

2

3

R

For the following reference stream, what is the content of page 2 at the end of the reference stream under LRU?

D

A

R

E

D

E

A

R

D

E

E

R

1

2

3

R

For the following reference stream, what is the content of page 2 at the end of the reference stream under LFU?  In the case of a tie, pick the memory page with the lowest number.

D

A

R

E

D

E

A

R

D

E

E

R

1

2

3

 

 

A

 

Converting between serial bit stream and a block of bytes → Device Controller

An OS component that hides the complexity of an I/O device → Device Driver

Making no distinction between device addresses and memory addresses → Memory-mapped I/O

A CPU repeatedly checks the status of a device → Polling

A device controller notifies the corresponding driver when the device is available → Interrupt-driven I/Os

Using an additional controller to perform data movements → Direct Memory Access

A keyboard is an example of... → Character Device

A disk is an example of... → Block Device

At a given moment, the disk head is at cylinder 46, and the queue contains block requests: 10, 40, 48, 52, 70.

If the driver uses the FIFO, which request will be serviced last?

70

At a given moment, the disk head is at cylinder 46, and the queue contains block requests: 10, 40, 48, 52, 70.

If the driver uses the SSTF, which request will be serviced last?  If there are multiple answers, pick the answer with the lowest block number.

10

At a given moment, the disk head is at cylinder 46, and the queue contains block requests: 10, 40, 48, 52, 70.

If the driver uses the SCAN (toward the high number first), which request will be serviced last?

10

At a given moment, the disk head is at cylinder 46, and the queue contains block requests: 10, 40, 48, 52, 70.

If the driver uses the C-SCAN , which request will be serviced last?

40