CS计算机代考程序代写 cache Instruc!ons

Instruc!ons
The following ques!ons cover basic calcula!ons from the on-line lecture of Tuesday, March 30th: disk capacity, random performance, and disk scheduling costs.
For links to the videos, handwri”en notes, and disk simulator see the announcement. Tradi!onal slides covering this material are on the schedule page (as usual). You may also want to consult the OSTEP book.
You can work with others and take the quiz as many !mes as needed.
A”empt History
A”empt KEPT A”empt 4
LATEST A”empt 4 A”empt 3 A”empt 2 A”empt 1
Take the Quiz Again
Time
less than 1 minute less than 1 minute less than 1 minute 6 minutes
4 minutes
Score
11 out of 11 11 out of 11 0 out of 11 8 out of 11 1 out of 11
” Correct answers are hidden.
Score for this a”empt: 11 out of 11 Submi”ed Apr 9 at 8:37pm
This a”empt took less than 1 minute.
Ques!on 1
4 / 4 pts
Consider a disk with the following characteris!cs: Number of surfaces: 8 (= 23)
Number of tracks / surface: 512 K (= 219) Number of bytes / track: 8 MB (= 223 bytes) Number of sectors / track: 8 K (= 213) On-disk cache: 16 MB (= 224 bytes)
Remember, 210 bytes = 1 KB, 220 bytes = 1 MB, 230 bytes = 1GB, 240 bytes = 1TB
How many disk heads does this disk have?
8
What is the size of each sector?
How many bytes per cylinder?
What is the total capacity of this disk?
Answer 1:
8
Answer 2:
1024
Answer 3:
64
Answer 4:
32
32
(in bytes) (in MB)
(in TB)
1024 64
Ques!on 2
4 / 4 pts
Assume the disk head is at cylinder 18 and moving towards higher cylinders. Assume a stream of requests arrives for the following cylinders:
5, 20, 1, 60, 3, 8, 90, 2, 20, 40, 6, 70
With a FCFS scheduling policy, what is the total seek distance to service all
requests?
474
110
distance?
With a C-SCAN scheduling policy (uni-direc!onal scanning), what is the total seek
168
Answer 1:
474
Answer 2:
110
Answer 3:
161
Answer 4:
168
With a SSTF scheduling policy, what is the total seek distance?
With a SCAN scheduling policy (bi-direc!onal scanning), what is the total seek
161
distance?
Ques!on 3
3 / 3 pts
Assume a disk with the following characteris!cs:
Capacity
RPM
Avg Seek Max Transfer Pla”ers
Cache
1 TB
7,200
9 ms
105 MB/s 4
32 MB
How long does it take, on average, to rotate to a random disk sector? (2 significant
4.1 (in ms)
digits)
Ignoring transfer !me, how long does it take to seek and rotate to a random disk
13.1 (in ms) 1.2 (MB/s)
sector? (3 significant digits)
Assuming 16KB random reads, what throughput can you expect from this HDD? (2
significant digits)
Answer 1:
4.1
Answer 2:
13.1
Answer 3:
1.2