InterviewSolution
| 1. |
Explain the process manangement algorithms in Operating System? |
|
Answer» The following algorithms are mainly used to allocate the job (process) to the processor. 1. FIFO 2. SJF 3. Round Robin 4. Based on Priority. 1. FIFO (First In First Out) Scheduling: This algorithm is based on queuing technique. Assume that a student is standing in a queue (Row) to get grade sheet from his/her teacher. The other student who stands first in the queue gets his/her grade sheet first and leaves from the queue (Row). Followed by the next student in the-queue gets it corrected and so on. This is the basic logic of the FIFO algorithm. Technically, the process that enters the queue first is executed first by the CPU, followed by the next and so on. The processes are executed in the order of the queue (row). 2. SJF (Shortest Job First) Scheduling: This algorithm works based on the size of the job being executed by the CPU. Consider two jobs A and B. (a) A = 6 kilo bytes (b) B = 9 kilo bytes First the job “A” will be assigned and then job “B” gets its turn. 3. Round Robin Scheduling: The Round Robin (RR) scheduling algorithm is designed especially for time sharing systems. Jobs (processes) are assigned and processor time in a circular method. For example take three jobs A, B, C. First the job A is assigned to CPU then job B and job C and then again A, B and C and so on. 4. Based On Priority: The given job (process) is assigned based on a Priority. The/job which has higher priority is more important than other jobs. Take two jobs A and B. Let the priority of A be 5 and priority B be 7. Job B is assigned to the processor before job A. |
|