Quiz 4, Q&A

Q What is semaphore? Describe the down operation.

A. Semaphores are variables that are used to signal the status of shared resources to processes.

the down operation on a semaphore

Q. What is the Monitor? Adv. & Disadv.

A. Monitors are a high level language construct for dealing with synchronization.

Adv.


Q Explain the metrics in the scheduling.

Metrics;

Q Describe FCFS& SJF scheduling algorithms, give example.

  1. FCFS is the simplest scheduling policy

  2. Arriving jobs are inserted into the tail of the ready queue and the process to be executed next is removed from the head (front) of the queue

  3. FCFS performs better for long jobs

  1. SJF policy selects the job with the shortest (expected) processing time first

  2. Shorter jobs are always executed before long jobs

  3. One major difficulty with SJF is the need to know or estimate the processing time of each job

  4. Also, long running jobs may starve for the CPU when there is a steady supply of short jobs