|
|
Processor Model
Understanding how an operating system works is a lot easier when one has a clear grasp of how a computer (processor) works. In this section we present a model of a processor. In particular we focus on how the computer executes instructions one at a time and the implications of this process on operating system design. Remember, we cannot describe how every real processor works (e.g. the Intel processor family), so we must instead provide a functional mental model that describes in principle how every processor works. Thus, our model will not be precisely accurate for any particular real processor, but it will be functional in terms of what is expected of real processors. Instruction ExecutionAll processors of the type we discuss here (so called von Neumann processors) are quite simple in principle. Their sole function is to execute individual instructions one at a time as they appear in sequence in a program. Remember the following things.
So, let's assume that we have this all straight from now on. The processor simply performs the task for which it was designed--executing machine language instructions one at a time in sequence--without any awareness of the programs being executed. The Instruction Fetch and Execute CycleWe refer to the hardware circuitry that performs this repetitive process of executing individual instructions sequentially as the instruction fetch and execute cycle. We illustrate this process in the following diagram.
Instruction Fetch and Execute Cycle
Once again, it is important to note that in this view of instruction execution, the processor has no awareness of which program an instruction belongs to. It could be executing instructions in the operating system or in a user program (e.g. a word processing program). It doesn't know and doesn't care. |
|
|