Technion - Israel Institute of Technology  
234123 - Operating Systems - מערכות הפעלה
  Spring 2015 EnglishRussianHebrewArabic  

ExamA solution
Please find the solution in the material section
Created on 21/7/2015, 11:28:21  
Dear students, as you probably know, ExamA grades were published. Grade formula is:

finalA = round(ExamA<50 ? ExamA : ( ExamA<55 ? 55 : ExamA*0.65+HW_avg ) )

While homework grade is calculated as follows:


You may appeal until 30/07. Please print your appeals and submit them into Alex's mailbox at 5th floor.

We will short publish the solution to the exam, please make sure you read it carefully, BEFORE you appeal.
Created on 15/7/2015, 19:33:50  
ExamA grades
ExamA grades and final grades were published
Created on 13/7/2015, 22:01:00  
HW4 grades are published
Created on 13/7/2015, 22:00:30  
HW3 Wet appeals
Kfir will give reception hours for hw3 wet 23.7, room 412 12:30-13:30
Created on 13/7/2015, 06:58:38  
HW3 Dry appeals
HW3 Dry appeal may be submitted until 19/7 for the dry part (the wet appeal deadline will announced after the office hours of kfir)
Last updated on 13/7/2015, 06:55:32  
Please contact Kfir for hw3 wet appeals
Created on 8/7/2015, 10:18:43  
HW3 Test descriptions
all tests have a time limit of 2 minutes (against deadlocks)

test00: the sanity check posted on the website
test01: check number of threads.
open thread pool with 5 threads
insert 6 tasks that update counter and go to infinite loop
should perform 5 of them
test02: insert tasks while threads are working
open thread_num tasks and insert 2*thread_num long tasks.
all tasks should be performed
test03: insert tasks while threads are waiting for more tasks
open thread_num tasks and insert thread_num tasks
wait and enter another thread_num tasks
all tasks should be performed
test04: insert tasks from multiple threads (about 100 threads and pool of size 5)
insert many short tasks from many threads
wait and check that all tasks were performed
test05: teDestroy should not wait for tasks on queue (shouldWaitForTask = 0)
insert long tasks to the queue,
wait untill all threads have a task to do
use destroy with shouldWaitForTask = 0
just thread_num tasks should be performed
test06: tpDestroy should wait for tasks in queue (shouldWaitForTask != 0)
insert a large number of small tasks
destroy pool with shouldWaitForTask != 0
all tasks should be performed
test07: check tpInsert (should succeed unless destroy is on progress)
check the return value of tpInsert.
untill destroy is called tpInsert should be successful
while destroy is on progress tpInsert should fail
check that all tasks that were inserted successfuly were performed
test08: destroy while another destroy is on progress fail
which means the second destroy return fast (not blocking)
insert long tasks and do destroy (from different thread)
then do destroy again and messure how much time it takes.
should return fast ( relative for the long tasks) aka less then 1 second.
test09: destroy on an empty queue
should retrun successfuly and not wait for tasks
test10: insert tasks with paramaters should pass parameters successfuly
Created on 8/7/2015, 10:18:19  
HW3 Common mistakes were published in the assignments section
Created on 29/6/2015, 15:50:54  
Arthurs office hours on Tuesday will take place at room 401 10:30-12:30.
Created on 29/6/2015, 15:44:25  
HW2 late submissions & appeals returned

All can be found in box 0
Created on 29/6/2015, 13:16:21  
HW3 grades are published
Created on 28/6/2015, 19:49:30  
A note to Arie's students
Arie will give complementary tutorial tomorrow 25.06 10:30 Taub 7
Last updated on 24/6/2015, 14:06:57  
Exam reception hours
23.6 10:30-12:30 Leonid
24.6 10:30 12:30 Ido
28.6 11:30-13:30 Alex
29.6 10:30-12:30 Assaf
30.6 10:30-12:30 Arthur
Last updated on 24/6/2015, 10:25:36  
A note to Arie's student
Arie will give a complementary tutorial tomorrow Mon 22/06 12:30 @ Taub 6
Created on 21/6/2015, 11:15:26  
HW4 submission
Please note that hw4 submission was re-opened.
Created on 21/6/2015, 11:14:39  
HW1 & HW2 Wet appeals
Hisham will give his recception hours on Sunday 21/06 12:30-13:30
Created on 21/6/2015, 08:38:18  
A note to Assaf's students
Assaf's last recitation will be held on Thursday (25.6) 14:30-17:30 at Taub 5.
Created on 21/6/2015, 08:36:59  
A note to Dan's students
REMINDER: Dan will give a complementary lecture today Sun 21/06 17:30 Taub 2
Created on 21/6/2015, 08:35:45  
hw4 submission
HW4 submission is delayed until Mon 22/06 12:30
Created on 18/6/2015, 21:39:46  
A note to Arie's students
Arie will not give his tutorial tomorrow. He will schedule a complementary recitation instead
Created on 16/6/2015, 21:52:57  
Alex's reception hour today
Alex will not give his regular reception hour today, if you need him, please schedule by mail
Last updated on 15/6/2015, 08:02:36  
A note to Dan's students
Dan would like to cancel tomorrow's lecture because of illness

Complementary lecture will be given next Sun 21/06 17:30 Taub 2
Last updated on 14/6/2015, 14:12:59  
HW1 & HW2 Wet appeals
Because of Arthur's complementary tutorial Hisham's reception hour today moves to 19:30
Created on 14/6/2015, 10:53:17  
To Arthur's class
There will be a complementary recitation on Sunday 14/6/2015 at 17:30-19:30 Taub 7
We will finish the first Virtual Memory tutorial and start the next one.
Last updated on 14/6/2015, 10:52:29  
hw2 test 9 correction
--- test 09 ----

This test and the new entrance requirement make a situation of round
roubin queue.
every son call sched_setscheduler with:
policy = SCHED_SHORT
param.requested_time = 10;
param.trial_num = 1;
The parent (SCHED_OTHER) do N forks in loop, every son write 0 to the
shared pipe with the parent, do enough
calculation to be OVERDUE, write 1 and sleep(1) , write 2 and sleep(1)
and so on.
when all finish the parent should see in the pipe : 00..0 11..1 22..2 33..3
Created on 11/6/2015, 12:50:37  
Arthurs tutorial tomorrow (11.06) will take place in Ullmann 602
Created on 10/6/2015, 11:57:10  
Wet2 test descriptions

Overall : in all the tests pipes were used to ensure any needed situation.

----- test 01 -----

checks the new syscalls behaviours with valid SCHED_OTHER process

----- test 02 -----

checks the new syscalls behaviours with invalid process

---- test 03 ----

checks the new syscalls with overdue processes

---- test 04 ----

checks that there is no wrong behaviour in some
old syscalls, without using the new syscalls

---- test 05 ----

checks syscalls with SHORT process

---- test 06 ----

Checks whether the trial_num is declining
starts with trial_num =3 , do enough calculation and check again
the value of trail_num..

---- test 07 ----

SHORT and overdue SHORT should never back OTHER,
trying to do that using sched_setscheduler should fail and
errno should be EPERM

---- test 08 ----

The parent (SCHED_OTHER) can change the policy for his son to SCHED_SHORT ,
so the son should finish before his parent

--- test 09 ----

checks the round roubin of the overdue processes.
the parent set to SHORT with:
param.requested_time = 10;
param.trial_num = 1;

The parent (SCHED_OTHER) do 3 forks in loop, every son write 0 to the shared pipe with the parent do enough
calculation write 1 and so on.
when all finish the parent should see in the pipe : 000..0 111..1 222..2 333..3

--- test 10 ----

Checks the scheduler given N SHORT processes.
A parent defines an even nices_array and the order of finishing for his sons.
The parent (SCHED_SHORT) forks in loop , every son call son with nices_array[i]
(i is the loop variable) and write his i into the pipe (the done write after
giving up the cpu and returned to run by the scheduler when it's turn).
Finally the parent checks the order of finishing by reading the pipe content.

--- test 11 ----

validates the trail_num after fork, and the new entrance to a queue

A - fork and sleep
B - fork and sleep

Created on 9/6/2015, 10:16:39  
HW1 & HW2 Wet appeals
Hisham will hold a reception hour for both hw1&2 on Sunday 14-06-15 18:30 - 19:30, Taub 213
Last updated on 9/6/2015, 10:32:03  
A note to Assaf's students
Like we talked in class, please fill in the form regarding changing the time of the last tutorial:
Notice that a complementary hour is planned.
Created on 9/6/2015, 10:04:45  
A note to Arie's student
Please note that Arie will give a complementary tutorial tomorrow (9/06) 14:30 @ Taub 7
Created on 8/6/2015, 21:39:06  
HW1 & HW2 grades were published
You have until 18/06 to appeal. The appeals should be submitted directly to each exercise owner (HW1 - Arie, HW2 - Assaf)

Wet part appeals should be sent to Hisham directly (for both hw1 and hw2)
Last updated on 7/6/2015, 19:25:13  
A note to Dan's students
Please note that tomorrow (8/6) lecture will take place at Taub 7
Created on 7/6/2015, 14:23:42  
A note to Alex's group
Today Alex's complementary tutorial will be held at Taub 9
Created on 7/6/2015, 12:27:31  
A note to Alex's group
We will have a complementary tutorial Sun 7/06 16:30

If you have a problem to attend please email Alex
Created on 4/6/2015, 10:46:18  
Please note that the wet part was updated with clarification, make sure to re-download
Created on 4/6/2015, 10:02:19  
hw4 is published
Please make sure you start working on it
Created on 2/6/2015, 09:22:17  
A note to Dan's students
This is to remind that there's an extra lecture in OS today 17:30--19:30 Taub 2
Created on 31/5/2015, 09:36:58  
A note to Arthur's students
To Arthur's students – The complementary recitation will take place on Sunday , June 7th at 17:30-19:30 (2 hours) in Taub 7.
Created on 31/5/2015, 07:00:22  
Late submissions
Dear students, please pay attention that if you submit your homework late (no matter what is the reason) you are REQUIRED to add a late submission page that is provided in home assigments section of the site.
Created on 28/5/2015, 10:15:14  
Question 1 section gimel in the dry part of HW 3 is cancelled due to a problematic formulation of the question.
Created on 27/5/2015, 20:46:32  
Reminder: Leonid will not be giving lecture tomorrow (27/05)
Created on 26/5/2015, 19:22:28  
To all students in Arthur's group
Arthur would like to hold a complementary recitation.

Please fill in the following poll in which you can choose the dates convenient to you.
Created on 24/5/2015, 09:07:53  
A note to Leonid's students
Leonid will have an additional lecture 10.06 at 12:30-14:20 Taub 2
Created on 17/5/2015, 16:10:08  
A note to Dan's students
Dan will hold an additional lecture on Sun, 17:30--19:30, May 31, 2015 @ Taub 2
Created on 17/5/2015, 15:43:55  
Mon is matkonet Thu day
Note to Arthur's group, you will have 2 recitations and 2 reception hours this week, both Mon and Thu.
Last updated on 17/5/2015, 15:40:01  
Today 17/05 Assaf reception hour
Please note that Assaf will not hold his reception hour today
Created on 17/5/2015, 14:10:20  
Homework 3
Homework 3 is published, please make sure you download it from the home assignments section
Created on 12/5/2015, 10:15:16  
Late submissions
Please note that when you submit your homework to Alex's mailbox late you need to fill in the late submission form
Created on 12/5/2015, 10:14:38  
HW2 submission deadline is postponed to Mon 11/05 12:30
Created on 7/5/2015, 11:31:40  
Late submissions
Dear students, please note the late submission procedure:

1. Attach the late submission form to your dry part. Please attach all relevant papers to your submission (reserve duty papers, etc).
2. Submit the dry part to Alex's mailbox (Taub 5th floor). Mail your wet part to Alex.
3. You don't need to get a special permission to submit late because of the reserve duty, you automatically get 1 day delay for 1 day of reserve duty.
Created on 5/5/2015, 10:42:17  
A note to Alex's students (Mon 8:30 class)
Tomorrow 4/5 recitation is cancelled. Please pardon a short notice. We will have a complementary class scheduled.
Created on 3/5/2015, 19:31:04  
A note to Assaf's students
1. The recitation has moved permanently to Taub 201
2. We will cover the the last slides of scheduling tutorial at the beginning of the next one
3. Note a one time change in a reception hour: 13:20-14:20 (instead of 16:30-17:30).
Last updated on 26/4/2015, 01:42:09  
Homework 2 is out
Homework 2 is out. You may find it in the assignments section
Created on 19/4/2015, 22:05:30  
HW1 submission notes
Any team who decides to submit the "old version" of HW1 Wet:

Please send Arie Tal an e-mail with the list of all team members and IDs (the submitters.txt file), with the subject "HW1 submitted old version"

Also, any team that submits an exercise late:
The wet part should be emailed to Alex.
The dry part should be submitted to Alex's mailbox at Taub 5th floor, you must fill and attach the late submission page (in home assignments section) to your submission.
Created on 16/4/2015, 09:32:13  
A note to Assaf's students
Please note that Assaf will teach his next class in Taub 201
Created on 15/4/2015, 09:39:05  
A note to Arthur's students
Note to Arthur's students – the tutorial tomorrow (16.4.15) will be held as usual at 12:30-14:30 since the holocaust ceremony was moved to 9:30.
Created on 15/4/2015, 09:38:07  
Note to Dan's students
13/04 Dan's lecture is cancelled
Created on 12/4/2015, 11:57:00  
HW1 announcement
Due to the recently announced change in the specification of HW1, students who have already implemented HW1 based on the previous specification may submit it that way. The course staff will accept implementations based on either the previous specification or the new specification.

In addition, to be fair to students that implemented HW1 based on the previous (more complex) specification, a maximal grade of 120 points (compared to a maximum of 100 points for the new specification, minus deductions for failures in test cases) would be given to assignments that were implemented according to the old specification.
Created on 8/4/2015, 09:50:13  
Homework 1 announcement
The course staff has decided to relax one of the requirements of HW1:

When a process becomes orphaned it will no longer need to abide by the restrictions on its ancestors, even though this provides an easy workaround to the maxproc limits.

This means that you may use p_opptr to travel up the process tree and there is no need to manage a bookkeeping parent.

So for example,
If process A creates process B with a limit of 5, and process B creates process C then
As long as C is a child of B it will be limited by B's restriction.
If B dies before C (C gets reparented to init), then C will no longer have a limit on creating processes.
Created on 7/4/2015, 11:42:17  
HW1 announcement
Please find the FAQ in the assignments.

Also, assume there are no threads, that is, you do not need to handle the case for threads where a thread dies and its children become adopted by another thread.
Created on 6/4/2015, 11:44:51  
HW1 corrections
Please note that they submission day of the week was wrong. It is Friday, 17/04.

Also the link to the inline assembler was corrected.

Please, make sure, you download the updated files.
Last updated on 31/3/2015, 17:59:18  
A note to Dan's students
Please note that Dan's lectures will take place in Taub 2 starting this week
Created on 29/3/2015, 12:01:07  
HW1 is out
Please make sure you download it from the assignments section.
Created on 29/3/2015, 08:19:34  
A note to Dan's students
Please note that Dan's lectures will take place in Taub 2 starting this week
Created on 29/3/2015, 08:10:33  
A note to Arthur's students
Please note that (only) today recitation will take place at Taub 2.
Created on 26/3/2015, 10:07:59  
Recitation schedule update
Note to the students of Arthur's group (was Thu 10:30). The recitation moves to Thu 12:30 Taub 7 (both the room and the time have changed)

Note to the students of Arie's group (was Wed 10:30). The recitation moved to Taub 7 (only the room has changed).

Both changes are effective starting this week. If, as a result of this change, you can not attend any other recitation group, please contact Alex.
Created on 22/3/2015, 13:52:05  
Piazza forum
Please make sure you register with the Piazza forum:

All the Q&A is there.
Created on 21/3/2015, 19:47:55  
Homework 0
1. Please notice that HW0 is published and can be found in 'Assignments' section.
You are not required to submit it, while it helps you to get the tools and skills needed for the next assignments.

2. A video of VMware session can be found in under the name 'sadna'. It has all the explanations about HW0. You need your student login to enter it.

3. In the Assignments section you can find the cover pages for HW1-4 and the common mistakes.
Do not attach HW wet and dry together! Otherwise HWs are missed in checking and other unpleasant situations can happen.

4. You can download the image from:
Last updated on 21/3/2015, 19:50:22