All Exams Test series for 1 year @ ₹349 only
Question

A process residing in main memory and ready and waiting for execution, is kept on

The correct answer is

Ready Queue

Understanding Process States and Queues in Operating Systems

In an operating system, a process goes through various states during its lifetime. These states typically include New, Ready, Running, Waiting (or Blocked), and Terminated. The question asks about a process that is "residing in main memory and ready and waiting for execution". Let's break down what this means and where such a process is held.

What is a Process?

A process is an instance of a program in execution. It requires resources like CPU time, memory, files, and I/O devices to complete its task.

Process States Explained

When a program is loaded into memory to become a process, it enters the Ready state. From the Ready state, it can transition to the Running state when the operating system's scheduler selects it for execution on the CPU. If a Running process needs to wait for an event (like I/O completion), it moves to the Waiting state. Once the event occurs, it moves back to the Ready state. When a process finishes execution, it moves to the Terminated state.

  • New: The process is being created.
  • Ready: The process is in main memory, waiting to be assigned to a processor.
  • Running: Instructions are being executed by the processor.
  • Waiting (or Blocked): The process is waiting for some event to occur (like I/O completion or signal).
  • Terminated: The process has finished execution.

Understanding Different Queues

Operating systems use various queues to manage processes based on their current state.

  • Job Queue: This queue holds all processes in the system. When a process is first submitted, it is placed in the job queue. Processes from the job queue are admitted to the system (usually loaded into main memory) and placed in the ready queue.
  • Ready Queue: This queue holds processes that are in main memory and are ready to execute, waiting for their turn on the CPU. The operating system scheduler selects the next process to run from this queue.
  • Wait Queue (or Device Queue): This queue holds processes that are waiting for a particular event, such as the completion of an I/O operation or the availability of a resource. There might be separate wait queues for different types of events or devices.
Comparison of Process Queues
Queue Type Processes Held State of Processes Location of Processes
Job Queue All processes in the system Various (typically before admission) Usually secondary storage (disk)
Ready Queue Processes ready for CPU execution Ready Main memory
Wait Queue (Device Queue) Processes waiting for an event/device Waiting (Blocked) Main memory

Analyzing the Question and Options

The question specifies a process that is "residing in main memory and ready and waiting for execution". Let's look at the options:

  • Job Queue: Processes in the job queue are typically on disk, waiting to be loaded into main memory. This doesn't match the description of "residing in main memory".
  • Execution Queue: This is not a standard term in most operating system contexts describing process queues. The term "execution" usually refers to the process being in the Running state on the CPU.
  • Wait Queue: Processes in the wait queue are in main memory but are waiting for a specific event (like I/O). The question says "ready and waiting for execution", which implies waiting for the CPU, not an external event.
  • Ready Queue: Processes in the ready queue are in main memory and are ready to be executed by the CPU. They are waiting for the scheduler to dispatch them. This perfectly matches the description "residing in main memory and ready and waiting for execution".

Therefore, a process residing in main memory and ready and waiting for execution is kept on the Ready Queue.

Revision Table - Process States and Queues

Term Description
Process An executing instance of a program.
Main Memory The primary storage area where programs and data are held for active use.
Ready State A state where a process is in main memory, ready to run, and waiting for the CPU.
Ready Queue A queue holding processes in the Ready state.
Waiting State A state where a process is waiting for an event (e.g., I/O).
Wait Queue A queue holding processes in the Waiting state.

Additional Information - Scheduling and Dispatching

The operating system component responsible for selecting which process from the ready queue should be executed next is called the scheduler. The dispatcher is the module that gives control of the CPU to the process selected by the scheduler. This involves context switching, which is saving the state of the old process and loading the saved state of the new process. The management of processes through these queues and states is a fundamental part of operating system process management and scheduling.

Was this answer helpful?

Important Questions from Process Scheduling - Teaching

  1. Consider the following four processes with the arrival time and length of CPU burst given in milliseconds :

    ProcessArrival TimeBurst Time
    P 108
    P 214
    P 329
    P 435

    The average waiting time for preemptive SJF scheduling algorithm is

  2. Consider the following set of processes and the length of CPU burst time given in milliseconds:

    Process

    CPU Burst time (ms)

    P 1

    5

    P 2

    7

    P 3

    6

    P 4

    4

    Assume that processes being scheduled with Round-Robin Scheduling Algorithm with Time Quantum 4ms. Then the waiting time for P 4is _________ ms.

  3. Consider three intensive processes, which requires 10,20 and 30 units of time and arrive at times 0,2 and 6 respectively. how many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.

  4. Which of the following CPU scheduling algorithms is/are supported by LINUX operating system?

  5. Given CPU time slice of 2 ms and the following list of processes.

    Process

    Burst time (ms)

    Arrival time (ms)

    p 1

    3

    0

    p 2

    4

    2

    p 3

    5

    5

    Find average turnaround time and average waiting time using round-robin CPU scheduling?
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App