In the FCFS scheduling algorithm the drawback is that if a process P1 with a higher burst time comes before some processes P2,P3... with much smaller burst times then the average waiting time and average completion time is pretty high.
A solution to this problem is to schedule the Shortest Job First(SJF Algo).
But how is the burst time computed in advance? Does the developer specify a formula by which (according to the resources available) the burst time to perform a job is computed in advance?
Estimating burst time of a process is a very large topic . in general scheduler estimates the length of the next burst based on the lengths of recent cpu bursts. basically what we do is to guess the next CPU burst time by assuming that it will be related to past CPU bursts for that process .
A quick google search led me to this article which will give you a basic idea .
here is a more detailed article