
CMSC 412 Homework Four
Name:
You’ve already read Chapters 4 and 5... maybe start in on chapter 6.
Due Tuesday Sept 30.
Type, please. 10-11 point times (serif) roman (not italic, no bold) or similar, single or 1.5 spaced, 1 inch margins.
(I don’t mean to define a specific style; missing one or two of these is fine, I won’t grade it down.)
As always, if you use sources on-line (e.g., wikipedia, pages found by google, man pages), please cite. This
assignment is meant to be done individually.
Point totals are approximate, subject to change.
1. (2 points) Into which register is the syscall number placed when executing a system call in geekos?
2. (2 points) Are GeekOS project one memory addresses virtual?
3. (4 points) What flags are passed to clone() by pthread_create on linuxlab? (heaving.csic.umd.edu) You
may modify your code for homework 3 as part of answering this question.
4. (2 points) What is the difference between a function declared “static” as in
static void Syscall_Handler(struct Interrupt_State*state) and one declared without
the “static” modifier?
5. (4 points) Imagine you’re implementing a (high-quality) web server. (a) Describe an environment (thread model
(e.g., one-to-one), kernel parameters (e.g., memory footprint per thread)) in which it is reasonable to start a new
thread for every request. (b) Describe an environment in which it would be unreasonable.
6. (6 points) Consider modifying a general purpose timesharing operating system’s scheduler for use on a mobile
device like a phone. (a) Name (at least) three salient, distinct features of a mobile device and its applications that
might lead to a change in scheduling policy or parameters. (b) Describe how you would modify the scheduler
to accommodate this peculiarity of the device. (salient means that “the keyboard is small” probably isn’t a good
answer, distinct means that “the screen is small” and “the screen has low resolution” would not count toward the
three.)
Page 1 of 1