CSE 451

Operating Systems

Spring 1998


Quiz #1

Distributed :  4/7/98 (Tuesday)
Due            :  4/9/98 (Thurday -- in the begining of the Section)


Assume that we have a computer with four protection levels (or privilege modes) -- HIGH, MEDIUM, LOW or NONE. (An example of such a processor is the Pentium). At any instant of time the processor would be in one of the above protection levels, which is denoted by two bits in the processor, P1 and P0.

Depending on the current protection level, there are various restrictions on the access to various resources. For memory access the following rules apply:

Note: priv == [P1, P0] and HIGH == [1,1]; MEDIUM == [1,0]; LOW == [0,1]; NONE == [0,0]:

Also assume that the machine has a 32 bit address space with the  i th address bit represented as B[i]
So, whenever the program tries to access memory which it doesn't have permissions to, the processor should generate an exception (which would be caught by the operating system). The problem is to design the logic required to do this. The inputs to your design will be the address bits B[31]...B[0] and the privilege mode bits P1 and P0, and the output will be a bit indicating whether an exception indicating Protection Fault should be generated.

  1. Construct a boolean logic table that implements the addressing policy described above.
  2. What boolean formula is this ?
  3. Using AND and NOR gates, draw the circuit that implements the addressing policy.