Pieter's Raspberry Pi

Operating Systems (TOM-2.1-CS)

The course Operating Systems is primarily intended for second year bachelor students of computer science but other students are welcome to attend too.

Credits: 4EC


The course provides insight in the function and structure of modern operating systems. It will focus on generic concepts with illustrative examples from Linux.

Learning outcomes

After finishing the course, students:


Attendance: Mandatory.

Language: The class is taught in English.

Lecturer: Prof Dr Pieter Hartel.
Teaching assistants: Riccardo Bortolameotti, René Boschma, Thijs van Ede, Noah Goldsmid, Folmer Heikamp, Joran Honig, Gijsbert ter Horst, Etienne Khan, Mike Kriele, Wouter Timmermans, Wouter van Veelen

Time and venue lectures: Weeks 5, 6, 7, and 8 usually Mondays to Fridays 8:45-10:30 in room OH 210
Time and venue laboratory: Weeks 5, 6, 7, and 8 usually Thursdays 13:45-17:30 in room OH 210

Core text

Core text:Operating Systems 8/e by William Stallings (Softcover)


To be successful in this course you need a Linux laptop and a Raspberry Pi. Since you will be the sysadmin of the Pi you cannot share it with anyone else, which means that you have to purchase your own Pi. Version 1, 2, or 3 are all fine.

Bring your Linux laptop connected via an ethernet cable to your Pi to the lectures, so that you can experiment with the sample C and java code during the lectures. You will also need your laptop and your Pi during the Labs. Please do not use a router.

Please attend the lab on 20 Sep. if you need help setting up your laptop and your Raspberry Pi. Download the instructions here


Download this web page, all slides, and code here: ZIP


Programming in C, for example via


Date Topic and slides
Ch.8e (7e)
(C, Java)
Week 5
Mon 3 Oct Linux   BenchCPU.c, BenchMem.c Lecture
Tue 4 Oct Hardware 1 Uname.c, Vname.c Lecture
Wed 5 Oct Operating System Overview 2 Echo.c, AddressSpace.c, Wrap.c Lecture
Thu 6 Oct Processes 3 Fork.c, Signal.c Lecture
Fri 7 Oct Threads 4 MyThread.c, ForkThread.c Lecture
Week 6
Mon 10 Oct Concurrency 5 Count.java, Count.c, CountSave.c, Spinlock.c, ProdCons.c Lecture
Tue 11 Oct Concurrency (contd) 5 ProdManyCons.c, ProdCons.java, MesPass.c Lecture
Wed 12 Oct Deadlock and starvation 6 Detect.c, Philosophers.c, Asymmetric.c, Lecture
Thu 13 Oct Memory management 7 Getpagesize.c, ProcessLayout.c, StackLayout.c Lecture
Fri 14 Oct No lecture, Self study      
Week 7
Mon 17 Oct CAO Exam resit      
Tue 18 Oct Virtual memory 8 Getrusage.c, Mmap.c Lecture
Wed 19 Oct Processor Scheduling 9 loop.c, ThreadSched.c, SchedXY.c, Nice.c Lecture
Thu 20 Oct Disk Scheduling 11 Blink.c, Sparse.c, Fadvise.c Lecture
Fri 21 Oct File management 12 Mkdir.c, Readdir.c, Pipe.c, Fifo.c, Mount.c Lecture
Week 8
Mon 24 Oct Threats 15 (14) Thompson.c, Smash.c, Setuid.c Lecture
Tue 25 Oct Security techniques 15 (15) Getpwent.c, Lastlog.c Lecture
Wed 26 Oct Q&A session      
Thu 27 Oct No lecture, OS Lab      
Fri 28 Oct No lecture, Maths Exam      


All students must complete the mandatory lab assignments in teams of two in a satisfactory manner

All students must complete the mandatory lecture assignments individually in a satisfacyory manner PDF.

Please make sure that you meet four times with a student assistant (about once a week during weeks 5..9) to discuss your progress. The deadline for handing in the final batch of lecture assignments is Thu 27 October Noon.


  1. Fri 11 Nov, 13:45-15:45, Venue TBA Written Examination(Closed book, no electronics)
    Ten sample questions and answers