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

( Latest Revision -- Dec 22, 2022 )

Study Problems for CS 3750




If you do a good job on the study problems, it may help you do better on tests and therefore get a better course grade. (I will not collect or grade these problems. You are "on your honor" to follow the directions here, and self-check your answers when I go over my answers in class.)

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 my 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


"DUE DATES"

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



WARNING ABOUT PROBLEM NUMBERS

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.8 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 & Concurrency
  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 -- CPU Scheduling
  1. Do the following problem. (It is problem 5.4 on page 251 or page 252 of edition 10, and it is problem 6.16 on page 308 of edition #9.) The electronic version of the text gives you access to the answers to the problem, but don't look until after you have finished working the problem on your own. I will go over the answer in class, as I usually do.
         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 #06 -- Synchronization Tools and
Chapter #07 -- Synchronization Examples
  1. Do problem 6.3 from the printed text: "Explain why spinlocks are not appropriate for single-processor systems, yet are often used in multiprocessor systems."

  2. Do problem 6.4 from the printed 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 #08 -- Deadlocks
  1. Do problem #8.3 on page 344 of the textbook (both the e-text and paperback). 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. The e-text provides some "bottom line" types of answers, but no "work." I recommend not looking at those answers until after you have done as much of the work as you can.
Chapter #09 -- Main Memory
  1. Do problem 9.6 on page 386 of the tenth 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 9.7 on page 386 (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 #10 -- Virtual Memory
  1. 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. Assume that we have a demand-paged memory. The page table is held in registers. It takes 8 milliseconds to service a page fault if an empty frame is available or if the replaced page is not modified and 20 milliseconds if the replaced page is modified. Memory-access time is 100 nanoseconds.

    Assume that the page to be replaced is modified 70 percent of the time. What is the maximum page fault-fault rate for an effective access time of no more than 200 nanoseconds?
Chapter #11 -- Mass-Storage Structure
(No problems on this chapter)
Chapter #12 -- I/O Systems
(No problems on this chapter)
Chapter #13 -- File-System Interface
  1. Consider a file system in which a file can be deleted and its disk space reclaimed while links to that file still exist. What problems may occur if a new file is created in the same storage area or with the same absolute path name? How can these problems be avoided?

  2. Some systems provide file sharing by maintaining a single copy of a file; other systems maintain several copies, one for each of the users sharing the file. Discuss the relative merits of each approach.
Chapter #14 -- File-System Implementation
  1. What are the advantages of the variant of linked allocation that uses a FAT to chain together the blocks of a file?

  2. Consider a file system on a disk that has both logical and physical block sizes of 512 bytes. Assume that the information about each file is already in memory. (Make sure you read the discussion in the text that explains what that "information about each file" is. If not, you'll probably get the answer to this question wrong.) For each of the three allocation strategies (contiguous, linked, and indexed), answer these questions:
    1. How is the logical-to-physical address mapping accomplished in this system? (For the indexed allocation, assume that a file is always less than 512 blocks long.)
    2. If we are currently at logical block 10 (the last block accessed was block 10) and we want to access logical block 4, how many physical blocks must be read from the disk?
Chapter #15 -- File-System Internals
  1. Explain how the VFS layer allows an operating system to support multiple types of file systems easily. (This is problem 15.1 in the tenth edition.)