Page 127 - DCAP403_Operating System
P. 127
Operating System
Notes that are being used. Memory is often used as a shorter synonym for random access memory
(RAM). This kind of memory is located on one or more microchips that are physically close to the
microprocessor in the computer. Most desktop and notebook computers sold today include at
least 16 megabytes of RAM, and are upgradeable to include more. The more RAM you have, the
less frequently the computer has to access instructions and data from the more slowly accessed
hard disk form of storage.
Memory is sometimes distinguished from storage, or the physical medium that holds the much
larger amounts of data that won’t fit into RAM and may not be immediately needed there.
Storage devices include hard disks, floppy disks, CD-ROM, and tape backup systems. The terms
auxiliary storage, auxiliary memory, and secondary memory have also been used for this kind
of data repository.
Additional kinds of integrated and quickly accessible memory are read-only memory (ROM),
programmable ROM (PROM), erasable programmable ROM (EPROM). These are used to keep
special programs and data, such as the basic input/output system, that need to be in the computer
all the time.
The memory is a resource that needs to be managed carefully. Most computers have a memory
hierarchy, with a small amount of very fast, expensive, volatile cache memory, some number of
megabytes of medium-speed, medium-price, volatile main memory (RAM), and hundreds of
thousands of megabytes of slow, cheap, non-volatile disk storage. It is the job of the operating
system to coordinate how these memories are used.
7.1 Memory Management
In addition to the responsibility of managing processes, the operating system must effi ciently
manage the primary memory of the computer. The part of the operating system which handles
this responsibility is called the memory manager. Since every process must have some amount
of primary memory in order to execute, the performance of the memory manager is crucial to
the performance of the entire system. The memory manager is responsible for allocating primary
memory to processes and for assisting the programmer in loading and storing the contents of the
primary memory. Managing the sharing of primary memory and minimizing memory access
time are the basic goals of the memory manager.
When an operating system manages the computer’s memory, there are two broad tasks to be
accomplished:
1. Each process must have enough memory in which to execute, and it can neither run into
the memory space of another process nor be run into by another process.
2. The different types of memory in the system must be used properly so that each process
can run most effectively.
The first task requires the operating system to set up memory boundaries for types of software
and for individual applications.
Example: Let’s look at an imaginary small system with 1 megabyte (1,000 kilobytes) of
RAM. During the boot process, the operating system of our imaginary computer is designed
to go to the top of available memory and then “back up” far enough to meet the needs of the
operating system itself. Let’s say that the operating system needs 300 kilobytes to run. Now, the
operating system goes to the bottom of the pool of RAM and starts building up with the various
driver software required to control the hardware subsystems of the computer. In our imaginary
computer, the drivers take up 200 kilobytes. So after getting the operating system completely
loaded, there are 500 kilobytes remaining for application processes.
120 LOVELY PROFESSIONAL UNIVERSITY