![multi processing operating system examples multi processing operating system examples](https://www.tutorialspoint.com/operating_system/images/user_threads.jpg)
![multi processing operating system examples multi processing operating system examples](https://digitalthinkerhelp.com/wp-content/uploads/2020/11/Multiprogramming.jpg)
To avoid situations like this and come up with efficient utilization of CPU, the concept of multi programming came up. It cannot happen that one job is using the CPU for say 1 hour while the others have been waiting in the queue for 5 hours.This poses a very serious problem that even though other jobs are ready to execute, CPU is not allocated to them as the CPU is allocated to a job which is not even utilizing it (as it is busy in I/O tasks). Also, other jobs which are waiting to be executed might not get a chance to execute because the CPU is still allocated to the earlier job. Now it has a drawback that the CPU remains idle for a very long period of time.The CPU keeps waiting and waiting until this job (which was executing earlier) comes back and resumes its execution with the CPU. In a non multi programmed system, As soon as one job leaves the CPU and goes for some other task (say I/O ), the CPU becomes idle.The processor executes one job until it is interrupted by some external factor or it goes for an I/O task. This job pool consists of all those processes awaiting allocation of main memory and CPU.ĬPU selects one job out of all these waiting jobs, brings it from the job pool to main memory and starts executing it. Thus, these processes are initially kept in an area called job pool. Now the main memory is too small to accommodate all of these processes or jobs into it. they are waiting when the CPU will be allocated to them and they begin their execution. In a computer system, there are multiple processes waiting to be executed, i.e. One of the most important aspects of an Operating System is to multi program. Now it is the responsibility of the Operating System to manage all the processes effectively and efficiently. In a modern computing system, there are usually several concurrent application processes which want to execute. Multithreading is an extension of multitasking.Multitasking – Tasks sharing a common resource (like 1 CPU).Multiprocessing – A computer using more than one CPU at a time.Multiprogramming – A computer running more than one program at a time (like running Excel and Firefox simultaneously).