Operating systems and real-time

A course for the biomedical engineering curricula


2008-2009, Teaching: Giorgio Metta, Laboratory: Lorenzo Natale

    Laboratory is based on the Open Source Yarp library
    More information on: http://yarp0.sourceforge.net
    For fun: http://catb.org/~esr/writings/taoup/html/

Where and when: Thursday 2-4pm room B8, Friday 4-6pm room E5.

Final exams: next session Feb 25th, 2009 10am, Villa Bonino.
Deadline problem set: March 1st, 2009

Contact Giorgio Metta:
     tel: 010-717-81411 or 010-353-2946
     email: pasa (AT) liralab.it     
     web: http://pasa.liralab.it

Simple mailing list: os (AT) liralab.it

Use of the mailing list:
- general interest questions and requests
- additional requests about classes and exercises
- announcements about the course
- information exchange about the exercises
- limited to registered users (all students registered at the beginning of the semester)

To pass:
- problem sets  (1/3 of the final score)
- oral exam (2/3 of the final score)
---- to complete the course in the current semester requires complying with the deadlines.

For the oral exam:
Questions on:
   - Slides (all of them, available from this webpage)
   - Additional papers, also available for download
   - Problem sets or OS related programming questions

Syllabus and lecture notes

Current semester (up to date)

  1. Introduction, general concept about operating systems (Oct 2nd) -click here for the lecture notes-
  2. Processes e multiprogramming ~ processes and threads (Oct 3rd) -click here for the lecture notes-
  3. Interprocess communication (Oct 9th) -click here for the lecture slides-
  4. Recommended: paper on UNIX (click here).
  5. Scheduling (Oct 10th) -click here for the lecture slides-
  6. Compiler and linker, a brief introduction (Oct 16th) -click here for the slides-, producer-consumer example in Yarp
  7. Oct 17th - cancelled
  8. YARP, introduction to the library, Threads and Semaphores. Producer-consumer example in Yarp (Oct 23th)
  9. Laboratory.  Using the Ubuntu live CD. CMake. Compiling a program using YARP. An example using threads. Producer-consumer example with YARP (Oct 24th) -slide (~9 Mb)-
  10. Oct 30th - cancelled
  11. Oct 31st - cancelled
  12. Memory management (Nov 6th) -click here for the lecture slides-
  13. Laboratory - Multithreading (Nov 7th) -slides-
  14. A few more Yarp examples - use with care! -zip file here-, -example from the manual-
  15. Nov 13th - cancelled
  16. Laboratory - Multithreading cntd. (Nov 14th)
  17. Memory management, page replacement algorithms (Nov 18th) -click here for the lecture slides-
  18. Chapter on memory management from Tanenbaum ((c) A.S.Tanenbaum, from his home page) -pdf, click here-
  19. I/O system, general concept, software (Nov 20th) -click here for the lecture slides-
  20. Chapter on I/O from Tanenbaum ((c) A.S. Tanenbaum, from his home page) -pdf, click here-
  21. Laboratory - Yarp port examples (Nov 21st) -see here for a tutorial-
  22. I/O system, more on disks and other devices (Nov 27th) -pdf of the lecture slides part 1-, -pdf of the lecture slides part 2-
  23. Nov 28th - cancelled
  24. x86 architecture, concept and assembly/instruction set (Dec 16th) -pdf of the lecture slides-
  25. Final problem set description (Dec 19th) -pdf of the requirements-, -maze stuff-, -game protocol-
  26. Yarp details on Port, examples related to the problem set (Jan 21st).


  1. About the Linux shell, a short tutorial -click here-
  2. Multiprocessor systems - short - (pdf click here).
  3. More about Working Set algorithms (-pdf click here-, paper on the WS concept click here).
  4. Networking (introduzione, problemi generali), read only -pdf capitolo libro-, -slide del sig. Tanenbaum-

Problem sets (mandatory)

Support laboratory material:

      - Producer-consumer project (source code): click here to download the complete zip file
      - Producer-consumer project, networked version: click here to download the complete zip file
      - Demo client: click here to download the source code, client on a single thread
      - Videogame protocol is explained in
this page
      - Problem set: click here (PDF)

Problem set additional instructions (please read carefully):

      - Problem sets must be delivered:
            1. with the source code
            2. all files, including the CMakeFiles (see examples)
            3. enough comments to understand the code
            4. program output and some comments (1 page max)

Additional material (past semester):

      Small C/C++ manual (in italian): -pdf-
      Yarp source: -yarp-2.2.1.tar.gz-
      Yarp documentation: click here
      Home page past semester: click here

Past exams and problem sets:

test March 2006: click here (PDF)
test December 2005: click here (PDF)

test 1: topics "processes, threads, IPC and scheduling" click here.
test 2
: topics "memory, I/O, file system" click here.

problem set 1: -pdf-.
problem set 2: -pdf-.

References (by no means complete)
    - Andrew S. Tanenbaum, Modern operating systems, Prentice Hall International 2001. ISBN: 0-13-092641-8
    - Raphael A. Finkel, An Operating Systems Vademecum, Second Edition 1988, Prentice Hall Englewood Cliffs, NJ 07632
           - Available for free from: ftp://ftp.cs.uky.edu/cs/manuscripts/vade.mecum.2.pdf

Other resources:
    - Ubuntu Linux: http://www.ubuntu.com/

More on C/C++:
- "Linguaggio C", B.W. Kernighan D.M. Ritchie, Jackson. (*)
- "C++", 
H. Shildt , Mac Graw Hill. (*)
- "The C++ Programming language"
, Bjarne Stroustrup, Addison Wesley, 3d ed.

(*) available at LIRA-Lab