Recents in Beach

scheduler

Previous                                                          Next⏩




A process migrates between the various scheduling queues throughout its life-time purposes.
 The OS must select for scheduling processes from these queues in some fashion.
 This selection process is carried out by the appropriate scheduler. 
In a batch system, more processes are submittedand then 
executed immediately. 
So these processes are spooled to a mass storage device like disk, where they 
are kept for later execution.
  
Types of schedulers:
  
There are 3 types of schedulers mainly used: 

1. Long term scheduler: 
Long term scheduler selects process from the disk & loads them into 
memory for execution. 
It controls the degreeof multi-programming i.e. no. of processes in 
memory.
 It executes less frequently than other schedulers.
 If the degree of multiprogramming is stable than the average rate of process creation is equal to the average departure rate of processes leaving the system.
 So, the long term scheduler is needed to be invoked only when a process leaves the system. Due to longer intervals between executions 
it can afford to take more time to decide which process should be selected for execution. 


2. Short - term scheduler: 
           The short term scheduler selects among the  process that are ready 
to execute & allocates the CPU to one of them. 
The primary distinction between these two schedulers is the frequency of their execution. 
The short-term scheduler must select a new 
process for the CPU quite frequently. 
It must execute at least one in 100ms.
 Due to the short duration of time between executions, it must be very fast.

3. Medium - term scheduler: 
            some operating systems introduce an additional intermediate 
level of scheduling known as medium - term scheduler.
 The main idea behind this scheduler is that sometimes it is advantageous to remove processes from memory & thus reduce the 
degree of multiprogramming. 
At some later time, the process can be reintroduced into memory & its execution can be continued from where it had left off. 
This is called as swapping. 
The process is swapped out & swapped in later by medium term scheduler. 
Swapping is necessary to improve theprocess miss or due to some change in memory 



Process control block: 

Each process is represented in the OS by a process control block. It is also by a process control block. 
It is also known as task control block. 
A process control block contains many pieces of information associated with a specific process. 


It includes the following informations. 

• Process state: The state may be new, ready, running, waiting or terminated state. 

• Program counter:it indicates the address of the next instruction to be executed for this purpose. 

• CPU registers: The registers vary in number & type depending on the computer architecture. 
It includes accumulators, index registers, stack pointer & general purpose 
registers, plus any condition- code information must be saved when an interrupt occurs to allow the process to be continued correctly after- ward. 

• CPU scheduling information:This information includes process priority pointers to scheduling queues & any other scheduling parameters. 

• Memory management information: This information may include such information as the value of the bar & limit registers, the page tables or the segment tables, depending upon the memory system used by the operating system. 

• Accounting information: This information includes the amount of CPU and real time used, time limits, account number, job or process numbers and so on.  

• I/O Status Information: This information includes the list of I/O devices allocated to this process, a list of open files and so on. The PCB simply serves as the repository for any information that may vary from process to process. 






Previous                                                          Next⏩

  1. What is an Operating System ?
  2. Discuss the structure off OS ?
  3. Explain type of OS?
  4. Explain Function of OS?
  5. Explain OS Services ?
  6. What do mean by system call ?List different type ofsystem call available ?

  1. what is process ? and Characteristics ?
  2. What is different process state? explain the same in details?
  3. write short note on user level and kernal level threads?
  4. explain what is thread and its type ?
  5. explain scheduler ? (short term,medium term,and long term)
  6. state and explain scheduling criteria ?
  7. Explain scheduling algorithm ? [ FCFS,SJF,PRIORITY,ROUND ROBINE.]    

  1. What is process synchronization ? explain critical section problem and race condition ?
  2. what is Race Condition ?
  3. what is critical section problem?
  4. explain classical problem of synchronization?
  5. explain bounded - buffer problem?
  6. explain reader - writer problem ?
  7. explain Dining Philosophers Problem ?
  8. explain semaphores ? its type ?

  1.  What is deadlock ?
  2. What are the 4 condition to produce deadlock ?
  3. explain methods of handling deadlock ?
  4. explain in detail deadlock prevention ?
  5. write short note on deadlock avoidance ?
  6. explain deadlock detection ? 
  7. explain Banker algorithm with example ? 

Post a Comment

0 Comments