Homework #1
CMPS 111, Spring 2006
| Assigned: | April 11th |
| Due: | Tuesday, April 18th at 11:59 PM |
Please read the general homework page for guidelines and submission information. Homework must be submitted online.
All work on this homework must be your own. Please read (and follow!) the academic honesty policy for this class.
- A computer has a pipeline with four stages. Each stage takes the same time time to do its work, namely, 1 ns (nanosecond). How many instructions can this machine execute per second?
-
Which of the following operations should be allowed only in
kernel mode? Briefly explain your decision for each one.
- Cause a trap
- Disable all interrupts
- Write the memory map for the current process
- Read the time-of-day clock
- Receive a packet of data from the network
- Shut the computer down
-
What is the difference between the following two function
calls? Assume that str is a properly
null-terminated string. Also, file descriptor 2 (in Unix)
is the same as the stdio file stderr.
HINT: what does the operating system do for each function?
fprintf (stderr, "%s", str); write (2, str, strlen (str));
- While there are many different processor architectures, most desktop computers and servers use the Intel x86 architecture. From the point of view of operating systems, what are the advantages to this approach? Are there any disadvantages?
- List some differences between personal computer operating systems and server operating systems. Is this difference disappearing? Why might that be?
-
For each of the following system calls, give a condition
that causes it to fail:
- read()
- write()
- lseek() [seek to a new position in a file]
- fork() [create a new process that's a copy of the current process]
- stat() [get information about a file]
- There are several different approaches to operating system design.
- Describe one advantage the monolithic modular approach has over the microkernel approach.
- Describe one advantage the microkernel approach has over the monolithic modular approach.
- If security is a bigger concern than speed (as it perhaps is today), which operating system design approach would you choose?
- Here are some questions for practicing unit conversions:
- How long is a microyear in seconds?
- If a car is traveling 161280 furlongs/fortnight how fast is it traveling in miles/hour?
- Micrometers are called microns. How long is a gigamicron?
- How many bytes are there in 1 terabyte of memory?
- The mass of the earth ia 6000 yottagrams. What is that in kilograms?
Last updated 13 Apr 2006 by Ethan L. Miller