Basic CS-Operating System [TCS Placement]: Sample Questions 30 - 31 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 30

Operating System
Edit

Describe in Detail

Essay▾

Define the PBS

Explanation

  • PBS means Priority Based Scheduling.
  • Priority scheduling is a non-preemptive algorithm and one of the most common scheduling algorithms in batch systems.
  • Each process is assigned a priority. Process with highest priority is to be executed first and so on.
  • Processes with same priority are executed on first come first served basis.
  • Priority can be decided based on memory requirements, time requirements or any other resource requirement.
  • Multiple process with same priority are dealt using FCFS (First-Come-First-Serve) .
Given the Image is Define the Priority Based Scheduling Process

Question 31

Operating System
Edit

Describe in Detail

Essay▾

What are shore, long and medium-term scheduling?

Explanation

    • Long Term Scheduler
    • Long term scheduler determines which programs are admitted to the system for processing.
    • It controls the degree of multiprogramming.
    • It is also called a job scheduler.
    • A long-term scheduler determines which programs are admitted to the system for processing.
    • It selects processes from the queue and loads them into memory for execution.
    • Process loads into the memory for CPU scheduling.
  • Medium Term Scheduler
    • Medium term scheduling is part of the swapping function.
    • This relates to processes that are in a blocked or suspended state.
    • They are swapped out of real-memory until they are ready to execute.
    • The swapping-in decision is based on memory-management criteria.
    • It removes the processes from the memory.
  • It reduces the degree of multiprogramming.
  • The medium-term scheduler is in-charge of handling the swapped out-processes.
  • A running process may become suspended if it makes an I/O request.
  • Suspended processes cannot make any progress towards completion.
  • In this condition, to remove the process from memory and make space for other processes, the suspended process is moved to the secondary storage.
  • This process is called swapping, and the process is said to be swapped out or rolled out.
  • Swapping may be necessary to improve the process mix.
  • Short Term Scheduler
  • Short term scheduler, also known as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next.
  • This scheduler is invoked whenever an event occurs.
  • It may lead to interruption of one process by preemption.
  • It is also called as CPU scheduler.
  • Its main objective is to increase system performance in accordance with the chosen set of criteria.
  • It is the change of ready state to running state of the process.
  • CPU scheduler selects a process among the processes that are ready to execute and allocates CPU to one of them.
  • Short-term schedulers, also known as dispatchers, make the decision of which process to execute next.
  • Short-term schedulers are faster than long-term schedulers.
Given the Image is Define the Shore, Long and Medium-Term Scheduling

Developed by: