Overview:

A process is an executing program, including the current values of the program counter, registers, and variables.The subtle difference between a process and a program is that the program is a group of instructions whereas the process is the activity.

In multi-programming systems, processes are performed in a pseudo-parallelism as if each process has its own processor. In fact, there is only one processor but it switches back and forth from process to process.
Henceforth, by saying execution of a process, we mean the processor’s operations on the process like changing its variables, etc. and I/O work means the interaction of the process with the I/O operations like reading something or writing to somewhere. They may also be named as “processor (CPU) burst” and “I/O burst” respectively.

According to these definitions, we classify programs as

  • Processor-bound program: A program having long processor bursts (execution
    instants).
  • I/O-bound program: A program having short processor bursts.
    Assume we have two processes A and B. Both execute for 1 second and do some I/O work
    for 1 second. This pattern is repeated 3 times for process A and 2 times for process B.If we have no multi programming, the processes are executed sequentially as below.

processor-executes

So, the processor executes these two processes in a total time of 10 seconds. However, it is idle at I/O instants of processes. So, it is idle for 5 seconds and utilized for 5 seconds. Then the processor utilization is (5/10)*100=50%

Now let’s consider multi programming case:
multiprogramming

In this case, when process A passes to some I/O work (i.e. does not use the processor), processor utilizes its time to execute process B instead of being idle. Here the processor utilization is (5/6)*100=83%

Share with : Share on Linkedin Share on Twitter Share on WhatsApp Share on Facebook