Information Technology Reference
In-Depth Information
Exercises
5. Define three styles of switching from user-mode to kernel-mode, and four
styles of switching from kernel-mode to user-mode.
6. A typical hardware architecture provides an instruction called return from
interrupt, abbreviated by something like iret. This instruction switches
the mode of operation from kernel-mode to user-mode. This instruction
is usually only available while the machine is running in kernel-mode.
a. Explain where in the operating system this instruction would be used.
b. Explain what happens if an application program executes this in-
struction.
7. A hardware designer argues that there are enough transistors on the chip
to provide 1024 integer registers and 512 floating point registers, so that
the compiler almost never needs to store anything on the stack. You have
been invited as the operating system guru to give an opinion on the new
design.
a. What is the effect of having such a large number of registers on the
operating system?
b. What additional hardware features you would recommend adding to
the design above?
c. What happens if the hardware designer also wants to add a 16-station
pipeline into the CPU, with precise exceptions. How would that affect
the user-kernel switching overhead?
2.4
Case Study:
Booting an operating system
kernel
When a computer initially starts, it sets the machine's program counter to start
executing at a pre-determined position in memory. As the computer has not
started running at this point, the initial machine instructions must be ready
to be fetched and executed immediately when the power is turned on. For
this, systems typically use a special read-only hardware memory (Boot ROM )
Definition: Boot ROM
to store these boot instructions. On most x86 personal computers, the boot
program is called the BIOS, for \Basic Input/Output System".
What does the BIOS need to do? We could try to store the machine instruc-
tions for the entire operating system in ROM, but this has several drawbacks.
Search WWH ::




Custom Search