(Latest Revision -- 12/14/2003)
(11/11/2003: moved chapter 10 problems to HW #4)
(10/15/2003: moved chapter 7 problems to HW #3)
(10/15/2003: moved chapter 7 problems to HW #3)
(12/14/2003: clarifications to get ready for next term.
Homework Problems for CS 3750
Doing the homework will be likely to raise your course grade by one full
letter grade (e.g. from C to B, or from B to A).
Directions for homework submissions
You'll get good grades on the homework if you show mastery of the
material. Give thoughtful and complete answers. Explain
your answers so as to demonstrate and prove to a skeptical reader that they
are correct.
Put things into your own words. Do not copy, quote, or closely paraphrase the
textbook or other people's writings.
Write so as to be understandable to a certain intended readership -- an
intelligent person who has completed the prerequisites for CS 3750 but who has
not yet taken CS 3750.
If I don't feel that what you write is understandable to that audience then
you will lose substantial credit.
You will need to keep an extra copy of everything you turn in. Homework will
be due on Fridays before quizzes. I will discuss answers to the homework
immediately after collecting it. You will not receive graded homework back
until after the quiz on the following Monday.
Form and Format
- Everything except source code (including "psuedo-code"): Turn in a
hard copy. Put it on the 'counter' in front of me before the beginning
of class on the due date. Double space. Make margins of between 1" and
1-1/4" on sides, top and bottom. Use a font size from 10 to 14. (I
prefer a fixed-width font.)
- Source code: Turn in neat, compilable code. No more than 70
characters per line. Turn in one hard copy and one e-mail copy. Put the
hard copy on the 'counter' in front of me before class starts. Send the
e-mail before midnight on the due date. No attachments, please. Just
put the text in-line into the message.
Send e-mail to: john@ishi.csustan.edu
Homework Assignment #1.
Due
Friday, September 19
Chapter #01 -- Introduction
- Based on your reading of the first chapter, write a concise essay
describing the important functions and responsibilities of a modern
time-sharing operating system. Write 500 words or more.
Chapter #02 -- Computer System Structures
- The HAL 3000 computing system has a primary memory X and a
secondary memory Y. HAL also has a cache C
that it uses to reduce the average time required to move a word of
data from Y to X. Write a pseudo-code algorithm for a function
read(A, B) that places a copy of the word at address
B in Y into the word at address A in
X. (Your algorithm does not have to be very detailed, but it
is important that you show you understand how to properly select and
sequence the cache-maintenance actions and the memory-transfer
actions.)
- The summary section of the second chapter states: "Multiprogramming and
time-sharing systems improve performance by overlapping CPU and I/O
operations on a single machine." Suppose that initially in such a system
there is no I/O occurring and a program of one user is executing in the
CPU. What chain of events would typically change that situation into one
where a program of one user is executing in the CPU and I/O in behalf of
a different user is occurring simultaneously? When you answer this,
don't skimp on details. Show me that you learned the information in the
text that applies here.
Chapter #03 -- Operating System Structures
- For each of the indicated system calls in the list below, write a few
sentences summarizing what tasks the operating system might have to
perform to implement the system calls.
(For example, creating a file would require that an entry be placed in
some directories or tables on the disk, and perhaps some allocation of
disk blocks. It is important that you try to describe the data
structures the OS might have to use. You may need to guess what some of
the data structures would be. Rely on knowledge of data structures that
you have gleaned from previous courses in computer science as well as
knowledge you have picked up thus far about how operating systems are
implemented.)
Try to be thorough and include enough plausible detail. I think
basically you need to consider what resources have to be
allocated/deallocated and what kinds of records are required to keep
track of the changes.
Remember your intended audience -- the student who has the
prerequisites for this course. Make your answer undestandable and
enlightening to your audience.
There is no one correct way to implement a system call. Don't feel that
your answer has to be just like everyone else's.
- load process
- open file
- request device
- set process attributes
- delete communications session
Chapter #04 -- Processes
- Write a small essay in your own words on the topic of programs and
processes. Define what a program is and what a process is.
Explain what the differences and similarities are between the two
concepts. Explain and/or speculate on what operating system data
structures must be employed in order to maintain and preserve a
program. Answer the same question for a process. Give
attention to similarities and differences regarding the data structures
too. Use information distilled from your readings of chapter 4 to help
you answer this question, and add whatever else you think will be
helpful. (Keep in mind the "intended readership" described in the
directions above.)
Homework Assignment #2.
Due Friday, October 17
Chapter #05 -- Threads
- Rewrite the essay you wrote in answer to the question for chapter #04.
The directions are the same except that this time you must cover three
concepts: program, process, and thread. In addition
to adding information about threads, since you know more now you should
be able to improve on what you said before about programs and processes.
Chapter #06 -- Scheduling
- Do problem 6.3 on page 185 (this involves making Gantt charts and
calculating measures of the performance of several scheduling
algorithms).
Chapter #07 -- Process Synchronization
- Do the problem in the file
hymanProb.html
in this directory. Please take note of the example
"scenario" described in the problem statement. Make sure
that the solution you construct is the same kind of specific
and detailed scenario.
- Do Problems 7.1, and 7.6 (Remember to use exposition suitable to your
"intended audience" -- a student who has the prerequisites for this
course.)
- Give a pseudo-code solution to the readers-writers problem.
Your solution must not let readers starve, nor let writers starve. To
achieve synchronization, use only one or more semaphore(s) of the type
described in section 7.4.2. Assume that the list in every semaphore
is a FIFO queue.
Homework Assignment #3.
Due Friday, November 14
Chapter #07 -- Process Synchronization
- Do the problem in the file
hymanProb.html
in this directory. Please take note of the example
"scenario" described in the problem statement. Make sure
that the solution you construct is the same kind of specific
and detailed scenario.
- Do Problems 7.1, and 7.6 (Remember to use exposition suitable to your
"intended audience" -- a student who has the prerequisites for this
course.)
- Give a pseudo-code solution to the readers-writers problem.
Your solution must not let readers starve, nor let writers starve. To
achieve synchronization, use only one or more semaphore(s) of the type
described in section 7.4.2. Assume that the list in every semaphore
is a FIFO queue.
Chapter #08 -- Deadlocks
Chapter #09 -- Memory Management
- Do problems 9.5 (don't forget the possibility of using holes created by
previous allocations), 9.10, and 9.16 on pages 313-315
Chapter #10 -- Virtual Memory
- Do the following problem. Show all work in detail.
A virtual address of 76543656 (hex) appears in a program that is being run on
a computer that does demand paging. The computer has 24-bit physical
addresses, 32-bit virtual addresses, and a 1K-word page-size. How many
physical frames are there? How many virtual pages are there? What are the
page number and the offset corresponding to the virtual address? (Give the
last two both in hex notation and decimal notation.)
- Do problem #10.10 on page 367. Show all your work in detail and
explain all your reasoning in detail.
Homework Assignment #4.
Due Friday, December 5
In your answers to all the problems, explain your reasoning in detail.
Chapter #10 -- Virtual Memory
- Do the following problem. Show all work in detail.
A virtual address of 76543656 (hex) appears in a program that is being run on
a computer that does demand paging. The computer has 24-bit physical
addresses, 32-bit virtual addresses, and a 1K-word page-size. How many
physical frames are there? How many virtual pages are there? What are the
page number and the offset corresponding to the virtual address? (Give the
last two both in hex notation and decimal notation.)
- Do problem #10.10 on page 367. Show all your work in detail and explain
all your reasoning in detail. (Assumptions you should make: (1) The
smallest addressable unit of primary memory is a word, (2) The
page size is given in units of words, (3) The amount of storage required
to represent one integer is one word, and (4) The array is stored in row
major order (If you don't know what row-major order is, ask me.)
Chapter #11 -- File-System Interface
- Do problems 11.3, 11.7, 11.10, and
11.12 (Someone will have to furnish more background on
Unix permissions scheme or this question should be thrown out).
Chapter #15 -- Distributed System Structures
- Do problems 15.5 and 15.19.
Chapter #16 -- Distributed File Systems
- Do problems 16.5 and
16.6 (Someone will have to furnish more background on
Apollo Domain or this question should be thrown out).
Chapter #17 -- Distributed Coordination