VM Practice =========== 1. False: If the offsets differ then there is no way two segments can access the same portion of physical memory. True: With different offset, the virtual address segments can point to the same physical address. True: If configured properly, virtual address can be mapped to any address as long as it is in the range of the base address + offset bits. 2. 0xc5202000 0xbebeebee 3. tlb misses 3 (0x500, 0x200000, 0x300000) page faults 2 (0x200000, 0x300000) 4. 4.1. 2^6 entries 4.2. 2^10 entries 4.3. 2^16 bytes = 64kB 4.4. 2^32/2^16 = 2^16 pages 5. FIFO 6 page faults LRU 7 page faults FS practice =========== 1. 1.1. 20 GB/disk. 10 platters/disk * 4096 tracks/platter * 1024 sectors/track * 512 bytes/sector = 10*4*1024*1024*512 = 40*1MB*512 = 40*.5GB = 20 GB. 1.2. 100MB/second. First note that 12,000 RPM = 200 rotations per second (or one rotation per 5 ms). In a single rotation, we can read an entire track. A track consists of 512 bytes/sector * 1024 sectors = 0.5 MB. So the sequential transfer bandwidth is 200 rotations/second * 0.5 MB/rotation = 100 MB/second. Because the track-to-track seek time and the I/O bus overhead are both modeled as negligible, 100 MB/second is our answer 1.3. Answer: roughly 67 kbits/second. First note that in one read, we get 512 bytes. What is the time to issue this read? The disk incurs seek delay and rotational delay. The average seek latency is 1 + (1/3).003 * 4000 = 5 ms. After the disk head reaches the desired track, the disk has to wait until the desired sector rotates under the disk head. Since the sector could be anywhere on the track, ranging from right under the head to the most pessimal position, the average rotational delay is 2.5 ms (half of the 5 ms per rotation). So the total delay on average is 7.5 ms. Our total effective bandwidth, then, is 512 bytes / 7.5 ms, which is approx 512*130 bytes/second, which is 66,560 bits/second = 66.6 kbits/sec. Using the hint, R = 512, X = 7.5ms, etc. 2 2.1. 1024*8 + 1024*(1024/8) = 2^13 + 2^18 = 270336 In indirect block pointer, it can contain 1024/4 pointers, each with 1024 bytes data and for direct block we get 1024*8 bytes. 2.2 (2^13 + 2^18)/2^4 = 2^9 + 2^14 = 16896 Each directory entry is 16 bytes. So, max. file size/16 bytes.