Professional Documents
Culture Documents
Multi-Programming Operating System - Easy Explaination Using Animation
Multi-Programming Operating System - Easy Explaination Using Animation
Animation
Why Multi-Programming?
Multi-programming operating system as we have seen in previous video early operating
systems would execute one program at a time one program was loaded into the RAM that is
main memory and the CPU would execute it until the program is executed completely no
other program was executed the problem behind this was when a program required some
input/output operation or some other operation or it requires to access some file it would
move out of the CPU for that particular operation so when that would happen CPU remained
idle and CPU utilization was very low.
For process one CPU will start the execution let's say p1 does not require to go out
for any operation so CPU will execute p1 completely as p1 is executed it will be
removed from the main memory
now operating system will allocate CPU for process 2 CPU will start its execution let's say p2
requires some input/output operation the CPU will stop the execution for p2 p2 will go out of
CPU for the operation
now the CPU will not wait for p2 to finish its operation operating system will allocate process
3 to the CPU and CPU will start the execution on p3 and will execute p3 until p2 comes back
once p2 comes back it will stop execution of p3 and start executing p2 and after executing p2
completely it will go for p3 and execute p3 completely
this way CPU never remains idle until it completes all processes and this is how multi
programming works and overcomes the problem of low CPU utilization
Advantages
Dis-advantages