views:

472

answers:

1

i know this depends on the design, but i was asked this question and no assumptions taken.. what should i answer and

+1  A: 

First off, this sounds suspiciously like a homework question. If that's the case, I recommend researching on your own.

By FCFS I assume you mean "First Come First Serve", and if I recall that's a system where processes are executed to completion in the order that they are provided to the scheduler, yes?

If so the basic guideline would be this: Use round robin if it is desirable to allow long running processes to execute while not interfering with shorter ones, with the side effect that order of completion is not guaranteed. Round Robin can suffer if there are many processes in the system, since it will take longer for each process to complete since the round trip is longer.

If you do need a guaranteed order of completion, FCFS is a better choice but long running processes can stall the system. However, each process is given the full attention of the system and can complete in the fastest possible time, so that can be a benefit.

In the end it really does come down to not necessarily design but need: Do I need semi-synchronous execution or do I need in-order execution? Is it to my benefit for processes to take longer but compute in sync or will I be better off if everything executes as fast as possible? The needs of the system dictate the model to use.

Edit: Wikipedia has a pretty good breakdown of these and other simple scheduling methods here

Toji
thanks Toji... ya its an acad question.
harshit