In: Computer Science
(a) What are the advantages and disadvantages of a time-sharing system? Explain. (b) Is multi-programming more effective in a batch OS or in a time-sharing OS? Explain. (c) How is the effectiveness of scheduling measured? Explain.
a. Advantage of time-sharing system is -:
1. This operating system provide equal oppertunity to all task , so that each task get a chance to execute in cpu in timely manner.
2. The running time of cpu is increased i.e utilization of cpu is maximized .
3. it extends multitasking property of os.
disadvantage of operating system:-
1. as the each task get some quantum of time so there may be a case that task does not complete its execution tillthat time so maintaining the execution order and register information decrease the reliability of execution of task.
2. Mainitaining information of not completely eceutable task can decrease the sequrity of os.
3. since task may not be completed in one go so communication between tasks can be hampered.
b. Yes multiprogramming is much better than batch os or time sharing os , because in multiprogramming more than one task seems to be executed at a time (one in block and other are executing) thus cpu utilization in multiprogramming is much much better than compare to batch or time sharing os, it is explained as suppose there are three process p1, p2 ,p3 these are executed in batch os first , then in batch os firstly they are grouped into same types of processes then executed in cpu , so grouping of processes is extra overhead in batch os ,so at the time of grouping cpu remains idle , coming to time sharing os , in this p1 ,p2 ,p3 is given some quantum of time , lets p1 get colpletely ececuted in their given quantum but p2 not completely executed int their respective quantum thus p2 will remail idle and its status is saved and p3 get executed thus here storing the status of not completely executeable process is overhead , now coming to muliprogramming here p1,p2,p3 are already in job pool , now p1 get cpu but p1 have to perform some i/o operation thus p1 get blocked then immediately process p2 is assigned to cpu and so on thus the cpu idle time is very very low in multiprogramming and it seems like more than one process are executing at once (some are blocked and one is running).
c. effectiveness of scheduling is measured by ,
1. average waiting time of process - means how much process have to wait to get cpu.
2. starvation period - means how much time process have to starve for cpu execution.
3. throughput - number of output per second.