0% found this document useful (0 votes)
4 views2 pages

Keypoints 2

The document outlines various scheduling algorithms including FCFS, SJF, SRTF, RR, and priority-based scheduling, each with distinct methods for process management. It also discusses the critical section problem, defining critical and remainder sections, and the conditions for a solution: mutual exclusion, progress, and bounded waiting. Additionally, it describes synchronization tools like semaphores and mutexes, highlighting their roles in managing resource access and ensuring mutual exclusion.

Uploaded by

hardxbabar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Keypoints 2

The document outlines various scheduling algorithms including FCFS, SJF, SRTF, RR, and priority-based scheduling, each with distinct methods for process management. It also discusses the critical section problem, defining critical and remainder sections, and the conditions for a solution: mutual exclusion, progress, and bounded waiting. Additionally, it describes synchronization tools like semaphores and mutexes, highlighting their roles in managing resource access and ensuring mutual exclusion.

Uploaded by

hardxbabar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

?

Scheduling Algorithms :
1. First Come First Serve (FCFS) : Simplest scheduling algorithm that
schedules according to arrival times of processes.
2. Shortest Job First (SJF): Processes which have the shortest burst time are
scheduled first.
3. Shortest Remaining Time First (SRTF): It is a preemptive mode of SJF
algorithm in which jobs are scheduled according to the shortest remaining
time.
4. Round Robin (RR) Scheduling: Each process is assigned a fixed time, in a
cyclic way.
5. Priority Based scheduling (Non Preemptive): In this scheduling, processes
are scheduled according to their priorities, i.e., highest priority process is
scheduled first. If priorities of two processes match, then scheduling is
according to the arrival time.
6. Highest Response Ratio Next (HRRN): In this scheduling, processes with
the highest response ratio are scheduled. This algorithm avoids starvation.
Response Ratio = (Waiting Time + Burst time) / Burst time
7. Multilevel Queue Scheduling (MLQ): According to the priority of the
process, processes are placed in the different queues. Generally high priority
processes are placed in the top level queue. Only after completion of
processes from the top level queue, lower level queued processes are
scheduled.
8. Multilevel Feedback Queue (MLFQ) Scheduling: It allows the process to
move in between queues. The idea is to separate processes according to the
characteristics of their CPU bursts. If a process uses too much CPU time, it is
moved to a lower-priority queue.

Apni Kaksha 3

? The Critical Section Problem:


1. Critical Section - The portion of the code in the program where shared variables
are accessed and/or updated.
2. Remainder Section - The remaining portion of the program excluding the Critical
Section.
3. Race around Condition - The final output of the code depends on the order in
which the variables are accessed. This is termed as the race around condition.

A solution for the critical section problem must satisfy the following three
conditions:
1. Mutual Exclusion - If a process Pi is executing in its critical section, then no
other
process is allowed to enter into the critical section.
2. Progress - If no process is executing in the critical section, then the decision
of a
process to enter a critical section cannot be made by any other process that is
executing in its remainder section. The selection of the process cannot be
postponed
indefinitely.
3. Bounded Waiting - There exists a bound on the number of times other processes
can enter into the critical section after a process has made a request to access
the
critical section and before the request is granted.

? Synchronization Tools:
1. Semaphore : Semaphore is a protected variable or abstract data type that is
used to lock the resource being used. The value of the semaphore indicates the
status of a common resource.

There are two types of semaphores:


Binary semaphores (Binary semaphores take only 0 and 1 as value and are used
to implement mutual exclusion and synchronize concurrent processes.)
Counting semaphores (A counting semaphore is an integer variable whose value
can range over an unrestricted domain.)

Apni Kaksha 4

Mutex (A mutex provides mutual exclusion, either producer or consumer can


have the key (mutex) and proceed with their work. As long as the buffer is filled
by the producer, the consumer needs to wait, and vice versa.
At any point of time, only one thread can work with the entire buffer. The concept
can be generalized using semaphore.)

You might also like