An operating system provides the environment within which programs are executed.  Internally, operating systems vary greatly in their makeup, since they are organized along many different lines. 
One of the most important aspects of operating systems is the ability to multiprogram.  A single program cannot, in general, keep either the CPU or the I/O devices busy at all times.  Single users frequently have multiple programs running.  Multiprogramming increases CPUutilization by organizing jobs (code and data) so that the CPU always has one to execute.  The idea is as follows: The operating system keeps several jobs in memory simultaneously.  Since, in general, main memory is too small to accommodate all jobs, the jobs are kept initially on the disk in the job pool.  This pool consists of all processes residing on disk awaiting allocation of main memory.  The set of jobs in memory can be a subset of the jobs kept in the job pool.  The operating system picks and begins to execute one of the jobs in memory.  Eventually, the job may have to wait for some task, such as an I/O operation, to complete.  In a non-multiprogrammed system, the CPU would sit idle.  In a multiprogrammed system, the operating system simply switches to, and executes, another job.  When that job needs to wait, the CPU switches to another job, and so on.  Eventually, the first job finishes waiting and gets the CPU back.  As long as at least one job needs to execute, the CPU is never idle.  This idea is common in other life situations.




WED JUN 20 2018

The Computer System


Diagram of the Computer System