Operating Systems

 

Homework #1

Due: 2004/3/24

 

1.      MS-DOS provided no means of concurrent processing. Discuss three major complications that concurrent processing adds to an operating system.

 

2.      Describe the differences among short-term, medium-term, and long-term scheduling.

 

3.      Describe the actions taken by a kernel to switch context between processes.

 

4.      The source code of a producer-consumer program implemented using shared-memory can be got via http://www.im.ntu.edu.tw/~robin/courses/os04/code/producer-consumer.c.
Ensure that you can compile and execute the code and know the meanings of it. The producer-consumer algorithm described in the source code allows only n-1 buffers to be full at any one time. Modify the algorithm to allow all buffers to be utilized fully and also modify the source code to let the consumer consume the items in the buffer only if the buffer is full. Please dump the modified code only, i.e. not the whole program, and also dump the output result with your other answers of this homework.