- -> The concept of an operating system as primarily providing abstractions to application programs is a top-down view.
- -> An alternative, bottom-up, view holds that the operating system is there to manage all the pieces of a complex system.
- -> Modern computers consist of processors, memories, timers, disks, mice, network interfaces, printers, and a wide variety of other devices.
- -> In the bottom-up view, the job of the operating system is to provide for an orderly and controlled allocation of the processors, memories, and I/O devices among the various programs wanting them.
- -> Modern operating systems allow multiple programs to be in memory and run at the same time. Imagine what would happen if three programs running on some computer all tried to print their output simultaneously on the same printer.
- -> When one program is finished, the operating system can then copy its output from the disk file where it has been stored for the printer, while at the same time the other program can continue generating more output, oblivious to the fact that the output is not really going to the printer (yet).
- -> When a computer (or network) has more than one user, the need for managing and protecting the memory, I/O devices, and other resources is even more since the users might otherwise interfere with one another.
- -> In short, this view of the operating system holds that its primary task is to keep track of which programs are using which resource, to grant resource requests, to account for usage, and to mediate conflicting requests from different programs and users.
- -> Resource management includes multiplexing (sharing) resources in two different ways: in time and in space.
Time Multiplexed
- -> When a resource is time multiplexed, different programs or users take turns using it. First one of them gets to use the resource, then another, and so on.
- -> For example, with only one CPU and multiple programs that want to run on it, the operating system first allocates the CPU to one program, then, after it has run long enough, another program gets to use the CPU, then another, and then eventually the first one again.
- -> Determining how the resource is timemultiplexed—who goes next and for how long—is the task of the operating system.
Space Multiplexed
- -> The other kind of multiplexing is space multiplexing. Instead of the customers taking turns, each one gets part of the resource.
- -> For example, main memory is normally divided up among several running programs, so each one can be resident at the same time (for example, in order to take turns using the CPU).
- -> Assuming there is enough memory to hold multiple programs, it is more efficient to hold several programs in memory at once rather than give one of them all of it, especially if it only needs a small fraction of the total.
- -> In many systems a single disk can hold files from many users at the same time.
Post a Comment