Midterm #2 Study Questions (answers)
- If an operating system implements preemption of an executing process, it can still use a non-preemptive scheduling policy. Explain the difference between low level preemption and preemptive scheduling policy.
- Explain why the straightforward implementation of the Critical Section problem (Figure 6.7 in Section 6.4 of Silberschatz Ed. 8) does not guarantee non-starvation.
- Define the reader/writer problem and explain how it can be solved using only mutexes.
- Write pseudocode for a solution to the Bounded Buffer problem that using semaphores.
Final Study Questions
Instructor: Micah Beck
Office: Min Kao 433
Office Hours: Wednesday 1:20-2:20pm
Email: mbeck@eecs.utk.edu
Class Time: 10:10 am - 11:00 am MWF
Classroom: Min Kao Engineering 524
TA: Chad Effler
TA Office Hours: 1-3pm Mon & Fri
TA Office: MK 351
TA email: teffler@utk.edu
TA: Yunhe Feng
TA Office Hours: 3 - 5pm Tues
TA Office: MK 205
TA email: yfeng14@vols.utk.edu
Textbook
Operating System Concepts
Authors: Abraham Silberschatz, Peter B. Galvin, Greg Gagne
Edition: 7 or higher
Editions 7, 8 and 9 are available for purchase or rental at a variety of prices, in hardback, paperback, looseleaf and in Kindle e-book reader format (can be read on various platforms).
Reading Assignments
All reading assignments refer to the ninth edition of Silberschatz
(ISBN: 978-1-118-06333-0), but the corresponding sections in the seventh or
eigth editions are equivalent and may be substituted.
Reading Assignment for 1/9/2015 |
Chapters 1 & 2 |
Reading for 1/23/2015 |
Chapter 3
|
Reading for 2/2/2015 |
Chapter 4.1-4.3
|
Reading for 2/11/2014 |
Chapter 5.4-5.9
|
Reading for 2/23/2015 |
Chapter 6
|
Reading for 3/23/2014 |
Chapter 7
|
Reading for 3/24/2014 |
Chapter 8
|
Reading for 4/15/2014 |
Chapter 9
|
Reading for 4/20/2015 |
Chapter 11.1-11.3, 12.1-12.3 |
Homework Assignments
All reading assignments refer to the ninth edition of Silberschatz.
The homework problems will be made available to students in digital form.
All homework solutions are to be submitted through Blackboard.
#1 | Homework due 1/21/2015 |
2.13, 2.14, 2.16, 2.17, 2.18 |
pdf |
#2 | Homework due 1/28/2015 |
3.4, 3.7, 3.9, 3.13, 3.14, 3.16, 3.17 |
pdf |
#3 | Homework due 2/5/2015 |
4.8, 4.10, 4.11, 4.13, 4.14 |
pdf |
#4 | Homework due 2/27/2015 |
5.9, 5.10, 5.11, 5.13, 5.14, 5.17 |
pdf |
#5 | Homework due 3/11/2015 |
6.8, 6.12, 6.16, 6.17, 6.32 |
pdf |
#6 | Homework due 4/2/2015 |
7.10, 7.11, 7.12, 7.13, 7.25, 7.26 | pdf |
#7 | Homework due 4/20/2015 |
8.9, 8.11, 8.12, 8.15, 8.17, 8.20, 8.23 | pdf |
#8 | Homework exercises (no due date, ungraded) |
9.14 - 16, 9.18 - 9.20, 9.22, 9.23, 9.25 | pdf |
| | 11.12, 11.14 | pdf |
12.12.10, 12.16 | pdf |
Annotated Course Syllabus
The couse syllabus and reading will mirror the first 13 chapters of the book.
Chapters 11, 12 and 13 may be combined or abbreviated depending on the
class schedule.
- Chapter 1: Introduction
- Chapter 2: Operating-System Structures
- What are the reasons for using libraries?
- What is a protected resource?
- What is a manager?
- How is virtualization used to manage resources?
- Chapter 3: Processes
- What is a process? How does it differ from a task or a thread?
- What are the elements of process context?
- How is the process/task control block used in operating systems?
- What are the steps in kernel/user and user/user context switches?
- How are runnable processes managed, and how is the next to run chosen?
- How are processes created?
- Chapter 4: Threads
- What are the major reasons for programming with threads?
- What is the difference between a thread and a (heavyweight) process?
- What are the different modes of support that an OS kernel may provide for threads?
- What are the strengths of preemptive vs. non-preemptive threads?
- How are threads used in the programming of multicore architectures?
- Chapter 5: Process Synchronization
- Why is mutual exclusion important in preemptive and parallel systems?
- What are the requirements for a solution to the critical section problem?
- What are Semaphores and Monitors and how are they used for process synchronization?
- What are Deadlock and Priority Inversion?
- Explain the Bounded Buffer and Dining Philosophers' problems and their solutions.
- Chapter 6: CPU Scheduling
- What is the CPU-I/O burst cycle?
- What is the function of a CPU scheduler? When are scheduling decisions made?
- What are the usual criteria used in making scheduling decisions?
- What are the criteria used in making preemptive scheduling decisions?
- What is the ideal or optimal scheduler? Why can't it be implemented?
- What is the definition and important attributes of these CPU scheduling algorithms: FCFS, SJF, priority, RR and multilevel?
- Chapter 7: Deadlocks
- What are the requirements for deadlock to be possible in a system?
- What are the techniques for handling deadlocks?
- How can deadlock be prevented/avoided/detected?
- How is recovery from deadlock possible?
- Chapter 8: Main Memory
- What are the definitions and uses for swapping, paging and segmentation?
- Describe a straightforward hardware implementation of paging.
- What is a Translation Look Aside Buffer, and why is it important in paging?
- How does a multi-level page table work? A hashed page table? An inverted page page table?
- Chapter 9: Virtual Memory
- How is page management hardware used to support demand paging? copy-on-write?
- Define and explain one strength and one weakness of random, FIFO, optimal, LRU and LRU approximation page replacement algorithms.
- Explain one explain one LRU algorithm and the second chance LRU approximation algorithms, and compare their use of resources.
- What are the causes of thrashing and what can be done to avoid it?
- Explain three advantages of memory-mapped files.
- Chapter 11 & 12: File-System Interface & Implementation
- How is the inode used to implement sequential files?
- Why does the use of a memory cache raise the possibility of inconsistent file system structures on disk in the case of a system crash?
- What is read-ahead and why is it central to file system read performance?
- Why are Unix directories a performance bottleneck while storing large numbers of larges?
Course Requirements and Grading
- There will be two midterm exams and a final exam.
- Homework will be assigned on a regular basis.
The final course grade will be calculated as
10%(H) + 25%(M1') + 25%(M2') + 40%(F)
where
- H = homework grade
- M1' = MAX(final exam grade, midterm 1 grade)
- M2' = MAX(final exam grade, midterm 2 grade)
- F = final exam grade
For example, a student who scores 70 on midterm 1, 85 on midterm 2, 84 on the final, and 75 on the homework will have an overall score of
10%(75) + 25%(MAX(84, 70)) + 25%(MAX(84, 85)) + 40%(84) = 83.35
The intention of this grading scheme is that students have two chances to show their mastery of the material covered in the two midterms: on the midterm and on the cummulative final.
The 90% of the course grade that is awarded on the basis of exams is available to every student at the time they take the final.
While it is possible for a student to skip the midterm exams and rely solely on the homework and final for their course grade, students are strongly advised against this approach.
Here are some reasons for this advice:
- Taking the midterm exams is a no-risk proposition: it can only improve a student's final course grade.
- The midterms are more focused, and so it should be easier to study the material covered deeply and get a good grade.
- There is less presure on students when taking midterms than during the final exam period.
- Taking the midterms is the best preparation for the final exam.