Monday, July 5, 2010

Algotima First Come First Served Scheduling

Name Process      Arrival  Long Process
A
B
C
D
E
0
0
0
0
0
7
10
2
4
8
Preview Case I - a queue of five process with arrival = 0
Name Process       Arrival   Long Process
A
B
C
D
E
0
1
8
2
5
7
10
2
4
8
Preview Case II - a queue of five different process arrival

First Come First Served algorithm (FCFS) technique also known as the First Arriving First Served (PTPD). FCFS scheduling without priorities are and without preempsi (see post cpu scheduling). Therefore, this process consists in the queue simultaneously pure.
In FCFS, the process that arrives first will be served first. If the process arrives at the same time, the service is based on their sequence in the queue. It does not matter whether they are short of time or a long process. To be serviced by the processor, process the queue behind must wait until all processes performed in front of it completed.
We can immediately put this process into the table in the process of working processors. In the first case, process B can only be implemented after a complete process run. Process C can only be undertaken after the completion of B processes implemented. So forth so as to obtain the following image in the table.

Name Process Arrival
Long Process
     Start     Finish  Time futile Long Perceptive
A
B
C
D
E
0
0
0
0
0
7
10
2
4
8
0
7
17
19
23
7
17
19
23
31
0
7
17
19
23
7
17
19
23
31




Average 66
13,2
97
19,4
Figure Ujuk processors work with FCFS algorithm for the case I

Seen here that the average response time was 19.4 units of time. This value is quite large compared to the long process of each process. The following illustrations for examples of the second case.
Name Process Arrival Long Process Start Finish Time futile
Long Perceptive
A
B
D
E
C
0
1
2
5
8
7
10
4
8
2
0
7
17
21
29
7
17
21
29
31
0
6
15
16
21
7
16
19
24
23




Average 58
11,6
89
17,8
Figure Ujuk processors working with FCFS algorithm for case II

In Figure Example case at the top of this posting, the process has not been sorted according to time of arrival, therefore after sorted by arrival time, then the queue to A, B, D, E and C. Seen here that the average response time was 17.8 units of time. This value is still quite large compared to the long process of each process but still smaller than the average response time for case I. The difference with the first example lies in the calculation of response time. If at first instance, the same old response when completed, then here they are not the same as when it is not the same process.
Both examples show that the duration of response was influenced by the long process of the process that lies at the front of the queue. If the old process to the process at the front of the queue is large, then the long process with a short process in the back of the queue, still have a long wait before they can be served by the processor. That's why FCFS scheduling is less profitable for the whole service.
One way to overcome this is through priority. Process with short long process to obtain priority precedence to the processor. Short growing period of the process, the sooner that process is served by the processor. This is known as the Process Scheduling Shortest Dipertamakan (PTD)

Referren : by teknik-informatika.com 
 
 

No comments: