Problem 1: Correct Gantt diagram: arrival: a b c time : 0123456789012345678901234567890123456789 queue 0: aaaa bbbbccc cc queue 1: aa aa bbbbbbbbaaaaaaaa queue 2: bbaaaaa turnaround: a: 40 b: 29 c: 9 wait: a: 19 b: 15 c: 2 ----------------------------------------------------- wrong understanding of the Round Robing Policy (added for info about computing turnaround and wait) non-renewable budget per queue. This is not in line with a Round Robin policy for the two first queues. It is shown here just to give the resulting turnaround and wait times. arrival: a b c time : 0123456789012345678901234567890123456789 queue 0: aaaa bbbbccc c queue 1: aa aa bbbbbbbbaaaac queue 2: bbaaaaaaaaa turnaround: a: 40 b: 24 c: 20 wait: a: 19 b: 10 c: 13 ---------------------------------------------------- Mechanism: A good explanation will involve: timer, interrupt, service routine, context switch. Starvation is possible: If Pa and Pb repeated infinitely bursts of 3 and waits of 2 while Pc had a burst of 5, then Pc would starve. Problem 2: 1. See course. Size. Permissions/ACL. Timestamps (e.g., last modification). 2. Logical blocks are 2^11B. With 32 bits pointers one can address 2^32 logical blocks, amounting to a maximum of 2^32 x 2^11 B = 2^43 B = 8TiB. 3. Disk is 1TiB=2^40B. Hence, 2^40/2^11 logical blocks, which amounts to 2^29 blocks, with 1 bit per block, we get 2^26B for the bitmap. 4. 12 x 2^11B + (1 x (2^11/2^2) x 2^11) + (1 x (2^11/2^2)^2 x 2^11) + (1 x (2^11/2^2)^3 x 2^11) ~ 2^38B 5. Random access. Overhead. Corruption. 6. External fragmentation. Access time. Overhead. Problem 3: 1. external fragmentation. 2. a. check paging in course. 2. b. 0x113 -> 0xC513(142423 oct = 50451 dec), invalid 0x8F0 -> 0x45F0(42760 oct = 17904 dec, 0xBFF0(137760 oct = 49136 dec) 2. c. 0x2A --> 0x200(1000 oct = 512 dec) 0xC00(6000 oct = 3072 dec) 0x0A --> 0xF00(7400 oct = 3840 dec) 0x500(2400 oct = 1280 dec) 0xC0 --> 0x500(2400 oct = 1280 dec) 0xD00(6400 oct = 3328 dec) 0xC4 --> 0x900(4400 oct = 2304 dec) 0x700(3400 oct = 1792 dec) Problem 4 1. left as an exercise. Be aware of the setuid bit. 2. Modifying and running an executable owned by root with setuid on is powerful.