Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following process model with two suspend states. (a) Briefly descri

ID: 3839654 • Letter: C

Question

Consider the following process model with two suspend states. (a) Briefly describe the Blocked and Ready/suspend states. (b) Give an example on each transition of state from Running state to Blocked state and then to Blocked/suspend state. (c) Why are two modes (user and kernel) needed in modern operating system? (d) Consider a computer with N processors in a multiprocessor configuration. (i) How many processes can be executed in each of the Ready, Running, and Blocked states at one time? Justify your answer. (ii) What is the minimum number of processes that can be executed in each of the Ready, Running, and Blocked states at one time? Justify your answer.

Explanation / Answer

Answer:

Blocked states:

contains the processes which are in main memory and awaiting an event occurrence.

Suspend: contains the processes which are in secondary memory and awaiting an event occurrence.

Ready:

contains the processes which are newly coming for execution.

Suspend: contains the processses which are is in secondary memory but is available for execution as soon as it is loaded into main memory.

2Answer:

Since the system needs to distinguish the suspended processes that remain blocked and those that are though suspended and residing in secondary memory but are available for execution as soon as they are loaded into main memory.Accordingly, two Suspend may move from Blocked /Suspend to Ready/Suspend , are introduced. A process may move from Blocked/Suspend to Ready/Suspend when the event for which it has been waiting happens. All processes in either states may be brought back into main memory.

3Answer:

Kernel mode:

Processes in kernel mode can access both:kernel and user addresses.

Kernel mode allows unrestricted access to hardware including execution of privileged instructions.

various instructions ( such as I/O instructions and halt instructions) are privileged and can be executed only in kernel mode.

A system call from a user program leads to a sswitch to kernel mode.

User mode:

Processes in user mode can access their own instructions and data but not kernel instructions and data(or those of other processes).

When the computer system is executing on behalf of a user application, The sytem is in user mode. However ,when a user application requests a service from the operating system, the system must transition from user to kernel mode to fulfill the request.

d Answer:)

I)

Ready:

N number of process executed besed on based on process scheduling algorithams . The process is waiting to be assigned to a processor.Ready processes are waiting to have3 the processor allocated to them by the operating system so that they can run . Process may interrupted by the scheduler to assign CPU to some other process.

Running:

Once the process has been assigned to a processor by the OS scheduler, the process state is set to running and the processor executes its instructions.

Blocked state:

Processes that are not running are kept in queue, waiting for their turn to execute.

II Answer):

the minimum number of processes are executed are 1 .