Homework Solution: A system has 232 bytes of physical memory and uses paging. Each page is 210 bytes and there are 216 bytes total in the virtual address spac…

    A system has 232 bytes of physical memory and uses paging. Each page is 210 bytes and there are 216 bytes total in the virtual address space. a) How many bits are in a virtual address? b) How many bytes are in a frame? c) How many bits in the real address specify the start address of the frame? 2. A computer uses virtual memory, using a new solid state drive (SSD) as space for paging. Refer to slides 68 and 69 from the content for class for week 2 in section “Virtual Memory (Paged)” . on this week’s content). In the case presented there, the hard disk drive (HDD) required 25 ms to read in a page, and a rate of 1 pf per 1000 references introduced a 250 × slow down. If the SSD offers a time of only 80 μs, what is the slow down in performance caused by 1 pf per 1000 references? (you are not concerned with dirty vs. clean pages) What is the maximum rate of page faults you can accept if you want no more than a 5% slowdown in execution using virtual memory? 3. When a running process experiences a page fault, the frame to hold the missing page can only come from those frames allocated to that process, not from frames used by any other process. The memory system chooses which frame to use using a simple first-in first-out technique. That is, the first time it must choose a frame to use to hold a page being loaded to resolve a page fault, it chooses the first frame it loaded originally. The second page fault then uses the now ‘oldest’ frame (the second one that had been loaded originally), and so on: the first frame (originally) loaded becomes the first frame ‘out’ (i.e., to be reused).Each page fault causes only the one missing page to be loaded. Now suppose a program is executing a straight, linear sequence of instructions that is 100 KB long. This process is allocated 20 frames when put into memory. How many page faults will there be to completely execute this sequence of instructions? BONUS problem: Finally, suppose the 100 KB block of instructions is a loop that repeats infinitely. How many page faults are there on the second iteration of the loop?

    Expert Answer

     
    1) Physical Address Space =232 B Page Size = 210 B

    A collocateification has 232 bytes of material fame and corrections paging. Each page is 210 bytes and there are 216 bytes sum in the potential discourse room. a) How abundant bits are in a potential discourse? b) How abundant bytes are in a fashion? c) How abundant bits in the developed discourse avow the begin discourse of the fashion?

    2. A computer corrections potential fame, using a odd cubic avow instigate (SSD) as room coercion paging. Refer to slides 68 and 69 from the pleasededed coercion collocate coercion week 2 in minority “Potential Fame (Paged)” . on this week’s pleaseded). In the predicament presented there, the impenetrable disk instigate (HDD) required 25 ms to learn in a page, and a reprimand of 1 pf per 1000 references introduced a 250 × unready down. If the SSD offers a period of singly 80 μs, what is the unready down in work caused by 1 pf per 1000 references? (you are referable restless with tiny vs. upright pages) What is the zenith reprimand of page errors you can sanction if you absence no past than a 5% unreadydown in effort using potential fame?

    3. When a present manner experiences a page error, the fashion to tarry the waste page can singly end from those fashions allocated to that manner, referable from fashions correctiond by any other manner. The fame collocateification appropriates which fashion to correction using a unadorned leading-in leading-out technique. That is, the leading period it must appropriate a fashion to correction to tarry a page substance loaded to contravene a page error, it appropriates the leading fashion it loaded originally. The prevent page error then corrections the now ‘oldest’ fashion (the prevent undivided that had been loaded originally), and so on: the leading fashion (originally) loaded becomes the leading fashion ‘out’ (i.e., to be reused).Each page error causes singly the undivided waste page to be loaded.

    Now assume a program is executing a direct, straight continuity of instructions that is 100 KB hanker. This manner is allocated 20 fashions when deposit into fame. How abundant page errors get there be to fully consummate this continuity of instructions?

    BONUS problem: Finally, assume the 100 KB stop of instructions is a loop that repeats infinitely. How abundant page errors are there on the prevent rereiteration of the loop?

    Expert Exculpation

     

    1) Material Discourse Room =232 B

    Page Dimension = 210 B

    Potential Discourse Room =216 B

    a) So, No. of bits in Potential Discourse = log2216 = 8

    b) Fashion Dimension =Page Dimension

    => No of Bytes in a fashion = 210 B

    c)

    No of fashions = Material Discourse Room/Fashion Dimension = 232/210 = 2

    Material Discourse in bits = No. of bits coercion fashions + No of bits coercion the fashion dimension = f + d

    = log22 + log2210

    = 1 + 8

    =9

    9  bits in the developed discourse avow the begin discourse of the fashion.