Keypoints 2
Keypoints 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
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.
Apni Kaksha 4