OS(Operating System) is to help user solve the problem, such as run job(task).A multitasking OS is one that can simultaneously interleave execution of more than one job .It means that, at the same time, more than one job waiting for being processed by the OS.
But now that the OS is only one processor, a processor can only execute one job at the same time. So the OS will be decided at a time which one job be processed. Each job has three property: time(the time submit to the system), priority (Perform high priority)
and length(the running time of job). In order to improve the throughput(the number of unit time processing jobs) about OS, there are several basic algorithms to solve this problem. They were explained in the following:
FCFS: first come first service
The jobs are executed on first come, first serve basis. It is easy to understand and implement, but it is poor in performance as average wait time is high.
SJF: Shortest job first.
It is the best approach to minimize waiting time, but impossible to implement. The processor should know in advance how much time process will take.
PBS: Priority based scheduling
Each process is assigned a priority. Process with highest priority is to be executed first and so on. Processes with same priority are executed on first come first serve basis.
Today, Chris‘s teacher gave him a homework: given n jobs and the time of each job submission to the system, use the method of FCFS(The first submit is executed first),to decide the order of the operation is performed.
Chris get confused with this problem thoroughly, so he ask you for help. Please help him to solve this problem.