Process scheduling is a technique that is used when there are limited resources and many processes are competing for them; Multiprogramming tries to ensure that there is some process running at all times. This is done to .utilize the CPU as much as possible. In timesharing system, the CPU switches so frequently between jobs that the user does not feel that the machine is being shared by many processes or even many users.
If the system has more than one processor, then it is possible to execute more than one process at the same time. In a single processor system, only one process can be executed at any given time. If there are more processes than processors, then the operating system must schedule the processes. It means that some processes will be executed and others will have to wait. There are many strategies for deciding which process should be assigned to the CPU.
Scheduling Queues
Below is a list of the most common types of queues and their purpose.
• Job Queue - Each entering process goes into job queue. Processes in job queue reside on mass storage and awaits the allocation of main memory.
• Ready Queue - The set of all processes that are in main memory and are waiting for CPU time, are kept in ready queue.
• Waiting (Device) Queues - The set of processes waiting for allocation of certain I/O devices, are kept in waiting device queue.
If the system has more than one processor, then it is possible to execute more than one process at the same time. In a single processor system, only one process can be executed at any given time. If there are more processes than processors, then the operating system must schedule the processes. It means that some processes will be executed and others will have to wait. There are many strategies for deciding which process should be assigned to the CPU.
Scheduling Queues
Below is a list of the most common types of queues and their purpose.
• Job Queue - Each entering process goes into job queue. Processes in job queue reside on mass storage and awaits the allocation of main memory.
• Ready Queue - The set of all processes that are in main memory and are waiting for CPU time, are kept in ready queue.
• Waiting (Device) Queues - The set of processes waiting for allocation of certain I/O devices, are kept in waiting device queue.