Operating Systems, Fall 2008, Exercise 2
These homework exercises will be covered in practice sessions on week 37 (Thu 11.9. or Fri 12.9). Each week one of the questions must be submitted on paper to the teacher.
You need (at least to try hard) to solve all of the questions in advance, that is before the meeting. In the meeting we will discuss about the questions and their solutions. There is no time to solve them there. Solutions to the homework are not provided afterwards.
The weekly meetings are important for your learning. They give you structure for the course and support you in learning the content. They also give you some hints about the exam.
During the meeting, you will also have possibility to ask about the parts you feld were difficult to understand. This is your opportunity to make sure that you master the material well.
This second week's homework covers the issues of processes, threads and their scheduling. Sections 2.1,2.2 and 2.4 from the course book.
RETURN ON PAPER:
- Write (In Finnish or in English) a short (1/2 -1 page) answer to the question:
You are about to implement a web server. What kind of thread or process architecture would you choose (a) for a system with kernel-level threads or (b) for a system with user-level threads, if the systems would be otherwise identical?
The grading of your explanation is mainly based on the reasons and justification, not just the chosen architecture.
- List the items or concepts you learned this week from the book, other material or the exercises?
- List at least three items or concepts you would like to be covered more in the course in the future? (Items you found difficult or challenging)
- Based on your current experience, what grade would you give yourself at the moment about the course. (How well do you feel you master the content)
Covered in the class, but solved in advance:
- What do the Linux
forkandclonesystem calls do? How do they differ? How are they alike? - Tan08 Problem 2.2: Suppose that you were to design an advanced computer architecture that did process switching in hardware, instead of having interrupts. What information would the CPU need? Describe how the hardware process switching might work.
- Tan08 Problem 2.13: In this problem you are to compare reading a file using a single-threaded file server and a multithreaded server. It takes 15 msec to get a request for work, dispatch it, and do the rest of the necessary processing, assuming that the data needed are in the block cache. If a disk operation is needed, as is the case one-third of the time, an additional 75 msec is required, during which the thread sleeps. How many requests/sec can the server handle if it is single threaded? If it is multithreaded?
- Tan08 Problem 2.18: Suppose that an operating system does not have
anything like the
selectsystem call to see in advance if it is safe to read from file, pipe, or device, but it does allow alarm clocks to be set that interrupt blocked system calls. Is it possible to implement a threads package in user space under these conditions? Discuss. - Tan08 Problem 2.37: Five batch jobs A through E, arrive at a
computer center at almost the same time. They have estimated running
times of 10,6,2,4, and 8 minutes. Their (externally determined)
priorities are 3,5,2,1,and 4, respectively, with 5 being the highest
priority. For each of the following scheduling algorithms, determine the
mean process turn-around time. Ignore process switching overhead.
- Round robin
- Priority scheduling
- First-come-first-served (run in order 10,6,2,4,8)
- Shorted-job-first
- Tan08 Problem 2.42: Explain why two-level scheduling is commonly used.

