and (University of Wisconsin-Madison)

- - - - - - - - - - - - -

Welcome to (now -- see for details), a free online operating systems book! The book is centered around three conceptual pieces that are fundamental to operating systems: and In understanding the conceptual, you will also learn the practical, including how an operating system does things like schedule the CPU, manage memory, and store files persistently. Lots of fun stuff! Or so fun?

This book in PDF form, as seen below. For those of you wishing to a copy, please consider the following:

this may be the best printed form of the book (it really looks pretty good), but it is also the most expensive way to obtain of operating systems (a.k.a. or according to students). Now just: Same book as softcover above, but printed through Amazon CreateSpace. Now just: (but works with Prime shipping) this is a nice convenience and adds things like a hyperlinked table of contents, index of terms, lists of hints, tips, systems advice, and a few other things not seen in the free version, all in one massive DRM-free PDF. Once purchased, you will always be able to get the latest version. Just: Really, just the PDF and does not include all the bells and whistles common in e-pub books.

Some resellers on Amazon buy old versions of the books and claim to sell them as “new” on Amazon (click for an example); buy from them at your own risk. In general, buy either directly from Lulu.com or Amazon.com (not a reseller). For Amazon, go to and look for Seller Information to be Amazon.com.

Merch: Can't bear to go out in public without OSTEP? How about an Operating Systems: Three Easy Pieces T-shirt or laptop sticker or bathmat or blanket or mug or check out the whole store?

Donate: By popular demand, another way to support this site and its contents: donate! Click to donate $1 - $10 - $20 - $50 - or click here to donate any amount you want! Your donation helps keep this book going. Think about it: if everyone who came to this website donated just one dollar, we'd have at least three dollars. Thanks!

Another way to help the book out: cite it! Here is the BiBTeX entry (seen below); you can also link to the site of the best free operating systems book on the market.

Operating Systems: Three Easy Pieces Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau Arpaci-Dusseau Books November, 2023 (Version 1.10)

And now, the free online form of the book, in chapter-by-chapter form (now with chapter numbers!):

INSTRUCTORS: If you are using these free chapters, please just link to them directly (instead of making a copy locally); we make little improvements frequently and thus would like to provide the latest to whomever is using it. Also: we have made our own class-preparation notes available to those of you teaching from this book; please drop us a line at [email protected] if you are interested.

HOMEWORKS: Some of the chapters have homeworks at the end, which require simulators and other code. More details on that, including how to find said code, can be found here: HOMEWORK

PROJECTS: While the book should provide a good conceptual guide to key aspects of modern operating systems, no education is complete without projects. We are in the process of making the projects we use at the University of Wisconsin-Madison widely available; an initial link to project descriptions is available here: PROJECTS. Coming soon: the automated testing framework that we use to grade projects.

BOOKS NEWS: Many small things to move to version 1.10. Track changes: NEWS

ACKNOWLEDGEMENTS: These students have greatly contributed to this effort, through endless bug reports and other comments. Your name could go here! (as well as in the printed book): ERRATA

operating system homework

ACKS: The authors wish to acknowledge all the sources of funding for their research over the years. In particular, the authors appreciate the strong support from the National Science Foundation (NSF), which is an essential part of the modern research and educational infrastructure of the USA.

Solutions to Practice Exercises

1. Introduction
2. Operating-System Structures
3. Processes
4. Threads
5. Process Synchronization
6. CPU Scheduling
7. Deadlocks
8. Memory Management
9. Virtual Memory
10. Mass-Storage Structure
11. File-System Interface
12. File-System Implementation
13. I/O Systems
14. Protection
15. Security
16. Virtual Machines
17. Distributed Systems
18. The Linux System
19. Windows 7
20.Historical Perspective

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

Study.com

In order to continue enjoying our site, we ask that you confirm your identity as a human. Thank you very much for your cooperation.

Computer Science

Operating systems: three easy pieces.

Credit goes to palladian

Introduction

First, we should be frank: it’s really hard to find a good self-contained online course on operating systems. OSTEP is the best course we’ve found so far. We describe below two approaches to the course, a “Base” approach which is suitable for most students, and an “Extended” approach, which is appropriate for students intending to specialize in systems programming.

The “base” approach covers all of our operating system curriculum requirements and should take about 80 hours of work.

The “extended” approach contains all of the work of the base approach and more. It involves learning very serious C and x86 assembly, and delving deep into kernel programming. It takes significantly more time (over 200 hours) and is much more challenging. For those students interested in this area of computing it is also highly rewarding.

Base Approach

  • Read through the free online textbook Operating Systems: Three Easy Pieces
  • Complete the homework questions at the end of each chapter. (There is an associated Github repository for the homeworks.)

This should take about 8 weeks, 10 hours/week. That’s all you need to do!

You will need a Unix/Linux system, some basic command line tools, and a C compiler (such as GCC or Clang). On Windows, you can install Ubuntu in a virtual machine, or use WSL (Windows Subsystem for Linux). Mac OS is Unix-like, so it should be OK to use.

Course Links

  • Homework Source Code Repo
  • Homework Solutions

Question : I see some C code in this book. How much C do I need to know?

Answer : You’ll need to read and understand some C code in this book. You’ll need basic understanding of arrays, pointers and print formatting. You can consult the free book Modern C by Jen Gustadt . The CS50 Manual pages are also helpful to look up functions. You shouldn’t spend too much time on learning C.

The code you’ll read is fairly simple and presented in short fragments. The book helps you out quite a bit by manually introducing many C APIs such as the Process API, the Thread API, and so on. You can type, compile and run the code fragments, and read the corresponding explanations. The book explains them in great detail in a conversational style that’s fun to read.

You will also write a little bit of C code. Only a minority of the chapters (about 10 out of 50) ask you to write some C code (while the other chapters require you to run provided simulation code and answer questions). These are usually simple, short C programs that imitate the code that was presented in that chapter, with small modifications.

If you are getting stuck on these, please don’t spend too much time on them. There is a great solution set here . There is no honor code for this, so you are free to use the solutions. If you find yourself spending too much time, feel free to read and understand the solutions instead. Your main priority should be to gain understanding of operating systems concepts, not to master C coding.

Extended Approach

If you’ve chosen this option, then this is the first course in the OSSU curriculum for which you’ll need to learn some prerequisites on your own before starting it, in addition to the courses that come before it in the curriculum. You might also run into some issues running the scripts for homework demos and for testing your solutions to the projects (although we hope we’ve solved most of those by now).

That said, if you’re able to commit the time required for the prerequisites, we believe the reward is well worth the effort: this course is exciting, interesting, and quite useful for other fields of computer science and programming. One big attraction of this course is the opportunity to see a simplified but fully-functional Unix-like operating system in action and understand the concepts and design decisions that went into it as well as the low-level implementation details.

You should either watch all the lecture videos or read chapters 1 through 47 in the textbook (don’t worry, the chapters are usually just a few pages long) as well as finish the projects listed below. We also strongly encourage you to do the homework exercises as they’re assigned on the course website or in the book chapters; think of these like the “check-your-understanding” questions that pop up in the middle of lecture videos on sites like Coursera or edX.

Prerequisites

This class requires a lot of experience programming in C. You should finish one of the C books listed in the resources below before starting this course; if you try to learn C at the same time as the course material, you’re likely to feel overwhelmed. If you haven’t used C before, you should expect to spend a lot of time on this; it’s hard to predict how long it might take for each person, but a rough estimate might be 8-10 hours per week for 3-5 weeks. You can always learn C alongside another OSSU course or even redo the exercises for other courses in C to gain practice with it.

You should also finish both parts of Nand2Tetris before starting this course. OSTEP focuses on the real-world x86 and x86_64 architectures, so you’ll have to fill in some gaps in order to translate the concepts you learned in Nand2Tetris to a new architecture. You can do that with the x86 resources below, but note that they all assume you know C, so learn that first. This should take around 6-8 hours in total.

  • Course website
  • Lecture videos

This course was originally taught as CS 537 at the University of Wisconsin by the author of the OSTEP textbook, so the projects are assigned in the course according to the best times to give UWisconsin students access to on-campus resources like recitation sections and office hours. That means they don’t match up perfectly with the material being covered at that time in the lectures or textbook chapters. We recommend doing the course in the following order instead.

Reading order

  • Read chapters 1 and 2 of the OSTEP textbook and watch the first half (the introduction) of lecture 1.
  • Do the initial-utilities project; it’s intended as a litmus test for you to make sure you’re comfortable enough with C before taking this class. You can watch discussion 1 for help. If it takes you more than 2 hours to write the code (not counting the discussion time and any time spent debugging), you should consider spending more time learning C before moving on in the course. (If you want more practice, you can do initial-reverse too, but it’s not required.)
  • Watch lectures 1 through 5 and read chapters 3 through 24 of the OSTEP textbook. We recommend doing the homework assignments as they come up in the course calendar or book chapters.
  • Watch discussion 3 and reread chapter 5, then do the processes-shell project.
  • Read the annotated guide to xv6 linked in the resources section below, starting from the beginning and stopping after the System Calls: Processes section.
  • Watch discussion 2, then do the initial-xv6 project.
  • Watch discussion 5, then do the scheduling-xv6-lottery project.
  • Watch discussion 7, then do the vm-xv6-intro project.
  • Watch lectures 6 through 9 (and optionally, the review lecture) and read chapters 25 through 34; again, you’re encouraged to do the homework.
  • Watch discussion 10, then do the concurrency-xv6-threads project.
  • Watch discussions 11 and 12, then do the concurrency-mapreduce project.
  • Watch lectures 10 through 14 (and optionally, the second review lecture) and read chapters 35 through 47; remember to do the homework along with the lectures or chapters.
  • Do the filesystems-checker project.

Running the Projects

This course was originally taught as CS 537 at the University of Wisconsin by the author of the OSTEP textbook, which means that the homework and projects were written with those students as a target audience and designed to be run on UWisconsin lab computers with specific software versions pre-installed for students. We hope this section fixes that so you can run them on other computers, but we haven’t tested this on every computer, so if you run into other issues, let us know on the Discord channel and we’ll try to help out.

In order to run the homework and projects on Linux or macOS, you’ll need to have all of the following programs installed:

You will also need to install qemu , but we recommend using the patched version provided by the xv6 authors; see this link for details.

On macOS, you’ll need to install a cross-compiler gcc suite capable of producing x86 ELF binaries; see the link above for details as well.

On Windows, you can use a Linux virtual machine for the homework and projects. Some of these packages are not yet supported on Apple M1 computers, and virtual machine software has not yet been ported to the new processor architecture; some students have used a VPS to do the homework and projects instead.

Next, clone the ostep-homework and ostep-projects repositories:

You’ll have to clone the xv6-public repository into the directory for each xv6-related OSTEP project. You could use the same copy for all the projects, but we recommend using separate copies to avoid previous projects causing bugs for later ones. Run the following commands in each of the initial-xv6 , scheduling-xv6-lottery , vm-xv6-intro , concurrency-xv6-threads , and filesystems-checker directories.

Hints and tips for Projects

  • initial-reverse : the error messages that are needed to pass the tests were wrong! The provided text said "error: ..." but the tests expected "reverse: ..." so make sure to match the tests’ expectations in your code.
  • hints and tips for processes-shell
  • hints for Project 1B: initial-xv6
  • hints for scheduling-xv6-lottery
  • hints for vm-xv6-intro

Please don’t try to learn C from sites like GeeksforGeeks, TutorialsPoint, or Hackr.io (we’re not even gonna link to them here). Those are great resources for other languages, but C has way too many pitfalls, and C tutorials online are often filled with dangerous errors and bad coding practices. We looked at many C resources for the recommendations below and unfortunately found many bad or unsafe ones; we’ll only include the best ones here, so look no further!

We recommend learning C by working through (the entirety of) Jens Gustedt’s Modern C , which is freely available online . This book is relatively short and will bring you up to speed on the C language itself as well as modern coding practices for it. Make sure to do all the exercises in the footnotes!

While the book above is our default recommendation, we also recommend K.N. King’s C Programming: A Modern Approach as a second, more beginner-friendly option. It has some disadvantages: it’s much longer (almost 850 pages), it’s not available for free (and copies can be hard to find), and it’s not quite as recent as Modern C (but still relevant nonetheless). That said, it has more exercises if you want extra practice, and the Q&A sections at the end of each chapter are filled with pearls of C wisdom and answers to C FAQs. It also covers almost the entirety of the C language and standard library, so it doubles as a reference book.

CS 50 doesn’t quite cover enough C for OSTEP, but if you’ve already taken CS 50, you can supplement it with the books above.

Additional ( optional ) resources include:

  • CS 50 Manual Pages : a great reference for looking up C library functions; most functions include both the usual manual as well as a beginner-friendly “less comfortable” option (just note that the “less comfortable” version uses string as an alias for char * .)
  • cdecl : a tool to translate C gibberish into English.
  • C track on exercism.org : additional practice exercises.
  • Secure Coding Practices in C and C++ : if you want to understand why other C resources are so unsafe.
  • The C Programming Language : the original book on C by its creators. Too outdated for OSTEP, but a good read if you manage to find a copy.

x86 Architecture and Assembly Language

Nand2Tetris has already introduced most of the concepts you’ll need to understand systems and computer architectures, so now you just need to port that knowledge to the real-world (32-bit) x86 architecture.

The easiest way to do that is by watching a subset of the lectures from the Computer Systems: A Programmer’s Perspective course (or reading the matching chapters in the textbook of the same name). The lectures you’ll need are:

  • Machine-Level Programming I: Basics
  • Machine-Level Programming II: Control
  • Machine-Level Programming III: Procedures
  • Machine-Level Programming IV: Data
  • Machine-Level Programming V: Advanced Topics
  • CPU Registers x86 : good for looking up specific registers.
  • PC Assembly Language : a short book on x86 assembly.
  • GCC Inline Assembly HOWTO : a guide to writing assembly code inside a C program.
  • Intel 80386 Programmer’s Reference Manual : the official (and huge) resourcefrom Intel.

You don’t need to read anything about xv6 until after you start OSTEP; in fact, we recommend holding off on the xv6-related projects until you’ve finished the entire section on virtualization. After that, you’ll need a guide to walk you through the source code.

The xv6 authors provide a book that you can read alongside the source code. There’s also a handy line-numbered PDF version of the code with an index to see exactly where each function or constant gets used.

However, that book glosses over a lot of the details in the code that you might find challenging, including the advanced C features used, the x86 architecture- specific instructions, and the concurrency aspects (if you haven’t finished that section of OSTEP before starting the xv6 projects). To solve this problem, we provide an annotated guide to xv6 that goes over the entire xv6 code and analyzes it line-by-line with explanations of the C features, hardware specs, and x86 conventions used. That means it’s longer than the official xv6 book, so you don’t have to read all of it (and you can probably skip the optional sections unless you care about device drivers), but you can use it as a reference if you’re scratching your head about some part of the code.

Here is another in-depth explanation of the xv6 code.

Also here is an excellent video series walking through much of the xv6 code.

Miscellaneous

You’ll need a general sense of how Makefiles work in order to use the Makefile for xv6. This tutorial covers much more than you need; just read the “Getting Started” and “Targets” sections and come back to the rest later if you need to look something up (but you shouldn’t have to).

Additional (optional) resources include:

  • GCC Command Options : a guide to command-line flags for the GNU C compiler gcc .
  • Linker Scripts : a guide to writing scripts for the GNU linker ld .
  • OSDev Wiki : a great resource for all kinds of OS concepts and implementation details.
  • Linux Kernel Development : if you want to apply your xv6 knowledge toward contributing to the Linux kernel, this is a great read after OSTEP.

cs.sakib.dev

Files related to my CS self study

View the Project on GitHub sjsakib/cs

Operating Systems: Three Easy Pieces homework solutions

Part i: virtualization.

  • The Abstraction: The Process
  • Interlude: Process API
  • Mechanism: Limited Direct Execution
  • Scheduling: Introduction
  • Scheduling: The Multi-Level Feedback Queue
  • Scheduling: Proportional Share
  • Multiprocessor Scheduling (Advanced)
  • The Abstraction: Address Spaces
  • Interlude: Memory API
  • Mechanism: Address Translation
  • Segmentation
  • Free-Space Management
  • Paging: Introduction
  • Paging: Faster Translations (TLBs)
  • Paging: Smaller Tables
  • Beyond Physical Memory: Mechanisms
  • Beyond Physical Memory: Policies
  • Complete Virtual Memory Systems

Part II: Concurrency

  • Concurrency: An Introduction
  • Interlude: Thread API
  • Lock-based Concurrent Data Structures
  • Condition Variables
  • Common Concurrency Problems
  • Event-based Concurrency (Advanced)

Part III: Persistence

  • Hard Disk Drives
  • Redundant Arrays of Inexpensive Disks (RAIDs)
  • Interlude: Files and Directories
  • File System Implementation
  • Locality and The Fast File System
  • Crash Consistency: FSCK and Journaling
  • Log-structured File Systems
  • Flash-based SSDs
  • Data Integrity and Protection

 
and

- - - - - - - - -

Welcome to (now version 0.90 -- see for details), a free online operating systems book! The book is centered around three conceptual pieces that are fundamental to operating systems: and In understanding the conceptual, you will also learn the practical, including how an operating system does things like schedule the CPU, manage memory, and store files persistently. Lots of fun stuff!

This book in PDF form, as seen below. For those of you wishing to a copy, please consider the following:

- this may be the best printed form of the book (it really looks pretty good), but it is also the most expensive way to obtain of operating systems (a.k.a. or according to students). Now just: - this way is pretty great too, if you like to read printed material but want to save a few bucks. Now just: - this is a nice convenience and adds things like a hyperlinked table of contents, glossary of terms, lists of hints, tips, systems advice, and a few other things not seen in the free version, all in one massive DRM-free PDF. Just: - Really, this is just the PDF and does not (yet) include all the bells and whistles common in e-pub books.

Can't bear to go out in public without an operating system? How about an ? The t-shirt and printed/electronic books are both brought to you by the demand of various students and professors, and are a nice way to show your appreciation.

Another way to help the book out: cite it! Here is the BiBTeX entry (seen below); you can also link to the site of the best free operating systems book on the market.

Operating Systems: Three Easy Pieces Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau Arpaci-Dusseau Books March, 2015 (Version 0.90)

And now, the free online form of the book, in chapter-by-chapter form (now with chapter numbers!):

INSTRUCTORS: If you are using these free chapters, please just link to them directly (instead of making a copy locally); we make little improvements frequently and thus would like to provide the latest to whomever is using it. Also: we have made our own class-preparation notes available to those of you teaching from this book; please drop us a line at [email protected] if you are interested.

HOMEWORKS: Some of the chapters have homeworks at the end, which require simulators and other code. More details on that, including how to find said code, can be found here: HOMEWORK

BOOKS NEWS: A huge number of pictures added, chapters completed, and other fun details in the latest stable version, 0.90. Track changes: NEWS

ACKNOWLEDGEMENTS: These students have greatly contributed to this effort, through endless bug reports and other comments. Your name could go here! (as well as in the printed book): ERRATA

  • 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?

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

Operating System - Three Easy Pieces homework solutions

MarekZhang/OSTEP-Homework

Folders and files.

NameName
40 Commits

Repository files navigation

Ostep-homework.

Operating Systems: Three Easy Pieces homeworks

CS-537 videos

Virtualization

  • Chapter 5 Interlude: Process API
  • Chapter 6 Limit Direct Execution
  • Chapter 7 Scheduling
  • Chapter 8 Multiple Level FeedBack Queue
  • Chapter 9 Proportional Sharing
  • Chapter 10 Multiprocessor Scheduling
  • Chapter 13 Address Space
  • Chapter 14 Memory API
  • Chapter 15 Address Translations
  • Chapter 16 Segmentation
  • Chapter 17 Free-Space Management
  • Chapter 18 Paging-Introduction
  • Chapter 19 TLBs
  • Chapter 20 Smaller Tables

Concurrency

  • Chapter 26 Concurrency Introduction
  • Chapter 27 Thread API
  • Chapter 28 Locks
  • Chapter 29 Concurrent Data Structures
  • Chapter 30 Condition Variables
  • Chapter 31 Semaphores
  • Chapter 32 Concurrency Problems
  • Chapter 33 Event Based Concurrency

Persistence

  • Chapter 39 Files and Directories
  • Python 1.7%
  • Makefile 0.6%

Pardon Our Interruption

As you were browsing something about your browser made us think you were a bot. There are a few reasons this might happen:

  • You've disabled JavaScript in your web browser.
  • You're a power user moving through this website with super-human speed.
  • You've disabled cookies in your web browser.
  • A third-party browser plugin, such as Ghostery or NoScript, is preventing JavaScript from running. Additional information is available in this support article .

To regain access, please make sure that cookies and JavaScript are enabled before reloading the page.

IMAGES

  1. 1 Operating System Homework 7 & 8

    operating system homework

  2. Homework Activity Topic 3

    operating system homework

  3. GitHub

    operating system homework

  4. HW5 700714385

    operating system homework

  5. (PDF) HOMEWORK 1 Operating System

    operating system homework

  6. GitHub

    operating system homework

VIDEO

  1. What Neil deGrasse Tyson would Change on our Educational System 🧐

  2. Types Of Operating system Discuss in this Video || Operating system Types information

  3. TI 83 Calculator for Mac OS X

  4. Introduction to Operating System Important Questions CS3451 Semester 4 Computer science Department

  5. Coordinating the Machine's Activities : Computer Science Assignment Help by Classof1.com

  6. Lecture 1 : Introduction to operating system

COMMENTS

  1. Operating Systems: Three Easy Pieces

    Welcome to Operating Systems: Three Easy Pieces (now version 1.10 -- see book news for details), a free online operating systems book! The book is centered around three conceptual pieces that are fundamental to operating systems: virtualization,concurrency, and persistence. In understanding the conceptual, you will also learn the practical ...

  2. Operating System Concepts

    Operating System Concepts Ninth Edition Avi Silberschatz Peter Baer Galvin Greg Gagne. Solutions to Practice Exercises. 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.

  3. Operating System Concepts

    Now, with expert-verified solutions from Operating System Concepts 9th Edition, you'll learn how to solve your toughest homework problems. Our resource for Operating System Concepts includes answers to chapter exercises, as well as detailed information to walk you through the process step by step. With Expert Solutions for thousands of ...

  4. Operating Systems

    Now, with expert-verified solutions from Operating Systems 7th Edition, you'll learn how to solve your toughest homework problems. Our resource for Operating Systems includes answers to chapter exercises, as well as detailed information to walk you through the process step by step. With Expert Solutions for thousands of practice problems, you ...

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

  6. Operating System Concepts

    Now, with expert-verified solutions from Operating System Concepts 10th Edition, you'll learn how to solve your toughest homework problems. Our resource for Operating System Concepts includes answers to chapter exercises, as well as detailed information to walk you through the process step by step. With Expert Solutions for thousands of ...

  7. Operating System Questions and Answers

    Most operating systems support virtual memory which allocates space on the hard disk to supplement the immediate, functional memory capacity of RAM. a. True b. False. View Answer. An operating system is a set of programs that controls the computer hardware and acts as an interface with applications. A.

  8. Operating Systems: Three Easy Pieces

    Read through the free online textbook Operating Systems: Three Easy Pieces. Complete the homework questions at the end of each chapter. (There is an associated Github repository for the homeworks.) This should take about 8 weeks, 10 hours/week. That's all you need to do!

  9. Operating Systems: Three Easy Pieces homework solutions

    Interlude: Files and Directories. File System Implementation. Locality and The Fast File System. Crash Consistency: FSCK and Journaling. Log-structured File Systems. Flash-based SSDs. Data Integrity and Protection. This project is maintained by sjsakib. Hosted on GitHub Pages — Theme by orderedlist.

  10. 1.1: Introduction to Operating Systems

    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 in a convenient and efficient manner. An operating system is a software that manages the computer hardware. The hardware must provide appropriate ...

  11. 15-410, Operating System Design and Implementation

    FAQ. Preparatory coursework. The best preparation for this class is taking 15-213/513 (18-213, 18-613, 14-513) followed by one of the 15-4xx/6xx "Systems electives": 15-411/611, 15-418/618, 15-440/640, 15-441/641, 15-445/645. Those specific classes are believed to be better preparation than other classes that contain some Systems content and/or ...

  12. Operating System Concepts 7th Edition Textbook Solutions

    Step-by-step solution. Step 1 of 3. 300-1-1E. Step 2 of 3. (a) In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation results in two problems. Stealing or copying a user's files; writing over another program's (belonging to another user or to the OS) area in memory; using system ...

  13. Operating System Concepts 9th Edition Textbook Solutions

    Operating system: It is an environment to interact with computer hardware and software in an easy and efficient way by providing convenient services to users. Step 2 of 4. The three main purposes of an operating system are as follows: Resource allocation: • The first important purpose of an operating system is Resource allocation.

  14. 238P Operating Systems

    Class overview. 238P teaches the fundamentals of operating systems. You will study, in detail, virtual memory, kernel and user mode, system calls, threads, context switches, interrupts, interprocess communication, coordination of concurrent activities, and the interface between software and hardware. Most importantly, you will study the ...

  15. Operating System Concepts

    Now, with expert-verified solutions from Operating System Concepts 8th Edition, you'll learn how to solve your toughest homework problems. Our resource for Operating System Concepts includes answers to chapter exercises, as well as detailed information to walk you through the process step by step. With Expert Solutions for thousands of ...

  16. Operating Systems: Three Easy Pieces

    Welcome to Operating Systems: Three Easy Pieces (now version 0.90 -- see book news for details), a free online operating systems book! The book is centered around three conceptual pieces that are fundamental to operating systems: virtualization,concurrency, and persistence. In understanding the conceptual, you will also learn the practical ...

  17. Operating Systems 9th Edition Textbook Solutions

    Unlike static PDF Operating Systems 9th 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 viewer.

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

  19. CS 519: Operating System Theory

    CS 519: Operating System Theory Rutgers, The State University of New Jersey Department of Computer Science Fall 2020. ... Homework: This course is a project-intensive course. We will have three or four small homework coding projects and a semester-long research project. The homework projects must be solved independently.

  20. Operating System

    Chapter 7 Scheduling. Chapter 8 Multiple Level FeedBack Queue. Chapter 9 Proportional Sharing. Chapter 10 Multiprocessor Scheduling. Chapter 13 Address Space. Chapter 14 Memory API. Chapter 15 Address Translations. Chapter 16 Segmentation. Chapter 17 Free-Space Management.

  21. Operating Systems

    Operating Systems - Homework 3. Explain a multiprogramming operating system protects the memory areas of processes from being accessed by other processes. The base and limit registers work together to "fence off" an area of memory dedicated to a process, and limit accesses to this area of memory. The operating system then checks each address ...

  22. PDF Homework: OS Organization

    This lecture will provide an introduction to operating system organizations, monolythic, microkernel, etc. The assigned paper describes the exokernel organization. The JOS operating system you are building in the labs is organized like an exokernel. Submit: In lab 4 you completed building the core of an exokernel-based operating system. In ...

  23. Operating Systems Solution Manual

    Chegg Solution Manuals are written by vetted Chegg Operating Systems experts, and rated by students - so you know you're getting high quality answers. Solutions Manuals are available for thousands of the most popular college and high school textbooks in subjects such as Math, Science ( and more. Understanding Operating Systems homework has ...

  24. Operating System- Homework 10 Points (pdf)

    Ace your courses with our free study and lecture notes, summaries, exam prep, and other resources