1. The Intel 8086 processor does not support virtual memory. Nevertheless, some companies previously sold systems that contained an unmodified 8086 CPU and do paging. Make an educated guess as to how they did it. (Hint: think about the logical location of the MMU).

  2. The purpose of the MMU is to translate memory references caused by machine code instructions from virtual addresses to real addresses.  Hence, the logical location of the MMU is between the CPU and the memory.  In particular, this means that the MMU does not need to be part of the CPU - it can simply sit on the system bus between the CPU and memory, and provide translation facilities.

  1. Why are page sizes always powers of 2?

  2. The bytes within a page are addressed using the last N bits of a virtual address, for some value of N.  Since the number of addresses that can be expressed with N bits is 2N, the page size is a power of
     

  3. Consider a logical address space of eight pages of 1024 words each, mapped onto a physical memory of 32 frames.
    1. How many bits are there in the logical address?
    2. How many bits are there in the physical address?

    Addressing within a 1024-word page requires 10 bits because 1024 = 210.  Since the logical address space consists of 8 = 23 pages, the logical addresses must be 10+3 = 13 bits.  Similarly, since there are 32 = 25 physical pages, phyiscal addresses are 5 + 10 = 15 bits long.
     
    Physical Address (P = page number bits)
P P P P P - - - - - - - - - -
 
Logical Address  (P = page number bits)
P P P - - - - - - - - - -
 
 
  1. Consider a base & bounds-based system where a program can be separated into two parts: code and data. The CPU knows whether it wants an instruction (instruction fetch) or data (data fetch or store). Therefore, two base & bounds register pairs are provided: one for instructions and one for data. The instruction base & bounds register pair is automatically read-only, so a program's code can be shared among different users. Discuss the advantages and disadvantages of this scheme.

  2. This scheme is somewhere between the simple base-bounds system and a segmented system in terms.  Hence, it shares advantages and disadvantages with both systems:

    PROS


    CONS