This page serves as a reference for teaching/learning operating systems (OS). The material consists of video lectures, annotated slides used in the videos, practice problems with solutions, programming lab assignments, and additional reading material for reference.

The content is broadly divided into the following parts. cover that are taught in a regular UG OS course in a CS curriculum. This material is mostly based off the excellent online textbook , with pointers to the relevant chapters of the textbook provided against each lecture. A brief video lecture introduces the concepts from the textbook, and students are strongly encouraged to read the book chapters (that are freely available online) for a more in-depth understanding of the concepts. contains an as an example. The comes with concise source code and a textbook/commentary, and is a great resource to understand fundamental concepts using a simple OS. Here are links to the and the accompanying for the latest x86 version of xv6 that is used in the lectures. provides an overview of the subsystem in Linux, and some recent advances in the area of improving network I/O performance. Students and instructors are free to use this material for academic purposes. There are two broad ways to navigate through the video lectures. One can cover the basic concept video lectures based on OSTEP (lectures 1-20) first, followed by a deeper dive into operating systems using xv6 (lectures 21-32). It is also possible to do the basics and xv6 parts together (studying one concept in OSTEP and following it up with understanding the same concept in xv6) by viewing the lectures in this order: Processes (1, 21, 2, 22, 3, 23, 4, 24-26, 5-6), Memory management (7-11, 27-28), Concurrency (12-16, 29-30), and Filesystems (17-20, 31-32).

Links to other related courses for which I have made lecture videos available: Besides OSTEP, the following online/physical textbooks give a good end-to-end understanding of computer systems. , by Suzanne J. Matthews, Tia Newhall, and Kevin C. Webb. , by Randal E. Bryant and David R. O'Hallaron. Thanks to the OSTEP textbook authors for allowing me to use material from their book in my slides. Thanks also to the xv6 authors for making the xv6 OS available for teaching. Thanks to my TAs over the years who have helped me come up with the various labs and videos.

If you have found the material useful, or have suggestions on how it can be improved, I will be happy to hear from you. Please email me at [email protected].

Here are some silly that I have written for use in my lectures.

YouTube playlist with all videos below

1 Introduction to operating systems / ( )

( )

( )

( )
2 Process abstraction /
3 System calls for process management /
4 Process execution mechanisms /

5 Scheduling policies / ,
6 Inter-process communication /

A sample on Linux IPC mechanisms.
7 Introduction to virtual memory / , ( )
8 Mechanism of address translation /
9 Paging / ,
10 Demand paging / ,
11 Memory allocation and free space management algorithms /
12 Introduction to threads and concurrency / ( )

A detailed introduction to the pthreads API is here: . You can also find several tutorials like online.
13 Locks /
14 Condition variables /
15 Semaphores /


has many interesting synchronization problems
16 Concurrency bugs /
17 Communication with I/O devices / ( )
18 Files and directories /
19 File system implementation / ,
20 Hard disk internals /
21 Introduction to x86 hardware / Appendix A of

Chapters 3,4 from
Original/unmodified to be used in all xv6 labs below (or you can use the latest x86 version of the code from )

, ( )

, ( )

, ( )






22 Processes in xv6 / , Pages 21,22 of
23 Process management system calls in xv6 / , Pages 7-10 of
24 Trap handling in xv6 / , Pages 39-44 of
25 Scheduling and context switching in xv6 / , Pages 61-64 of
26 User process creation in xv6 / , Pages 23-26 of
27 Virtual memory and paging in xv6 / , Pages 29-33 of
28 Memory management for user processes in xv6 / , Pages 34-36 of
29 Locking in xv6 / , Pages 51-60 of
30 Sleep/wakeup functionality in xv6 / , Pages 65-73 of
31 Device driver and block I/O in xv6 / , Pages 46-48,75-81 of
32 Filesystem in xv6 / , Pages 81-90 of
33 Network I/O using sockets /

Simple TCP and socket programs.

TCP .
34 Network I/O subsystem in Linux Video on by former PhD students Rinku Shah and Priyanka Naik with embedded links to references
35 Kernel bypass mechanisms: DPDK Video on by former MTech students Diptyaroop Maji and Nilesh Unhale with embedded links to references

Operating System Tutorial

  • Operating System Tutorial
  • OS - Overview
  • OS - History
  • OS - Components
  • OS - Structure
  • OS - Architecture
  • OS - TAT & WAT
  • OS - Services
  • OS - Properties
  • OS - Processes
  • OS - Process Scheduling
  • OS - Scheduling algorithms
  • OS - Multi-threading
  • OS - Memory Management
  • OS - Virtual Memory
  • OS - I/O Hardware
  • OS - I/O Software
  • OS - File System
  • OS - Security
  • OS - Exams Questions with Answers
  • Operating System Useful Resources
  • OS - Quick Guide
  • OS - Useful Resources
  • OS - Discussion
  • Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Effective Resume Writing
  • HR Interview Questions
  • Computer Glossary

OS Exams Questions with Answers

These selected questions and answers are prepared from Operating Systems Exam point of view and will also help in quick revision to get good marks in Operating Systems Examination. These questions has been prepared for the computer science graduates (B.C.A, M.C.A, B.Tech, B.E. and so...), to help them understand and revise the basic to advanced concepts related to Operating System.

Following is the selected list of questions and their answers and will help in quick revision to get good marks in Operating Systems Examination.

Operating Systems Overview

What is the relationship between operating systems and computer hardware?

How Buffering can improve the performance of a Computer system?

What are the primary differences between Network Operating System and Distributed Operating System?

What inconveniences that a user can face while interacting with a computer system, which is without an operating system?

Operating Systems Process

What is the Difference between a Job and a Process?

What are the advantages of multiprogramming?

What are the advantages of Multiprocessing or Parallel System?

Operating Systems Types

What are the differences between Batch processing system and Real Time Processing System?

What are the differences between Real Time System and Timesharing System?

What are the differences etween multiprocessing and multiprogramming?

Operating Systems Process Scheduling

What is a process scheduler? State the characteristicsof a good process scheduler? OR What is scheduling? What criteria affects the schedulers performance?

Explain time slicing. How its duration affects the overall working of the system.

What is Shortest Remaining Time, SRT scheduling?

What is Highest Response Ratio Next (HRN) Scheduling?

What are the different principles which must be considered while selection of a scheduling algorithm?

Find out which algorithm among FCFS, SJF And Round Robin with quantum 10, would give the minimum average time for a given workload.

Explain pseudo parallelism? Describe the process model that makes parallelism easier to deal with.

Operating Systems Memory Allocation

What are the differences between paging and segmentation?

Explain various allocation algorithms.

When does a page fault occur? Explain various page replacement strategies/algorithms.

Operating Systems Semaphores

Explain semophores and write a short note on it.

Course Materials

My lecture notes are available now. You should read the first section before coming to class. Operating Systems Concepts is available in the book store. Any version of the book, 7th edition or later is satisfactory; you do not need to buy the latest edition (8th edition). -->

Lectures and Discussion Sections

Section TA email Room Time Office Hours
301. Mark Powers [email protected] Online Weds 11:00am
302. McKinley Sconiers-Hasan [email protected] Online Weds 12:05pm
303. Saurabh Kulkarni [email protected] Online now Weds 1:20pm
304. Shanmathi Natarajan [email protected] Online now Weds 3:30pm
305. Robert Williams [email protected] Online now Weds 4:35pm

For the first two weeks of class, you must attend the discussion section for which you registered; you cannot attend one of the other discussion sections. If we have sufficient space in the rooms, we'll allow you to shift around.

Support Staff

-->
Graders
[email protected]
Akshat Jain [email protected]
Grishma Gupta [email protected]
Nisarg Shah [email protected]
Peer Mentors
Shubham Mehta [email protected]
Wei Shi [email protected]
Connor Waity [email protected]

Exams and Quizzes

Below are the past quizzes with answers. You can also see the statistics for each quiz .

  • Quiz 11 , December 8.
  • Quiz 10 , December 3.
  • Quiz 9 , November 19.
  • Quiz 8 , November 12.
  • Quiz 7 , November 5.
  • Quiz 6 , October 29.
  • Quiz 5 , October 21.
  • Quiz 4 , October 8.
  • Quiz 3 , October 1.
  • Quiz 2 , September 24.
  • Quiz 1 , September 17.

Programming Assignments

  • Programming assignment #4 is available. You will get a chance to experience system benchmarking, doing some simple performance studies of file I/O. Due December 4th at 5pm.
  • Programming assignment #5 Extra credit, adding MIN/OPT to the page replacement algorithm simulator: The goal of this assignment is learning about optimal algorithms and how to implement one in a simulator. Due Wednesday, December 11th at 5pm.
  • Programming assignment #4 Page replacement algorithm simulator: The goal of this assignment is to think more about memory management and get experience with the critical and important area of writing simulators. Please! Get started right away. There are some tricky parts to this assignment. Due Wednesday, December 2th at 5pm.
  • Programming assignment #3 537make: The goals of this assignment is to learn about about how to start new programs running on UNIX-type operating systems, and learn about how "make" works. Due Wednesday, November 4th at 5pm. Now due Thursday, November 5th at 12:30pm.
  • Programming assignment #2 Synchronizing with Threads and Shared Memory: The goal of this assignment is to practice what we learned about in lecture and quizzes using threads and synchronization. Due Tuesday, October 13th at 5pm.

Challenge Problems

  • Challenge Problem #11 is available. This is a collection of questions to better understand file systems, including NTFS and crash recovery.
  • Challenge Problem #10 is available. This is a collection of questions to better understand file systems.
  • Challenge Problem #9 is available. This is a collection of questions to better understand page replacement algorithms and virtual memory.
  • Challenge Problem #8 is available. This is an exercise on designing the TLB from Challenge Problem 7.
  • Challenge Problem #7-1 is available. Here is another exercise on multi-level paging.
  • Challenge Problem #7 is available. Here is an exercise on multi-level paging.
  • Challenge Problem #6-1 is available. Here is a second segmentation challenge problem.
  • Challenge Problem #6 is available. This problem is an exercise on figuring out the design of the segment table structure for virtual memory.
  • Challenge Problem #5 is available. These problems will give you a chance to think about issues related to scheduling and deadlock.
  • Challenge Problem #4 is available. This problem will give you practice solving a synchronization problem with monitors.
  • Challenge Problem #3 is available. This problem will give you more practice solving a synchronization problem with semaphores.
  • Challenge Problem #2 (with one possible solution is available. This problem will give you practice solving a synchronization problem with semaphores, and teach you about another synchronization mechanism called barriers .
  • Challenge Problem #1 is available. These two problems focus on what can happen when multiple processes share (and modify) variables.

Late days cannot be used on any assignment that is due during the last week of classes.

Academic Conduct Policy

Cells phones, computer facilities.

If your personal computer has the proper compilers and libraries, you are welcome to use it for the programming assignments.

Grading Policy

If you don't take the final: If you take the final:
Programming assignments:40% Programming assignments: 30%
Quizzes:60% Quizzes:45%
Final:0% Final:25%

Your lowest quiz grade will be dropped from the average; there will be no quizzes during the first two weeks. If you take the final exam, it will be counted as above. In the past, when I've taught this class, the class GPA has been around 3.0.

Class Schedule

--> --> --> --> --> --> -->
Note: If you want to take the final, you need to email Bart and get a confirmation back. Only those students confirmed will be able to take the exam. -->
Date Lectures (Tue/Thu) Discussion (Wed) Programming Assignments
Week 1 September 3 Introduction and overview  
Week 2 September 8 & 10 Processes, Dispatching, process creation --> Intro to C Program 1: 537ps: writing the "ps" command.
Assigned: Sep 11
Week 3 September 15 & 17 Cooperating processes, semaphores.
Intro to gdb, Makefiles
Week 4 September 22 & 24 Semaphores

Discuss Challenge Problem 2
Week 5 September 29 & October 1 Monitors, Message passing, implementing synchronization
Discuss Program 2 and Challenge Problem 3 Program 2: Producer/consumer with semaphores and monitors
Assigned: Sep 29
Week 6 October 6 & 8 CPU scheduling
-->
Discuss Program 2 and Challenge Problem 4
Week 7 October 13 & 15 Deadlock, Relocation, Dynamic Address Translation
-->
Discuss Challenge Problem 5
Week 8 October 20 & 22 Segmentation, paging,
Discuss Program 3 and Challenge Problem 6 Program 3: 537make: The "make" command
Assigned: Oct 16

Week 9 October 27 & 29 Multi-level paging, TLBs
Discuss Challenge Problem 6
Week 10 November 3 & 5 Virtual memory, page replacement, thrashing.
Discuss Challenge Problem 7
Week 11 November 10 & 12 Clock, Working Set, file systems.
-->
Discuss Challenge Problem 8
Week 12 November 17 & 19 Disk allocation and scheduling
Discuss Challenge Problem 9 and Program 4 Program 4: A page replace algorithm simulator
Assigned: Nov 13

Week 13 November 24 & 26 Inodes
Week 14 December 1 & 3 Path names, directories, links
Discuss Challenge Problem 10 and Programs 4 and 5
Week 15 December 8 & 10 Advanced topic: Kerninst

Program 5 (extra credit): Adding MIN/OPT to your simulator
Assigned: Nov 16
Finals December 15  

Credits and Hours

Community standards, learning outcomes.

  • Students will learn about the three fundamental categories of operating system abstraction and function: (1) processes, synchronization, and scheduling, (2) virtual memory and memory management, and (3) file systems and persistent data storage.
  • Through programming assignments, students will learning about system libraries and kernel calls, which are mechanisms provided to user to access operating system functionality.
  • Students will learn to reason about system functionality, viewing a complex system as a layering of interacting abstractions with concrete implementations
  • Students will learn to reason about system performance, applying the lessons of algorithms and data structures to the complex operation of an operating system.

Disability Accomodations

1. Introduction
2. Operating-System Services
3. Processes
4. Threads & Concurrency
5. CPU Scheduling
6. synchronization-tools
7. Synchronization Examples
8. Deadlocks
9. Main Memory
10. Virtual Memory
11. Mass-Storage Structure
12. I/O Systems
13. File-System Interface
14. File-System Implementation
15. File-System Internals
16. Security
17. Protection
18. Virtual Machines
19. Networks and Distributed Systems
20. The Linux System
21. Windows 10

Latest Announcements

Course overview.

This course gives an introduction to the basic concepts and core principles used to structure modern computer operating systems. The goal of the class is to explain those concepts and principles that are likely to survive for many years to come. The course is a departure point for research in operating and distributed systems. Specifically, the course introduces the concepts of processes, concurrency, synchronization, scheduling, multiprogramming, memory management, and file systems.

All office hour meeting links will be posted in Blackboard and Campuswire.

Tuesday/Thursday 01:30pm-02:45pm, Hodson 210
12/14 Tuesday 09am-12pm, Hodson 210

Project Discussion Section:

  • Lab 0 Overview — TBA

OSTEP

Operating Systems: Three Easy Pieces

by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, available online for free!

Other recommended textbooks:

  • Operating Systems: Principles and Practice, 2nd Edition (2014) , by Anderson and Dahlin, Recursive Books, ISBN 978-0985673529
  • Operating System Concepts, 8th Edition (2008) , by Silberschatz, Galvin and Gagne, Wiley, ISBN 978-0470128725
  • Understanding the Linux Kernel, 3rd Edition (2008) , by Bovet, O’Reilly, ISBN 978-0596005658, (good for projects)
  • Modern Operating Systems, 4th Edition (2014) , by Tanenbaum and Bos, Pearson, ISBN 978-0133591620

Organization

This course is organized as a series of lectures taught by the instructors, assigned readings, discussion sections, homework, projects, and exams. They are complementary to each other, helping you reinforce learning on the core concepts in operating systems. Questions on examinations will be based on material covered in class, assigned readings, and projects.

Core material of the course.
The textbook and supplementary readings provide references to lectures, and are good preparations before class. But they are not a substitute for the lectures. In other words, you should come to class.
Five programming assignments, each completed individually or in groups (of no more than 3). They are essential for you to turn the theories you learned into practices.
Optional homework questions for exam preparation (not to be turned in)
Quizzes and a final exam

Your final grade for the course will be based on the following weights:

  • Projects: 60%
  • Quizzes: 15%
  • Final exam: 25%

For the programming assignments, there are no partial credits. You must turn in working code.

The strength of the university depends on academic and personal integrity. In this course, you must be honest and truthful. Ethical violations include cheating on exams, plagiarism, reuse of assignments, improper use of the Internet and electronic devices, unauthorized collaboration, alteration of graded assignments, forgery and falsification, lying, facilitating academic dishonesty, and unfair competition.

  • For undergraduates: https://studentaffairs.jhu.edu/policies-guidelines/undergrad-ethics
  • For graduate students: http://e-catalog.jhu.edu/grad-students/graduate-specific-policies
  • Unless otherwise noted, all work must be completed individually. Homework assignments (if any) may be discussed, but solutions must be completed individually. Projects may be completed in established groups, and implementation approaches may be discussed across groups, but programming code cannot be shared across groups.
  • Never copy project code or text found on the Internet, e.g., GitHub.
  • Never share code or text on the project. That also means do not make your solutions public on the Internet.
  • Never use other group's code or text in your solutions. This includes code/text from prior years or other institutions.
  • You may read but not copy Linux or BSD source code. You must cite any document or code that inspired your code . As long as you cite what you used, it's not cheating. In the worst case, we deduct points if it undermines the assignment.
  • Explain a concept to another student, or asking another student to explain a concept to you.
  • Discuss algorithms or approaches for an exercise. But you should not exchange, look at, or copy each other's code.
  • Discuss testing strategies and approaches
  • Help someone else debug if they've got stuck. But you should not give that student code solutions.

Personal Wellbeing

If you are sick please notify me by email so that we can make appropriate accommodations should this affect your ability to attend class, complete assignments, or participate in assessments. The Student Health and Wellness Center is open and operational for primary care needs. If you would like to speak with a medical provider, please call 410-516-8270, and staff will determine an appropriate course of action based on your geographic location, presenting symptoms, and insurance needs. Telemedicine visits are available only to people currently in Maryland. See also https://studentaffairs.jhu.edu/student-life/student-outreach-support/absences-from-class/illness-note-policy

The Johns Hopkins COVID-19 Call Center (JHCCC), which can be reached at 833-546-7546 seven days a week from 7 a.m. to 7 p.m., supports all JHU students, faculty, and staff experiencing COVID-19 symptoms. Primarily intended for those currently within driving distance of Baltimore, the JHCCC will evaluate your symptoms, order testing if needed, and conduct contact investigation for those affiliates who test positive. More information on the JHCCC and testing is on the coronavirus information website.

All students with disabilities who require accommodations for this course should contact me at their earliest convenience to discuss their specific needs. If you have a documented disability, you must be registered with the JHU Office for Student Disability Services (385 Garland Hall; 410-516-4720; http://web.jhu.edu/disabilities/ ) to receive accommodations.

Students who are struggling with anxiety, stress, depression or other mental health related concerns, please consider connecting with resources through the JHU Counseling Center. The Counseling Center will be providing services remotely to protect the health of students, staff, and communities. Please reach out to get connected and learn about service options based on where you are living this fall at 410-516-8278 and online at http://studentaffairs.jhu.edu/counselingcenter/ .

Student Outreach & Support will be fully operational (virtually) to help support students. Students can self-refer or refer a friend who may need extra support or help getting connected to resources. To connect with SOS, please email [email protected] , call 410-516-7857, or students can schedule to meet with a Case Manager by visiting the Student Outreach & Support website and follow “Schedule an Appointment”.

Classroom Climate

As your instructor, I am committed to creating a classroom environment that values the diversity of experiences and perspectives that all students bring. Everyone here has the right to be treated with dignity and respect. I believe fostering an inclusive climate is important because research and my experience show that students who interact with peers who are different from themselves learn new things and experience tangible educational outcomes. Please join me in creating a welcoming and vibrant classroom climate. Note that you should expect to be challenged intellectually by me, the TAs, and your peers, and at times this may feel uncomfortable. Indeed, it can be helpful to be pushed sometimes in order to learn and grow. But at no time in this learning process should someone be singled out or treated unequally on the basis of any seen or unseen part of their identity.

If you ever have concerns in this course about harassment, discrimination, or any unequal treatment, or if you seek accommodations or resources, I invite you to share directly with me or the TAs. I promise that we will take your communication seriously and to seek mutually acceptable resolutions and accommodations. Reporting will never impact your course grade . You may also share concerns with the department chair (Randal Burns, [email protected] , the Director of Undergraduate Studies (Joanne Selinski, [email protected] ), the Assistant Dean for Diversity and Inclusion (Darlene Saporu, [email protected] ), or the Office of Institutional Equity ( [email protected] ). In handling reports, people will protect your privacy as much as possible, but faculty and staff are required to officially report information for some cases (e.g. sexual harassment).

Family Accommodations Policy

You are welcome to bring a family member to class on occasional days when your responsibilities require it (for example, if emergency child care is unavailable, or for health needs of a relative). Please be sensitive to the classroom environment, and if your family member becomes uncomfortably disruptive, you may leave the classroom and return as needed.

Acknowledgments

The course syllabus, lecture and project materials are heavily influenced by UCSD CSE 120 and Stanford CS 140 class. Credits are particularly due to Geoff Voelker (UCSD), Yuanyuan Zhou (UCSD), and David Mazières (Stanford).

CS 161: Operating Systems (2020)

This is an in-depth course in operating systems design and implementation, focusing on multicore operating systems kernels. Operating systems are some of the most complex software artifacts that exist. Kernels abstract the features provided by computer hardware, making those features safer and more convenient to use. This means that OS designers have to understand how hardware works (at least at the level of specifications) and how software works. OS programmers also must become comfortable with navigating in, and contributing to, code bases too large to wholly understand. Most of us can pick up this important skill.

The course uses Chickadee , an operating system based on CS 61 WeensyOS . Chickadee takes advantage of newer hardware, language, and OS design features than many teaching operating systems.

Lecture: Monday/Wednesday, 3–4:15pm, Pierce 301 Section: Biweekly mandatory sections ( see schedule )

Class participation is mandatory.

Problem sets . There will be five:

  • Warmup and virtual memory .
  • More memory and scheduling .
  • VFS and pipes .
  • File systems .
  • Threads and a final project .

These labs will use the Chickadee framework. For some labs, you will also need to engage with (meaning, read code from) other operating systems, such as Linux. Each student has a total of 4 late days, with a maximum of 2 late days being applicable to any single assignment.

Students may partner up. However, each student will turn in individual labs . Don’t stress out; see “Policies.”

Papers . In some sections we will discuss OS research papers. You’ll need to read the papers before class and engage in paper discussion on Piazza.

Exams . There will be an in-class midterm and an in-class final.

Grading schema . A student’s final numerical grade will be calculated using this formula:

Problem set 1 : 8%

Problem set 2 : 15%

Problem set 3 : 15%

Problem set 4 : 15%

Problem set 5 : 22%

Midterm 1 : 8%

Midterm 2 : 12%

Participation : 5%

Final letter grades will be assigned using numerical grade bands that span at least 10 points. For example, if your final numerical grade is between 100 and 90, you are guaranteed to get an A or an A-; if your final numerical grade is between 89.9999 and 80, then you are guaranteed to get some kind of B. Grading bands may be more lenient than 10 points, depending on the overall performance of all students. For example, depending on the overall performance of all students, the grades of A and A- might be mapped to the range [100, 87).

CS 161 labs may be completed in groups, but we expect every student to turn in a separate code repository—even if partners’ code is very similar. Here’s what that means and why we’re doing it.

Partner/group work is an important part of CS 161. Students benefit from talking through their code with partners. There’s less stress and loneliness and easier debugging.

But partner dynamics can hurt too. We want every student to understand the work of every problem set. In partner classes, though, sometimes students shirk work, or trade off (“you do pset 4 and I’ll do pset 5”), which isn’t fair to others and reliably causes problems later. CS 161 has even broken up some relationships! And partner issues force us to put more grading weight on exams.

We seek a happy medium. We want to allow partners but avoid the pathologies of group turnin. So, we ask every student to turn in separate code for each lab. Partners may create this code together, but the code partners turn in must not be wholly identical . A good way to ensure this would be for partners to discuss ideas and code and help each other debug, but type their code individually.

All coursework other than labs must be completed individually.

Collaboration is encouraged on all aspects of the course except exams. You are welcome to communicate with your classmates about strategies for solutions and about specific bugs, and you are welcome to use Internet resources for general information. However:

  • You must not ask questions on Stack Overflow, paper.camp, or any similar site. (Of course, if you search for some C++ problem, Stack Overflow answers may come up—just don’t ask questions yourself.)
  • You must not use solutions from past (or future) years.
  • Cite help. If a classmate, other collaborator, or online resource helps you, acknowledge it in your assignment. (You do not need to cite help from course staff or resources directly linked from this site.)

Do not post your solutions in a public place.

Textbooks and resources

There are no mandatory texts for CS 161, but we can recommend some helpful texts if you like that sort of thing. They can be rented for Kindle.

  • Operating Systems In Depth: Design and Programming , by Thomas W. Doeppner. This was a required text in prior years.
  • Understanding the Linux Kernel , by Daniel P. Bovet. Though this describes a somewhat-old version of Linux, it’s well written and clear.

There are also extensive online resources on kernel design, architecture, and operating systems development.

  • Linux kernel documentation

And also many online resources (of varying quality and age) on C++. Here are some good ones.

  • C++ Super-FAQ
  • cppreference.com

Course staff

Lecturer: James Mickens : [email protected] Office hours: Tuesdays, 3pm–4:30pm, Maxwell Dworkin 335 TFs: Tina Lu: [email protected] Office hours: Thursdays, 7pm–9pm, Leverett dining hall Noah Singer: [email protected] Office hours: Sundays, 1pm–3pm, Pfoho dining hall Vincent Viego: [email protected] Office hours: Fridays, 2pm–4pm, Maxwell Dworkin first-floor lounge

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Solutions to Operating System Concepts Exercises, 9th Edition

SheldonZhong/OS_practice

Folders and files.

NameName
56 Commits
project project

Repository files navigation

Os_practice.

This is repo contains some of the exercises in the textbook Operating System Concepts, Ninth Edition. You could find more about the book in here .

Feel free to raise an issue or start pull request for my code. Apparently, my implementations are not the perfect ones, but they will usually work and meet the requirement in the exercise description.

  • Makefile 4.1%

Browse Course Material

Course info.

  • Prof. Frans Kaashoek

Departments

  • Electrical Engineering and Computer Science

As Taught In

  • Operating Systems
  • Software Design and Engineering

Learning Resource Types

Operating system engineering, assignments.

facebook

You are leaving MIT OpenCourseWare

swayam-logo

Introduction to Operating Systems

--> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> -->

Note: This exam date is subjected to change based on seat availability. You can check final exam date on your hall ticket.

Page Visits

Course layout, books and references.

  • ''xv6: a simple, Unix-like teaching operating system", Revision 8, by Russ Cox, Frans Kaashoek, Robert Morris
  • ''Operating System Concepts'', 8th edition, by Adraham Silberschatz, Pert B. Galvin, and Greg Gagne, Wiley-India edition
  • ''Modern Operating Systems'', 3rd edition, by Andrew S. Tanenbaum, PHI Learning Private Limited, New Delhi
  • The xv6 source code is available via git clone git://pdos.csail.mit.edu/xv6/xv6.git

Instructor bio

operating system assignment solutions

Prof. Chester Rebeiro

Course certificate.

operating system assignment solutions

DOWNLOAD APP

operating system assignment solutions

SWAYAM SUPPORT

Please choose the SWAYAM National Coordinator for support. * :

  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture

Operating System Tutorial

An Operating System(OS) is software that manages and handles the hardware and software resources of a computer system. It provides interaction between users of computers and computer hardware. An operating system is responsible for managing and controlling all the activities and sharing of computer resources. An operating system is a low-level Software that includes all the basic functions like processor management, memory management, Error detection, etc.

This Operating System tutorial will cover all the basic to advance operating system concepts like System Structure, CPU Scheduling, Deadlock, file and disk management, and many more.

Table of Content

  • System Structure
  • CPU Scheduling
  • Process Synchronization
  • Processes & Threads
  • Memory Management
  • Disk Management
  • Introduction of Operating System
  • Types of Operating Systems
  • Functions of Operating System
  • Real time systems
  • Tasks in Real Time systems
  • Difference between multitasking, multithreading and multiprocessing
  • Types of computer memory (RAM and ROM)
  • Difference between 32-bit and 64-bit operating systems
  • What happens when we turn on computer?
  • UEFI(Unified Extensible Firmware Interface) and how is it different from BIOS

System Structure :

  • Microkernel
  • Kernel I/O Subsystem (I/O System)
  • Monolithic Kernel and key differences from Microkernel
  • Introduction of System Call
  • Get/Set process resource limits in C
  • Dual Mode operations in OS
  • Privileged and Non-Privileged Instructions

CPU Scheduling :

  • Process | (Introduction and different states)
  • States of a process
  • Process Table and Process Control Block (PCB)
  • Process Scheduler
  • Preemptive and Non-Preemptive Scheduling
  • Measure the time spent in context switch?
  • Difference between dispatcher and scheduler
  • FCFS Scheduling | Set 1
  • FCFS Scheduling | Set 2
  • Convoy Effect in Operating Systems
  • Belady’s Anomaly
  • Shortest Job First (or SJF) scheduling | Set 1 (Non- preemptive)
  • Program for Shortest Job First (SJF) scheduling | Set 2 (Preemptive)
  • Shortest Job First scheduling with predicted burst time
  • Longest Remaining Time First (LRTF) Program
  • Longest Remaining Time First (LRTF) algorithm
  • Round Robin scheduling
  • Selfish Round Robin Scheduling
  • Round Robin Scheduling with different arrival times
  • Priority Scheduling
  • Program for Preemptive Priority CPU Scheduling
  • Priority Scheduling with different arrival time – Set 2
  • Starvation and Aging in Operating Systems</a
  • Highest Response Ratio Next (HRRN) Scheduling
  • Multilevel Queue Scheduling
  • Multilevel Feedback Queue Scheduling
  • Lottery Process Scheduling
  • Multiple-Processor Scheduling

>> Quiz on CPU Scheduling

Process Synchronization :

  • Process Synchronization | Introduction
  • Process Synchronization | Set 2
  • Critical Section
  • Inter Process Communication
  • Interprocess Communication: Methods
  • IPC through shared memory
  • IPC using Message Queues
  • Message based Communication in IPC (inter process communication)
  • Communication between two process using signals in C
  • Semaphores in operating system
  • Mutex vs. Semaphore
  • Process Synchronization | Monitors
  • Peterson’s Algorithm for Mutual Exclusion | Set 1 (Basic C implementation)
  • Peterson’s Algorithm for Mutual Exclusion | Set 2 (CPU Cycles and Memory Fence)
  • Peterson’s Algorithm (Using processes and shared memory)
  • Dekker’s algorithm
  • Bakery Algorithm
  • Producer Consumer Problem using Semaphores | Set 1
  • Dining Philosopher Problem Using Semaphores
  • Dining-Philosophers Solution Using Monitors
  • Readers-Writers Problem | Set 1 (Introduction and Readers Preference Solution)
  • Reader-Writers solution using Monitors
  • Sleeping Barber problem
  • Lock variable synchronization mechanism
  • Mutex lock for Linux Thread Synchronization
  • Priority Inversion : What the heck !
  • What’s difference between Priority Inversion and Priority Inheritance ?

>> Quiz on Process Management in OS

  • Deadlock Introduction
  • Deadlock Detection And Recovery
  • Deadlock, Starvation, and Livelock
  • Deadlock Prevention And Avoidance
  • Banker’s Algorithm
  • Resource Allocation Graph (RAG)
  • Methods of resource allocation to processes by operating system
  • Program for Banker’s Algorithm
  • Banker’s Algorithm : Print all the safe state (or safe sequences)
  • Deadlock detection algorithm
  • Program for Deadlock free condition in Operating System
  • Deadlock detection in Distributed systems
  • Techniques used in centralized approach of deadlock detection in distributed systems

>> Quiz on Deadlock

Processes & Threads :

  • Operating System | Thread
  • Threads and its types
  • Operating System | User Level thread Vs Kernel Level thread
  • Process-based and Thread-based Multitasking
  • Multi threading models
  • Benefits of Multithreading
  • Zombie Processes and their Prevention
  • Maximum number of Zombie process a system can handle
  • Operating System | Remote Procedure call (RPC)

Memory Management :

  • Memory Hierarchy Design and its Characteristics
  • Introduction to memory and memory units
  • Different Types of RAM (Random Access Memory)
  • Buddy System: Memory allocation technique
  • Memory Management | Partition Allocation Method
  • Fixed (or static) Partitioning in Operating System
  • Variable (or dynamic) Partitioning in Operating System
  • Non-Contiguous Allocation in Operating System
  • Logical vs Physical Address in Operating System
  • Requirements of memory management system
  • Memory management – mapping virtual address to physical addresses
  • Page Table Entries
  • Virtual Memory
  • Memory Interleaving
  • Virtual Memory Questions
  • Operating system based Virtualization
  • Inverted Page Table
  • Page Fault Handling
  • Segmentation
  • Memory Segmentation in 8086 Microprocessor
  • Program for Next Fit algorithm in Memory Management
  • Overlays in Memory Management
  • Page Replacement Algorithms
  • Program for Page Replacement Algorithms | Set 1 ( LRU)
  • Program for Optimal Page Replacement Algorithm
  • LFU (Least Frequently Used) Cache Implementation
  • Second Chance (or Clock) Page Replacement Policy
  • Techniques to handle Thrashing
  • Allocating kernel memory (buddy system and slab system)
  • Program for buddy memory allocation scheme in Operating Systems | Set 1 (Allocation)
  • Program for buddy memory allocation scheme in Operating Systems | Set 2 (Deallocation)
  • Static and Dynamic Libraries | Set 1
  • Working with Shared Libraries | Set 1
  • Working with Shared Libraries | Set 2
  • Named Pipe or FIFO with example C program
  • Tracing memory usage in Linux

>> Quiz on Memory Management

Disk Management:

  • File Systems
  • Unix File System
  • Implementing Directory Management using Shell Script
  • File Directory | Path Name
  • Structures of Directory
  • File Allocation Methods
  • File Access Methods
  • Secondary memory
  • Secondary memory – Hard disk drive
  • Disk Scheduling Algorithms
  • Program for SSTF disk scheduling algorithm
  • What exactly Spooling is all about?
  • Difference between Spooling and Buffering
  • Free space management

>> Quiz on Input Output Systems

  • Introduction to UNIX System
  • Important Linux Commands (leave, diff, cal, ncal, locate and ln)
  • Process states and Transitions in a UNIX Process
  • Introduction to Linux Shell and Shell Scripting
  • ‘crontab’ in Linux with Examples
  • indepth and maxdepth in Linux find() command for limiting search to a specific directory.

Types of Operating System

  • Batch OS (e.g. Transactions Process, Payroll System, etc.)
  • Multi-programmed OS(e.g. Windows, UNIX, macOS, etc.)
  • Timesharing OS(e.g. Multics, Linux, etc.)
  • Real-Time OS(e.g. PSOS, VRTX, etc.)
  • Distributed OS(e.g. LOCUS, Solaris, etc.)

Operating System Functions

  • Memory and processor Management
  • Network Management
  • Security Management
  • File Management
  • Error Detection
  • Job Accounting

FAQs on Operating System

Q.1 why learn operating systems.

OS is the most important part of a computer. Through OS users can interact with computer software. It provides an interface between Hardware and CPU. It also provides a platform for the program to run on it and services to users. It performs all the basic tasks required in an application.

Q.2 Write the top 10 Operating System Examples?

Some most popular OS examples are given below: Windows Linux MacOS Ios Android Ubuntu CentOS Solaris Chrome OS Fedora

Q.3 What are the Advantages of a multiprocessor system?

A multiprocessor system involves the processing of two or more computer programs simultaneously that share the same memory area. It increases reliability.

Q.4 What is a thread in OS?

A thread is a lightweight process or subprogram which is part of the process or a program. A thread has its own Registers, Stack, State, and Program counter.

Quick Links :

  • Last Minute Notes (LMNs)  | Operating Systems
  • Commonly Asked Operating Systems Interview Questions
  • Gate Practice Questions
  • ‘Quizzes’ on Operating Systems !
  • ‘Practice Problems’ on Operating Systems !

Please Login to comment...

Similar reads.

  • Operating Systems

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

IMAGES

  1. Unmatched Operating system assignment solutions

    operating system assignment solutions

  2. Operating System assignment help

    operating system assignment solutions

  3. SOLUTION: Logical organization of operating system assignment

    operating system assignment solutions

  4. Operating System: Assignment 2 solution

    operating system assignment solutions

  5. Legitimate Operating System Assignment Help From Experts

    operating system assignment solutions

  6. Operating System Unit 4 Assignment

    operating system assignment solutions

VIDEO

  1. Operating System Assignment-1 (Linux Script) || JU

  2. Operating System Assignment

  3. Operating System Assignment

  4. PROCESS SYNCRONIZATION IN OPERATING SYSTEM ( CS405 )

  5. Operating System & Computing Networks

  6. Operating System Video Assignment

COMMENTS

  1. Operating System Concepts

    We provide solutions to the Practice Exercises of the Ninth Edition of Operating System Concepts , by Silberschatz, Galvin and Gagne. These practice exercises are different from the exercises provided in the text. (Solutions to the exercises in the text are available only to instructors.) Students are encouraged to solve the practice exercises ...

  2. Assignment 1-solution

    1. Homework Assignment #1 Solution. Q1. (8 points) (Chapter 1, Problem 1) What are the two main functions of an operating system? ANSWER: An operating system performs two main functions: 1) providing application programmers a clean abstract set of resources instead of the messy hardware ones as an extended machine; and 2) managing hardware resources as a resource manager.

  3. Lectures on Operating Systems

    Lectures on Operating Systems. This page serves as a reference for teaching/learning operating systems (OS). The material consists of video lectures, annotated slides used in the videos, practice problems with solutions, programming lab assignments, and additional reading material for reference. The content is broadly divided into the following ...

  4. OS Exams Questions with Answers

    Advertisements. OS Exams Questions with Answers - This tutorial covers concepts like overview of Operating System, Types, Services, Properties, Process Scheduling, CPU Scheduling algorithms, Deadlock, Multi-Threading, Memory Management, I/O, Disk Management, Interrupts, File System, Hardware Management etc for BCA, MCA, B.Tech Engineering Students.

  5. GitHub

    This repository contains solutions of Problem 2.24 and 3.19 from the textbook Operating System Concepts 10th Edition by Abraham Silberschatz, Peter Baer Galvin and Greg Gagne. - Thej26/CS252_assignment

  6. PDF CS140

    Assignment requirements • Do not look at other people's solutions to projects • Can read but don't copy other OSes - E.g., Linux, OpenBSD/FreeBSD, etc. • Cite any code that inspired your code - As long as you cite what you used, it's not cheating - Worst case we deduct points if it undermines the assignments • Projects due Fridays ...

  7. Week 1: Operating Systems Part I

    This section provides materials for Week 1: Operating Systems Part I . Materials include lecture outlines, slides, and readings as well as recitation and assignment activities. Browse Course Material ... System Critique Assignment 1: Evaluate and Assess a Domain Name System (DNS)

  8. Operating System Engineering, Assignment 1

    This file contains the information regarding Operating System Engineering, Assignment 1. Resource Type: Assignments. pdf. 498 kB Operating System Engineering, Assignment 1 Download File ... grading Exams with Solutions. notes Lecture Notes. group_work Projects with Examples. assignment Programming Assignments. Download Course.

  9. CS 537

    There are some tricky parts to this assignment. Due Wednesday, December 2th at 5pm. Programming assignment #3 537make: The goals of this assignment is to learn about about how to start new programs running on UNIX-type operating systems, and learn about how "make" works. Due Wednesday, November 4th at 5pm.

  10. Operating System Concepts

    Greg Gagne. We provide solutions to the Practice Exercises of the Tenth Edition of Operating System Concepts , by Silberschatz, Galvin and Gagne. These practice exercises are different from the exercises provided in the text. (Solutions to the exercises in the text are available only to instructors.) Students are encouraged to solve the ...

  11. CS 318: Principles of Operating Systems, Fall 2021

    Course Overview. This course gives an introduction to the basic concepts and core principles used to structure modern computer operating systems. The goal of the class is to explain those concepts and principles that are likely to survive for many years to come. The course is a departure point for research in operating and distributed systems.

  12. PDF Lecture 1: Introduction

    Principles of operating system design!Course overview -course information -schedule, assignments, grading and policy -other organization issues -see web pages for more information. OS is pervasive ... Solutions: -CPU Preemption *give application something, can always take it away (via clock interrupts) ...

  13. CS 161: Operating Systems (2020)

    The course uses Chickadee, an operating system based on CS 61 WeensyOS. Chickadee takes advantage of newer hardware, language, and OS design features than many teaching operating systems. Lecture: Monday/Wednesday, 3-4:15pm, Pierce 301 Section: Biweekly mandatory sections (see schedule) Coursework. Class participation is mandatory. Problem ...

  14. GitHub

    OS_practice. This is repo contains some of the exercises in the textbook Operating System Concepts, Ninth Edition. You could find more about the book in here. Feel free to raise an issue or start pull request for my code. Apparently, my implementations are not the perfect ones, but they will usually work and meet the requirement in the exercise ...

  15. Operating System Concepts 8th Edition Textbook Solutions

    Unlike static PDF Operating System Concepts 8th Edition solution manuals or printed answer keys, our experts show you how to solve each problem step-by-step. No need to wait for office hours or assignments to be graded to find out where you took a wrong turn. You can check your reasoning as you tackle a problem using our interactive solutions ...

  16. Assignments

    This section contains the in-class assignments for the course, including any associated files. Browse Course Material ... Operating System Engineering. Menu. More Info Syllabus Calendar ... grading Exams with Solutions. notes Lecture Notes. group_work Projects with Examples. assignment Programming Assignments.

  17. PDF Operating Systems

    History of Operating Systems. Phase 1: Hardware expensive, humans cheap. User at console: single-user systems. Batching systems. Multi-programming systems. Phase 2: Hardware cheap, humans expensive. Timesharing: Users use cheap terminals and share CPU. Timesharing (1970-) Timer interrupt used to multiplex CPU between jobs.

  18. Introduction of Operating System

    An operating system acts as an intermediary between the user of a computer and computer hardware. The purpose of an operating system is to provide an environment in which a user can execute programs conveniently and efficiently. An operating system is software that manages computer hardware. The hardware must provide appropriate mechanisms to ...

  19. Operating System Engineering, Exam 1 Solutions, Fall 2011

    This file contains the information regarding Operating System Engineering, Exam 1 Solutions, Fall 2011. Browse Course Material Syllabus ... This file contains the information regarding Operating System Engineering, Exam 1 Solutions, Fall 2011. Resource Type: Exams. pdf. ... assignment Programming Assignments. Download Course.

  20. Operating System Concepts

    Create a free account to view solutions for this book. Find step-by-step solutions and answers to Exercise 7a from Operating System Concepts - 9781119320913, as well as thousands of textbooks so you can move forward with confidence.

  21. Resources

    Operating System Engineering, Assignment 3. See all arrow_forward. Exams. pdf. 193 kB Operating System Engineering, Exam 1 Solutions, Fall 2003. pdf. 255 kB Operating System Engineering, Exam 1 Solutions, Fall 2004. pdf. 115 kB Operating System Engineering, Exam 1 Solutions, Fall 2005. pdf. 128 kB ...

  22. Introduction to Operating Systems

    Introduction to Operating Systems. Operating systems (OS) provide the crucial interface between a computer's hardware and the applications that run on it. It allows us to write programs without bothering much about the hardware. It also ensures that the computer's resources such as its CPU, hard disk, and memory, are appropriately utilized.

  23. Operating System Tutorial

    An Operating System (OS) is software that manages and handles the hardware and software resources of a computer system. It provides interaction between users of computers and computer hardware. An operating system is responsible for managing and controlling all the activities and sharing of computer resources. An operating system is a low-level ...

Course Status : Completed
Course Type : Core
Duration : 8 weeks
Category :
Credit Points : 2
Undergraduate
Start Date : 26 Jul 2021
End Date : 17 Sep 2021
Enrollment Ends : 09 Aug 2021
Exam Date : 26 Sep 2021 IST