Section 11.5
Review Questions
Protection
-
In a system that uses base+offset run-time memory relocation, why is it
impossible for an errant program to hurt memory another program that is
"downwind" of it (resides in lower memory)?
answer...
because offsets are not negative, only positive
-
How is the IBM key-protection mechanism more flexible than the base+offset
method?
answer...
a program can be broken up into several non-contiguous chunks and located
in any free frames of memory, also we do not have to compact memory
-
And how is the key-protection mechanism less flexible than base+offset?
answer...
it has an upper limit on the number of jobs that be active in a system
at any time
-
The following picture shows three programs in memory in a system that uses
key-protection. Circle the operations below that will result in errors.
A reads memory cell 13000
B reads memory cell 13000
C writes memory cell 20480
OS writes memory cell 25000
A writes memory cell 1024
A read cell 29000
answer...
*A reads memory cell 13000
B reads memory cell 13000
*C writes memory cell 20480
OS writes memory cell 25000
*A writes memory cell 1024
A read cell 29000
* will cause error
-
The following picture shows three programs in memory in a system that uses
base+offset protection. Below circle which operations, caused by which jobs,
will result in errors. Be careful! Don't be fooled by the fact that the
virtual addresses which programs use start at 0!
A reads memory cell 2500
A reads memory cell 500
B reads memory cell 3801
C writes memory cell 0
OS writes memory cell 4730
A writes memory cell 0
B reads memory cell 0
B reads memory cell 3600
answer...
*A reads memory cell 2500
A reads memory cell 500
*B reads memory cell 3801
C writes memory cell 0
OS writes memory cell 4730
A writes memory cell 0
B reads memory cell 0
*B reads memory cell 3600
* will cause error
-
What adjective do we use when all of a program's memory cells are in the
same area of physical memory, as they must be in a system that uses
base+offset relocation?
answer...
contiguous
-
In the following diagram of the hardware that base+offset systems use,
put + into one of the circles and - into the other.
answer...
-
What is the subtractor used for in the base+offset hardware?
answer...
to compare the logical address to see if it is greater than the field
length
-
Why do the virtual addresses of a base+offset system start at 0?
answer...
it is easier and more uniform, and the virtual addresses can be smaller
in the instructions
-
Suppose that in a base+offset system, the field length register was
replaced by one that contained the ending address, as in the picture below.
Why is such a system not used?
answer...
because the comparison between the field length and logical address
would have to wait until the logical address was translated into a physical
address. As it is now, the comparison can happen simultaneously with the
translation, thereby speeding up the address translation process.