Operating Systems 173323 (3 cu)

Exercise 8

Week 49

Exercises 8 are in computer classes:

Group 1: on Monday Dec. 3 at 16-18 in T/B178
Group 2: on Friday Dec. 7 at 8-10 in T/B178

  1. Consider the sample chapter from "Understanding the Linux Kernel" book in address:

    http://www.oreilly.com/catalog/linuxkernel/chapter/ch10.html

    Explain briefly the process scheduling policy and scheduling algorithms used in Linux.

  2. Implement the following c-program: Program uses concurrently executing threads, which share a global integer variable, which is modified in other thread and also modified in another thread. Try to program a situation in which the result of the modifications depends on the order of executing the threads. Then consider the modifications of the global variable as critical sections and protect them using semaphores. Show the results of running the program without semaphores and with semaphores. An example program using threads is in

    http://cs.joensuu.fi/pages/mhk/harjoitukset/kj/h7/pthread_example.c

  3. Consider the "Bibliographical notes", pages 240-241 in Silberschatz's Operating system concepts-book (6th edition). Make a brief historical list of the algorithms related to a critical section problem. Include there also a list of people, who have been developing these algorithms.

    Silberschatz's Operating system concepts-book is available in Department library and in Rekursio's room there are copies of pages 240-241 available.

  4. Explain the meaning of busy waiting in semaphore operations. Discuss the advantages and disadvantages of it. How the need of busy waiting can be overcome ?