Answers for
Homework 2
- No I/O devices to input data and output
results.
- It is possible to use a software-based
solution for such a protection scheme.
You can develop a program to implement such function and
add this function into the operating system. Every time
you access a memory, the OS will check whether it is
unauthorized. The disadvantage of such implementation is
that the system will switch between user mode and kernel
mode frequently. The running of checking program will
also occupy the CPU time of a user program. All these
lower the efficiency of the system greatly.
- Interrupt is an asynchronous event caused
by peripheral devices. It is manly implemented by
hardware, So it wont occupy the CPU time and
consume system resources. Only when an interrupt
happened, CPU stops what it is doing and spends a little
time on it.
The alternative is polling, That means the OS will check
every device frequently. This will consume a lot of CPU
time and reduce the efficiency greatly.
- The cache between CPU and main memory. The
cache between CPU and peripheral device.
The cache speeds up the memory access time greatly.
The disadvantage is the limit size and high price.
- (1) large space
(2) low price
NOTE: The answer is just for reference. If you
have any question about it, please email me at nxz5371@megahertz.njit.edu