While multiprogrammed systems used resources more efficiently i.e. minimized CPU idle time, a user could not interact with a program. By having the CPU switch between jobs at relatively short intervals, we can obtain an interactive system.That is, a system in which a number of users are sharing the CPU (or other critical resource) with a timing interval small enough not to be noticed e.g. no more than 1 second. We say that a time-sharing system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared computer.
- Switch between jobs so frequently that get appearance of dedicated machines for each user/process.
- New OS Functionality: More complex job scheduling, memory management, concurrency control and synchronization
- Users easily submit jobs and get immediate feedbacks
OS Features Needed for Multiprogramming:
- I/O routines supplied by system
- Memory management system must allocate memory to several jobs
- CPU scheduling system must choose among several jobs ready to run
- Allocation of devices
Time-Sharing Systems Interactive Computing:
- The CPU multiplexed among several jobs in memory and on disk (CPU allocated only to jobs in memory). The CPU switches to the next job that can be run whenever the current job enters a wait state or after the current job has used a standard unit of time.When viewed over a relatively long time frame, we obtain the appearance that the CPU is simultaneously running multiple programs.
- Job swapped in and out of memory to disk. If the time-sharing computer does not have enough semiconductor memory installed to hold all of the desired programs, then a backing store must be used to temporarily hold the contents relating to some programs when other programs are present in semiconductor memory. In effect, we are now ``memory sharing'' between competing users (programs). This idea leads to a mechanism called virtual memory.
- On-line communication between user and system provided; when OS finishes execution of a command, it awaits next ``control statement'' from user.
The sensible sharing of resources such as CPU time and memory must be handled by the operating system, which is just another program running on the computer. For this control program to always be in control, we require that it never be blocked from running. The operating system, which might in fact be organized like a small number of cooperating programs, will lock itself into memory and then control CPU allocation priority in order that it never be blocked from running.
2004-05-25