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

( Latest Revision -- Wed Jan 24 22:18 PST 2018 )
[2018/01/24: Initial Updates ]

Homework/Study Problems for CS 3750

If you do a good job on the homework problems, you may do better on tests and get a better course grade.

Directions for Writing up the Problems

When you do a problem, show mastery of the material. Write a complete solution, Leaving 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 all your work on the problems, at least until the end of the semester.

Typically I will go over answers on the class day prior to giving you a quiz on related material. Possibly I'll do it before the quiz, but on the the same day as the quiz. Take advantage of this by revising and correcting your solutions, using the information you get from me about what the solutions should be.

Form and Format


See the class schedule to find out what days I will go over the solutions to each problem set.


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 500 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 problem 5.4 from the text: "Explain why spinlocks are not appropriate for single-processor systems, yet are often used in multiprocessor systems."

  2. Do problem 5.5 from the text: "Show that, if the wait() and signal() semaphore operations are not executed atomically, then mutual exclusion may be violated."

  3. 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.

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, 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. Consider a paging system with the page table stored in memory.

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

    b. If we add TLBs, and 85 percent of all page-table references are found in the TLBs, what is the effective memory reference time? (Assume that checking for a page-table entry in the TLBs takes 3 nanoseconds, whether or not one is found.)

  4. Do problem 8.20 on page 392 (It goes like this: "Assuming a 1-KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers):
    a.     3085
    b.    42095
    c.   215201
    d.   650000
    e.  2000001
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.)