Skip to main content
Department of Information Technology

Operating Systems - period 4 (1DT020 & 1TT802)


This page sections


News

July 9, 2008 -- new01.gif

Exam results (together with examination scripts) have been handed to the student office on May 30. Lists of students who passed and their grade are here :

new01.gif-- Have a good summer ! --new01.gif

June 17, 2008

Lab 3 res-submission results available here :

June 10, 2008

Lab 2 res-submission results available here :


June 10, 2008

Lab 1 re-submission results available here :


June 07, 2008

Lab 3 results available here :

Please note that you have one week to re-submit non completed labs. Deadline for lab3 re-submission is 2008-06-14 23:59. There will be no third re-submission.


May 28, 2008

Lab 2 results available here :

Please note that you have one week to re-submit non completed labs. Deadline for lab2 re-submission is 2008-06-04 23:59. There will be no third re-submission.
Download an updated version of lab2 package (the semaphores and shared memory bugs have been fixed):


May 22, 2008 (09:20)

  • Lecture 13's slides available.

May 19, 2008

Lab 1 results available here :

Please note that you have one week to re-submit non completed labs. Deadline for lab1 re-submission is 2008-05-26 23:59. There will be no third re-submission.


May 19, 2008

  • Reminder: Guest presentation of OSE by Magnus KARLSSON from Enea - Tuesday 2008-05-20 15:15-17:00 room pol_1111

May 16, 2008 (10:55)

  • Lecture 12's slides available.

May 14, 2008

LAB2 : The lab package allows only one shared memory creation per process.

For the bounded buffer, use the same shared memory segment for the space to store items and the count of items or any integer variable you need to manage the buffer.


May 12, 2008

I have been asked if students registered in course 1TT802 have to do lab3.
After the instructions I got from the course manager, the labs have the same weight (1.5) in the 2 courses. It is the weight of the exam which is different.
Thus :

  • All students should complete lab3.
  • The written exam for 1TT802 will have some questions less.

May 12, 2008

Lab 2 : Please do remove semaphores you create. There is a limit on the number of semaphores per user but also system wide.

  • Use ipcs to list the semaphores and shared memory segments.
  • Use ipcrm to remove semaphores and shared memory segments.

May 11, 2008 (19:20)

  • Lecture 11's slides available.

Mai 8, 2008

Instructions and material for lab3 are available here. Read the documentation before.
The Deadline is fixed to 2008-05-28 17:00 (submission by email with subject lab3 + course code).
Work alone or in a group of 2.


May 7, 2008 (12:45)

It seems the semaphores do not behave correctly when processes detaining a handle to them terminate. I am still investigating this. Do not spend a lot of time debugging.

PS : You can make all the processes wait long enough before they terminate and check if you have a correct behavior


May 7, 2008 (11:45)

Course schedule modified (planning updated)
We will have a guest lecture Tuesday 2008-05-20 15:15-17:00 (room Pol_1111).
Magnus KARLSSON from Enea (a Swedish company) will give a presentation on OSE, an operating system they developed.
Magnus will be accompanied by Viveka SJOBLOM who made her master thesis work at Enea. Both can answer your questions after the presentation.

The course schedule is modified as following :

  • Tuesday 2008-05-20 15:15-17:00 : Guest lecture by Magnus KARLSSON (room Pol_1111)
  • Friday 2008-05-23 8:15-10:00 : lecture 13
  • Friday 2008-05-23 15:15-17:00 : Course review (I will be happy to answer your questions)

May 7, 2008 (11:00 Smiling smiley)

  • Lecture 10's slides available.

May 6, 2008

  • Lab 2 part 1 iv-d (rendez-vous between n processes with a helper process)
I have been wrong during the lab session (cf news of May 5 below) saying that we can solve the problem using one more semaphore.
If we consider only one iteration, we can make a rendez-vous between n processes with only 2 semaphores (Arrived and OkToProceed both with initial value 0) and a helper process. The helper does n P(Arrived) then n V(OkToProcced) and a process participating to the rendez-vous does V(Arrived) then P(OkToProceed).
The problem is that the 2 semaphores should not serve in a loop because after the rendez-vous of the first iteration (which works), depending on the scheduling policy, a process may take several of the OkToProceed signals if some processes are preempted after V(Arrived) before they wait on P(OkToProceed). The third semaphore I suggested during the lab session does not "help" to fix this race condition.
As the problem comes from the loop, a solution is to use two sets of 2 semaphores (that is 4 semaphores!) one set if the index of iteration is even and the other if the index of iteration is odd.
You do not have to implement this solution.
I am sincerely sorry for the mistake. This is yet another, but non intentional, "proof" that semaphores are definitely not an easy to use synchronization tool.

May 5, 2008

  • Error in lab 2 instructions, part 1 iv-d (rendez-vous between n processes with a helper process): please read 3 semaphores (instead of 2 semaphores). See Lab instructions updated (bottom of page 2).

May 4, 2008 (23:35 Smiling smiley)

  • Lecture 9's slides available.

Mai 1, 2008

Instructions and material for lab2 are available here.
The Deadline is fixed to 2008-05-15 17:00 (submission by email with subject lab2 + course code).
Work alone or in a group of 2.


April 27, 2008

  • Lecture 8's slides available.
  • Lecture 8's reading includes whole chapter 8.
  • New version of lecture 7's slides : error on page 21 corrected (&lock removed - added by compiler, not programmer).

April 23, 2008

Please note this is not a news but a request on lab1 submission

  • Lab 1 submission should comply to submission instructions on this page (here)

April 23, 2008

New version of lecture 6's slides : page 17 modified (how to use load linked and store conditional to implement lock.Aquire())


April 21, 2008

Course schedule modified (planning updated)

  • This Friday (2008-04-25) lab is moved on Monday 2008-05-05 13:15-17:00 (room Pol2510D). This lab was incorrectly reported as a lecture in the previous course planning. Note that we also have a lecture the same day 8:15-10:00.
  • We will have a lecture on Wednesday 2008-05-07 (instead of a lab as was incorrectly reported in the previous planning).

April 13, 2008

Instructions and material for lab1 are available here.
The Deadline is fixed to 2008-04-30 17:00 (submission by email - subject lab1 + course code).


April 8, 2008

A list of students officially registered have been issued for each course code.
Here are the links to the 2 lists : 1TT802, 1DT020. Please check if you are on the appropriate list.

If your name is missing :

  • you have not been admitted to the course (you normally have got an NO answer from the student counselor)
  • or your admission application is still being examined (please contact the student office and/or your coordinator if you are an exchange student).


Course overview


Course description

Operating systems make computers easy to use and are responsible of computer resources utilization. An operating system provides user programs with high level interfaces, and decides how to efficiently, fairly, and securely allocate computer resources to programs. The purpose of this course is to make the student understand the main concepts underlying the design and implementation of operating systems. Topics covered include: processes, interprocess communication and synchronization, process scheduling, virtual memory and memory allocation, I/O systems, file systems and mass storage devices, protection and security.


Prerequisites

  • Fundamentals of computer organization
  • a first course in programming (eg. C or Java)
  • Data structures and algorithms


Literature


Teaching staff


Course Evaluation

To pass the course, the student has to pass a written exam, and complete the 3 labs. The exam will be closed books and is tentatively scheduled on May 26.

Schedule

  • Course outline
Date Activity Lecture topic (tentative schedule) Notes Reading
4/3 Lect. 1 Introduction, overview, operating systems structure pdf ch 1-2
4/7 Lect. 2 Processes, threads, process dispatching and scheduling (mechanism) pdf ch 3-4
4/9 Lect. 3 Processes, threads, process dispatching and scheduling (mechanism)- cont'd pdf
4/14 Lect. 4 CPU scheduling (policies) pdf ch 5
4/18 Lab 1 Subject: operations on unix processes (lab1 instructions) Deadline is 2008-04-30 17:00
4/21 Lect. 5 Interprocess communication and synchronization: cooperating processes, mutual exclusion pdf ch 6
4/22 Lect. 6 Synchronization: implementing mutual exclusion, hardware support, semaphores, monitors and condition variables pdf
4/24 Lect. 7 Synchronization: semaphores, monotors, and condition variables (cont'd) pdf
4/25 Lab moved on Monday 2008-05-05
4/28 Lect. 8 Memory management (virtual memory: mechanism) pdf ch 8, ch 9.1-9.3
5/5 8:15-10:00 Lect. 9 Memory management (demand paging, page replacement policies) pdf ch.9.4-9-9
5/5 13:15-17:00 Lab 2 Subject: process synchronization (lab2 instructions) Deadline is 2008-05-15 17:00
5/7 Lect. 10 Memory management(continued), File system interface pdf ch 10
5/12 Lect. 11 File system interface (continued), Disk management, File system implementation pdf ch 11, ch 12
5/13 Lab 3 Subject: The Unix File System (lab3 instructions, read this documentation before) Deadline is 2008-05-28 17:00
5/16 Lect. 12 File system Implementation (cnt'd), I/O systems pdf ch 13
5/20 15:15-17:00 Guest lecture from Enea Presentation of OSE, an OS developed by Enea
5/23 8:15-10 Lect. 13 IO Systems (cnt'd), Protection and security pdf ch 14-15
5/23 15:15-17:00 Course Review I will be happy to answer your questions
5/26 Exam

Labs

Lab 1: UNIX shell

Description

This assignment is about using the POSIX Application Programming Interface to do process management. You are to program a UNIX shell . A shell is an interface between a user and the operating system. It lets us give commands to the operating system and start new programs. It uses several POSIX system calls, for example fork, execve, and wait. The final version of your shell should be able to fork at least two processes and connect them with pipes.

Your task

Follow the lab instructions. To make your task (and the teacher's) easier, the work is decomposed in four steps.
For an implementation:

  • in C: shell.c. Use g++ to compile: g++ -Wall -Werror -o shell shell.c
  • in Java: lab1.solaris.tar.gz. Unpack: tar -xzvf lab1.solaris.tar.gz

Submission of your work

Deadline is 2008-04-30 17:00 (submission by email - subject lab 1 + course code).
You will have to hand in your program for each of the 4 steps (only source programs). Note that for steps 1 and 2 you will also have to give your answers to the questions in the lab instructions. You can put all your answers in the same text file (named answers for example).
Put the course code, your name and personal number in the header of each file (as comment in the source programs). Send a tar gzipped file by email to . When unzipped and untarred, your submitted file should create a directory named <coursecode>_<firstname>_<lastname> and extract the files there.


Lab 2: Process synchronization

Description

This assignment is about using semaphores to synchronize independent processes or processes cooperating using shared memory. You are write simple programs to experiment with semaphores and shared memory. You will work alone or in a group of 2.

Your task

Follow the lab instructions. Go through the instructions in order: part 1 then part 2.
For an implementation:

  • in C: LAB2C.tar.gz. Unpack: tar -xzvf LAB2C.tar.gz. To compile: make -f <appropriate_makefile>
  • in Java: LAB2JAVA.SOLARIS.tar.gz. Unpack: tar -xzvf LAB2JAVA.SOLARIS.tar.gz. Scripts shell are provided to build and launch the programs.

Submission of your work

Deadline is 2008-05-15 17:00 (submission by email with subject lab 2 + course code).
You will have to hand in your programs for different steps (only source programs) and also answers to some questions.
Put the course code, your name(s) and personal number(s) in the header of each file (as comment in the source programs). Send a tar gzipped file by email to . When unzipped and untarred, your submitted file should create a directory named <coursecode>_<firstname>_<lastname> if you work alone or <coursecode>_<firstname1>_<lastname1>_<firstname2>_<lastname2> if you work in a group of 2 and extract the files there.


Lab 3: The UNIX File System

Description

This assignment is about the UNIX File System. First you will learn how the UNIX file system is structured and which system calls are used to work with the file system data structures. Then you will have to write a program that behaves like the shell command ls -lRa.

Your task

First of all, read the Unix File System documentation included in the lab package. Then Follow the lab instructions.

The lab package has been prepared for java. But you can use any programming language you wish as long as you can make Posix system calls.

  • Lab3 package: lab3.solaris.tar.gz. Unpack: tar -xzvf lab3.solaris.tar.gz. Script shells are provided to build and launch your program.

Submission of your work

Deadline is 2008-05-28 17:00 (submission by email with subject lab 3 + course code).
You will have to hand in your program (only the source) and also answers to the questions.
Put the course code, your name(s) and personal number(s) in the header of each file. Send a tar gzipped file by email to . When unzipped and untarred, your submitted file should create a directory named <coursecode>_<firstname>_<lastname> if you work alone or <coursecode>_<firstname1>_<lastname1>_<firstname2>_<lastname2> if you work in a group of 2 and extract the files there.
Note that even if you submit only one file containing you program and your answer to the questions you should to submit an archive which complies to the instructions above.



Updated  2008-07-10 10:06:20 by Justin Pearson.