(Are you looking at a stale web page? Try refreshing your browser.)

( Latest Revision -- Wednesday April 27, 2016 )
[2016/04/27: Corrected page number for prob #2 in chapter 9]
[2016/04/15: Deletion of Chapter 10 problem for Spring 2016 semester]
[2015/09/10: Change to word count on Chap 3,4 problems]
[2015/08/13: Initial updates]

Homework Problems for CS 3750

If you do a good job on the homework, you may do better on tests.

Directions for homework submissions

When you do the homework, show mastery of the material. Leave no doubt that you know what you are talking about. 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.

Keep an extra copy of everything you turn in. Typically I will collect homework and go over the answers on the class day prior to the quiz, or possibly before the quiz, but on the same day as the quiz. Although I don't assign grades to the homework, I'll monitor how much of it you are doing, and I'll give you feedback on as much of it as I can. However, you will not receive back the homework papers that you give me until sometime after you take the quiz.

Form and Format

When you send me e-mail, the address to use is: john@ishi.csustan.edu


For all homework due dates, see: the class schedule.


If you have a different edition of the textbook, or even a foreign version of the current edition, then the problem numbers in your book may not correspond exactly to those in the official course text. It is your responsibility to make sure you work the right problems.

Chapter #01 -- Introduction
  1. Write 250 words or more describing the interplay between operating system software and the interrupt mechanism. In your writing show that you understand A) how interrupts "drive" the actions of the operating system, and B) how the interrupt mechanism in a modern computing system actually works (what hardware devices do to cause an interrupt and the sequence of events that take place between the time that the currently running program is interrupted and the time that same program resumes execution).
Chapter #02 -- Operating System Structures
  1. Using information gleaned from chapters one and two, write 500 words or more describing the important functions and responsibilities of a modern multi-user, time-sharing operating system.

  2. Using information from section 2.7 write 250 words or more describing several different approaches to designing the structure of an operating system. Discuss the advantages and disadvantages of each approach.
Chapter #03 -- Processes
  1. Write 500 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 3 to help you answer this question, and add whatever else you know that you think will be helpful. (Keep in mind the "intended readership" described in the directions above.)
Chapter #04 -- Threads
  1. Rewrite the essay you wrote in answer to the question for chapter #03. 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. (500 words)
Chapter #05 -- Process Synchronization
  1. 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.

  2. A version of the "readers-writers problem" is described in the text in section 5.7.2. Propose a solution to the following variation on that readers-writers problem: readers and writers must be given access to the [database] resource in the order in which they request it. Readers share the resource to the greatest extent possible. Each writer accesses the resource exclusively.

    Write up your proposed solution using a format like the one used in figures 5.11 and 5.12 (and the explanation in the text preceding figure 5.11 of the meaning of the variables). In other words write pseudo code that shows what the shared variables are, pseudo code for writer processes, and pseudo code for reader processes. Also, like the solution shown in figures 5.11 and 5.12, use only semaphores for synchronization.

    Of course, you must bear in mind that the problem I am assigning you here is different from the one in the text, so naturally you need to try to think of a solution that is different from what's in figures 5.11 and 5.12.


    In addition to enforcing exclusive writes and allowing shared reads, your solution should be starvation free, and satisfy the progress & bounded waiting requirements for solutions to critical section problems. (See section 5.2.)

    Note: The degree of difficulty of this problem may be high for you, but give it a try anyway. It's a good problem to think about.
Chapter #06 -- CPU Scheduling (If you are using Edition 8, this is Chapter #05.)
  1. Do the following problem. (It is problem 6.16 on page 308 of edition #9.)
         Consider the following set of processes, with the length of the 
         CPU burst given in milliseconds:
                Process    Burst Time    Priority
                  P1            2           2
                  P2            1           1
                  P3            8           4
                  P4            4           2
                  P5            5           3
         The processes are assumed to have arrived in the order P1, P2, P3, P4, P5,
         all at time 0.
         a. Draw four Gantt charts that illustrate the execution of these 
            processes using the following scheduling algorithms: FCFS, SJF, 
            nonpreemptive priority (a larger priority number implies a higher 
            priority), and RR (quantum = 2).
         b. What is the turnaround time of each process for each of the 
            scheduling algorithms in part a?
         c. What is the waiting time of each process for each of these 
            scheduling algorithms?
         d. Which of the algorithms results in the minimum average waiting 
            time (over all processes)?
Chapter #07 -- Deadlocks
  1. Do problem #7.3 on page 340 (it's #7.20 on page 310 of Edition 8). (The problem starts with: "Consider the following snapshot of a system ...") Show all your work (in detail). Use the same kind of format you see here.
Chapter #08 -- Memory Management
  1. Do problem 8.11 on page 391 of the ninth edition. Here is the statement of the problem:

    Given five memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, and 750 KB, and 125KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the algorithms in terms of how efficiently they use memory.

  2. Do problem 8.13 on page 391 (page 351 in Edition 8) (It starts: "Compare the memory organization schemes of contiguous memory allocation, pure segmentation, and pure paging with ..."

  3. Do problem 8.25 on page 393 of Edition 9. Here it is:

    Consider a paging system with the page table stored in memory.

    a. If a memory reference takes 50 nanoseconds, how long does a paged memory reference take?

    b. If we add TLBs, and 75 percent of all page-table references are found in the TLBs, what is the effective memory reference time? (Assume that finding a page-table entry in the TLBs takes 2 nanoseconds, if the entry is present.)

  4. Do problem 8.28 on page 393 (It starts: "Consider the following segment table" (It is problem 8.23 in Edition 8, on page 353.) The table is supposed to read like this:
            Segment         Base            Length
               0             219              600
               1            2300               14
               2              90              100
               3            1327              580
               4            1952               96
Chapter #09 -- Virtual Memory
  1. 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. (A "word" is the smallest addressable unit of memory. The number of words in a memory is the same as the number of addresses. ) 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.)

  2. Do problem 9.19 on page 453 (It starts: "Assume that we have a demand-paged memory. The page table is held in registers. ..."). (The problem number is 9.21 in Edition 8, on pages 412-413.)
Chapter #10 -- Mass-Storage Structure (In Edition 8, this is Chapter 12)
  1. Describe each of the following disk-scheduling algorithms: FCFS, SSTF, SCAN, LOOK, C-SCAN, and C-LOOK.
Chapter #11 -- File-System Interface (In Edition 8, this is Chapter 10)
  1. Do problem 11.9 on page 540 ("Consider a file system in which a file can be ...") (It is problem 10.10 in Edition 8.)

  2. Do problem 11.17 on page 540 ("Some systems provide file sharing by ...") (It is problem 10.18 in Edition 8.)
Chapter #12 -- File-System Implementation (In Edition 8, this is Chapter 11)
  1. Do problem 12.11 on page 582 ("What are the advantages of the variant ...") (It is problem 11.10 in Edition 8.)

  2. Do problem 12.15 on page 583 ("Consider a file system on a disk that has ...") (It is problem 11.14 in Edition 8.)
Chapter #13 -- I/O Systems
  1. Do problem 13.1 on page 619 (p. 586 in Edition 8) ("State three advantages of placing ...")

  2. Do problem 13.5 on page 619 (p. 586 in Edition 8) ("How does DMA increase ...")

  3. Do problem 13.6 on page 619 (p. 586 in Edition 8) ("Why is it important to scale up ...")