07-22-2010, 06:38 AM
IDEA SOLUTION
(1) Calculate the swap out + swap in time of a process which has 2MB of size having transfer rate of 10MB/sec and whose average latency is 20ms.
(Answer)
swap out time = process size / transfer rate
net swap out time= latency time swap out time
and then
swap out + swap in = net swap out time + net swap out time
by using this method my answer is
swap out + swap in = 440 ms
(2) The logical address space of the process is 16 pages and the size of each page is 2 Kb. There are 128 frames in the main memory. The size of a frame is equivalent to the size of a page. With the given information, answer the following questions:
• Calculate the size of Logical Address?
• Find the size of the Logical Memory?
• Calculate the size of Physical Address?
• Find the size of the Physical Memory?
(Answer)
Size of logical address= |p| + |d|=15 bits
Size of logical memory= No. of pages * page size= 64
Size of physical address= |f|+ |d|=18 bits
Size of physical memory= No. of frames * size of each frame= 256
(3) Consider a 64-bit linear address having 16k page size. Calculate maximum number of pages in a process address space, number of bits needed for d and for p.
(Answer)
Logical address = 64-bit
Page size = 16 k
Maximum pages in a process address space = 2^16 / 16k = 4
No. of bits needed for d =|d| = log 2 4k = 12 bits
No. of bits needed for p = |p|= 16 – 12 = 3 bits
