Section 11.6: OS modes and instructions (Frame 1)                     [     ][home][next]

At this stage you should be wondering how these special registers, the base address register and the field length register, get set. In the IBM world, how do the memory keys get changed? It is not enough to say that the operating system somehow does it, because the operating system is just another program, using the same ALU and the same instruction set as user programs, right?

Well, not exactly. True, the operating system is just a program, but it does have access to more instructions than user programs. In order to make multiprogramming work, the hardware must have at least two operating modes:

privileged mode Special instructions can be done while in this mode, so only OS code can run in privileged mode. Certain registers that cannot be read or written in user mode can be changed by the OS while in this mode.
user mode User programs operate in this unprivileged state. They cannot change the base address or field length registers, nor can they send signals to I/O controllers. They cannot execute certain other instructions, especially HALT.