CSE120  Problem Set 3 for Discussion Section - Oct 25th


From chapter 3 of text book
 

Problem 1:

The probability that all four processes are idle (blocked for I/O) is 1/16. So, cpu idle time is 1/16.

Problem 3:

Initially, we have 3-way multiprogramming. With 1M more RAM, the degree of multiprogramming can be 5. The idle time decreases from 0.6x0.6x0.6 to 0.6x0.6x0.6x0.6x0.6 -- the thruput goes up from 0.79 to 0.92, an increase of 16%

Problem 4:

From the unused memory rule, the fraction of memory in holes is 0.4/2.4 = 1/6 Hence we have 167K in holes and 833K of used memory. It takes 416.5 msec to copy this (compact by copying) which is 41.6% of cpu time spent on compacting.

Problem 7:

Physical addresses refer to real memory locations and the memory subsystem responds to physical addresse on the bus. Virtual addresses are logical addresses generated by a process and refer to its address space. On a machine with 32 bit addressing, virtual addresses can be upto 4 giga regardless of the actual RAM size on the machine.

Problem 8:

(a) 8212 (b) 4100 (c) 24684

Problem 11:

The page table has (2**32/2**13)=2**19 entries, that is, 524,288 entries. Loading the page table takes 52 msec and if a process gets 100msec, the break up is 52 for loading page table and 48 for process running. 52% of the time is spent in page table loading.

Problem 12:

12 bit offset -- 4K (4096) size page. (11+9)=20 bits for page number -- 1M pages.

Problem 13:

The reference string is 1, 12, 2, 15, 2, 15, 10, 10, 15, 10 positions 1, 3, 5, 7, 8 and 10 are instruction references and the rest are data references.