OS Process Scheduling Q & A #7



Question: Explain pseudo parallelism. Describe the process model that makes parallelism easier to deal with.

Answer: All modern computers can do many things at the same time. For Example computer can be reading from a disk and printing on a printer while running a user program. In a multiprogramming system, the CPU switches from program to program, running each program for a fraction of second.

Although the CPU is running only one program at any instant of time. As CPU speed is very high so it can work on several programs in a second. It gives user an illusion of parallelism i.e. several processes are being processed at the same time. This rapid switching back and forth of the CPU between programs gives the illusion of parallelism and is termed as pseudo parallelism. As it is extremely difficult to keep track of multiple, parallel activities, to make parallelism easier to deal with, the operating system designers have evolved a process model.

The process Model

In process model, all the run able software on the computer (including the operating system) is organized into a sequence of processes. A process is just an executing program and includes the current values of the program counter, registers and variables. Each process is considered to have its own virtual CPU. The real CPU switches back and forth from process to process. In order to track CPU switches from program to program, it is convenient/easier to think about a collection/number of processes running in (pseudo) parallel. The rapid switching back and forth is in reality, multiprogramming.

One Program Counter Process Switch

One program counter process switch

This figure shows multiprogramming of four programs.

Multiprogramming

Conceptual model of 4 independent sequential processes.

independent sequential processes

Only one program is active at any moment. The rate at which processes perform computation might not be uniform. However usually processes are not affected by the relative speeds of different processes.

os_exams_questions_answers.htm
Advertisements