Beruflich Dokumente
Kultur Dokumente
Lab notes
Course lectured by Prof. Gabriel Kuper Lab assist. Ilya Zaihrayeu http://www.dit.unitn.it/~ilya/os.htm
contiguous
linked indexed
Ilya Zaihrayeu Operating Systems Course
Ilya Zaihrayeu
File allocation strategies-2, contd A: a) Time to read a file = seek time + latency time + read time = 5 msec + 4 msec + 8 KB / (8 * 1024 KB / 1 * 1000 msec) 0.98 msec Therefore read + write = 2 * 0.98 msec = 1.96 msec b) Half of a 16-GB disk is 8 GB = 8 388 608 KB That is approximately 1 048 576 files. Each file takes 1.96 msec, thus the whole process will take about 2055 sec, i.e. about 34 min
Ilya Zaihrayeu Operating Systems Course
Free disk space management Q: Free disk space can be kept track of using a free list or a bit map. Disk addresses require D bits. For a disk with B blocks, F of which are free, state the condition under which the free list uses less space than the bit map. For D having the value 16 bits, express your answer as a percentage of the disk space that must be free.
Ilya Zaihrayeu Operating Systems Course
Free disk space management, contd A: The bit map requires B blocks, whereas the free list requires F*D bits. Thus the state when the free list uses less space than the bit map is F*D < B. The percentage of disk space free is given by the fraction F/B. F*D less than B becomes F/B less than 1/D. If D is 16, then this fraction is 1/16 or 6.25 percent
Ilya Zaihrayeu Operating Systems Course
In use free
0 1 0
1 1 0
2 0 0
3 1 0
4 0 2
5 1 0
6 2 0
7 1 0
8 1 0
9 10 11 12 13 14 15 0 0 1 1 1 0 0 1 1 0 1 0 1 1
Ilya Zaihrayeu