Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb NAME:SHAE-BEBEYI DANIEL HIMID nmqwertyuiopasdfghjklzxcvbnmqwer MAT NO:DIRECT ENTRY tyuiopasdfghjklzxcvbnmqwertyuiopas GROUP 1 dfghjklzxcvbnmqwertyuiopasdfghjklzx DATE:27/12/2014 cvbnmqwertyuiopasdfghjklzxcvbnmq COURSE:CSC 2O3 wertyuiopasdfghjklzxcvbnmqwertyuio pasdfghjklzxcvbnmqwertyuiopasdfghj klzxcvbnmqwertyuiopasdfghjklzxcvbn mqwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasdf ghjklzxcvbnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzxcvbnmrty uiopasdfghjklzxcvbnmqwertyuiopasdf ghjklzxcvbnmqwertyuiopasdfghjklzxc First Come First Serve (FCFS) Introduction: The other names of this algorithm are: 1. First-In-First-Out: FIFO 2. Run to Completion 3. Run- Until- Done FCFS DEFINATION:First Come First Serve is an operating system process, scheduling algorithm and a network routing management mechanism that automatically executes queued request and processes by the order of their arrival .With first come first served ,hat come first is handled first ;the next request line will be executed once the one before it is complete . The first come, first served (commonly referred as FIFO: first in, first out) process scheduling algorithm is the simplest process scheduling algorithm. It is one of the BATCH SYSTEMS. It is rarely used in modern operating systems, but it is sometimes in the other scheduling systems. First Come First Serve also provides an efficient, simple and error-free process scheduling algorithm that saves valuable CPU resources. It uses no preemptive scheduling in which a process is automatically queued and processing occurs according to an incoming request or process order. FCFS derives its concept from real-life customer service. The FCFS behaves or acts like a normal queue, For instance; a line in the cinema, the first person to arrive is the first person to be dealt with. If one person in the line goes and decides that they have forgotten something then they have to go back through. This also happens to the operating system, if one process arrives at the OS (first in) that is the one that will be dealt with (First out). An Example of how its executed. Here is an example of the FCFS process. Suppose there are three processes in a queue: D1, D2 and D3. D1 is placed in the processing register with a waiting time of zero seconds and 10 seconds for complete processing. The next process, D2, must wait 10 seconds and is placed in the processing cycle until D1 is processed. Assuming that D2 will take 15 seconds to complete, the final process, D3, must wait 25 seconds to be processed. FCFS may not be the fastest process scheduling algorithm, as it does not check for priorities associated with processes. These priorities may depend on the processes' individual execution times. Further Explanation First-Come-First-Served algorithm processes are dispatched according to their arrival time on the ready queue. Being a nonpreemptive discipline, once a process has a CPU, it runs to completion. The FCFS scheduling is fair in the formal sense or human sense of fairness but it is unfair in the sense that long jobs make short jobs wait and unimportant jobs make important jobs wait. FCFS is more predictable than most of other schemes since it offers time. FCFS scheme is not useful in scheduling interactive users because it cannot guarantee good response time. The code for FCFS scheduling is simple to write and to understand. One of the major draw-back of this scheme is that the average time is often quite long. The First-Come-First-Served algorithm is rarely used as a master scheme in modern operating systems but it is often embedded within other schemes. Diagrammatical expression of the FCFS This diagram is a graphical representation of the first come first serve process in the batch system. Here are three processes waiting to be executed in a sequential order Process Duration Order Arrival Time D1 D1 D3 24 3 4 1 2 3 0 0 0 P1 waiting time 0 P2 waiting time 24 P3 waiting time 27 = The average waiting time is; (0+24+27)/3= 17 ADVANTAGES AND DISADVANTAGES OF THE FCFS Advantages: The first come first serve process in the operating system is simple The FCFS is easy to understand It is also self explained that is first come, first served Its fair Disadvantages: The scheduling method is non preemptive that is, the process will not run until it finishes Because of this non preemptive scheduling, short process which are at the back of the queue have to wait for the long process at the front to finish. Convoy effect: Short process stuck waiting for long process Waiting time depends on arrival order