Hardware Reference
In-Depth Information
Operating system machine level
Level 3
Operating system
Level 2
Instruction set architecture level
Microprogram or hardware
Level 1
Microarchitecture level
Figure 6-1. Positioning of the operating system machine level.
instruction step by step. However, when a program executes an ISA-level instruc-
tion, it is carried out directly by the underlying microarchitecture level, without
any assistance from the operating system.
In this topic we can provide only the briefest of introductions to the subject of
operating systems. We will focus on three topics of importance. The first is virtual
memory, a technique provided by many modern operating systems to make the ma-
chine appear to have more memory than it in reality has. The second is file I/O, a
higher-level concept than the I/O instructions that we studied in the preceding
chapter. The third topic is parallel processing—how multiple processes can ex-
ecute, communicate, and synchronize. The concept of a process is an important
one, and we will describe it in detail later in this chapter. For the time being, a
process can be thought of as a running program together with all its state infor-
mation (memory, registers, program counter, I/O status, and so on). After dis-
cussing these principles in general, we will show how they apply to the operating
systems of two of our example machines, the Core i7 (running Windows 7) and the
OMAP4430 ARM CPU (running Linux). Since the ATmega168 microcontroller is
normally used for embedded systems, it does not have an operating system.
6.1 VIRTUAL MEMORY
In the early days of computers, memories were small and expensive. The IBM
650, the leading scientific computer of its day (late 1950s), had only 2000 words of
memory. One of the first ALGOL 60 compilers was written for a computer with
only 1024 words of memory. An early timesharing system ran quite well on a
PDP-1 with a total memory size of only 4096 18-bit words for the operating sys-
tem and user programs combined. In those days the programmer spent a lot of
time trying to squeeze programs into the tiny memory. Often it was necessary to
use an algorithm that ran a great deal slower than another, better algorithm simply
because the better algorithm was too big—that is, a program using the better algo-
rithm could not be squeezed into the computer's memory.
 
 
Search WWH ::




Custom Search