Concordia University
COMP 346
COMP 346: Operating Systems - Winter 2020
Instructors: Dr. Aiman Hanna, Dr. Hakim Mellah,
Prof. Kerly Titus
24-hour Take-home Final Examination
Submission Due date and time
...
Concordia University
COMP 346
COMP 346: Operating Systems - Winter 2020
Instructors: Dr. Aiman Hanna, Dr. Hakim Mellah,
Prof. Kerly Titus
24-hour Take-home Final Examination
Submission Due date and time (EXACT):
Wednesday, April 22nd 9:00 AM EST
Exam Rules: Please read very carefully:
1. General Information
Date and time of exam release: Tuesday, April 21, 2020 at 9:00 AM EST
Deadline for exam submission: Wednesday, April 22, 2020 at 9:00 AM EST
Exam is a 24-hours exam. You must submit your solution by 9:00 AM on Wednesday April 22. Submission
received at, or after 9:01 AM EST, will be rejected and a FNS grade will automatically be issued for the course.
[In fact, the system will reject any submissions beyond 9:00 AM EST]. After the exam, you may be called for
an oral evaluation. If you are called for an online oral evaluation, you MUST present yourself for this
evaluation. Failing to do that will result in your grade being suspended and eventually an FNS grade is assigned.
Quality of Submission: You will be marked based on correctness, comprehension, completeness and quality
of produced work.
Submissions: You need to submit your solution in a file named .pdf (or .doc. These are
the only two allowed formats). For instance: 9080332_Mike_Simon.pdf. The file must include you name, ID,
and you must sign it. The solution MUST follow the order of the questions (i.e. Question 1 solution, then
Question 2, etc.). You must submit that file to Moodle of your section under the titled: Final Exam Submission.
VERY IMPORTANT: You will also need to sign this exam document itself and include it with your
submission as well. Your exam will not be marked unless this exam is signed and returned back.
If we do not submit these two signatures; we will have to ask you for it manually before your exam can be
considered. This request will cost you 10% of the mark (no exceptions will ever be considered)! So; in simple
words, return the exam signed, and return the answer document signed.
2. Terms and Conditions
The exam is an individual exam. The Exam is open-book. You can consult any materials, including textbooks,
notes, Moodle materials, tutorial notes, and online materials. However; you are NOT permitted to
communicate with any persons neither offline nor online (or through any other type of communication),
including your classmates.C o m p 3 4 6 – T a k e - h o m e F i n a l E x a m i n a t i o n © C o n c o r d i a U n i v e r s i t y – W i n t e r 2 0 2 0
N o P u b l i c a t i o n s o r c o p y i n g a l l o w e d w i t h o u t w r i t t e n p e r m i s s i o n f r o m A L L
i n s t r u c t o r s . - P a g e 2 | 10
In simple words, plagiarism will NOT be tolerated under any conditions and it will officially be reported to
the University for disciplinary actions.
3. Questions that arise during the exam
It is important to note that there will be no support from the instructors or the TAs during the exam. The exam
contents are clear; however, in case you find anything ambiguous, you must express your assumptions very
clearly and continue with the solution. We may however send you some announcements if needed through
Moodle and the mailing list, so you should check from time to time. In simple words, Avoid hesitations! The
text of the exam is very clear and the requirements are detailed carefully. You should not send requests to
your professors requesting clarifications. They may not even have a chance to see these requests on-time.
4. Academic Integrity
Concordia University takes academic integrity very seriously and expects its students to do the same.
You need to declare and sign the following:
I understand that any form of cheating, or plagiarism, as well as any other form of dishonest behaviour,
intentional or not, related to the obtention of gain, academic or otherwise, or the interference in evaluative
exercises committed by a student is an offence under the Academic Code of Conduct.
I understand that the above actions constitute an offence by anyone who carries them out, attempts to carry
them out or participates in them.
By way of example only, academic offences include:
• Plagiarism;
• Contribution by a student (or anyone else) to another student’s work with the knowledge that such work may
be submitted by the other student as their own;
• Unauthorized collaboration;
• Obtaining the questions or answers to an exam or other unauthorized resource;
• Use of another person’s exam during anexam;
• Communication with anyone (in any shape or form) during an exam and any unauthorized assistance during an exam;
• Impersonation;
• Falsification of a document, a fact, data, or reference.
For more information about academic misconduct and academic integrity, refer to the Academic Code of
Conduct and Concordia University’s Academic Integrity webpage.
I have neither given nor received unauthorized aid on this exam and I agree to adhere to the specific
Terms and Conditions that govern this exam.
Exam is ©Concordia University. I will NOT publish this exam (or any extracts or texts of it) in any form
or shape online or elsewhere, or pass it to anyone in any form or shape, neither now nor at any future
point. I understand that publications of this exam requires prior written permission from ALL instructors
of the course and that this permission is NOT given at this time.
Student Name Signature:
----------------------------------
ID #: -------------------------------- ----------------------------------C o m p 3 4 6 – T a k e - h o m e F i n a l E x a m i n a t i o n © C o n c o r d i a U n i v e r s i t y – W i n t e r 2 0 2 0
N o P u b l i c a t i o n s o r c o p y i n g a l l o w e d w i t h o u t w r i t t e n p e r m i s s i o n f r o m A L L
i n s t r u c t o r s . - P a g e 3 | 10
Question 1: [10 Points]:
Assume a system that is capable of supporting multiprogramming, where the following measures are
defined:
- Turnaround Time: Total time to complete a process;
- Throughput: Average number of processes completed per time period T, which is defined as 12ms
(milliseconds).
- CPU Utilization: % of time where CPU is being utilized (not idle) before N processes are
completed.
- Wait Time: Total amount of time a ready process (a ready process is a process that requires CPU
execution) is waiting (for the CPU) from the moment it is ready until it terminates.
Assume that all processes in the system have similar behavior, where a process spends ½ of its time
performing I/O and ½ of the time performing execution. The system is capable of overlapping execution
time for a process with I/O time of another. The system is utilizing also RR for scheduling with a time
quantum of 3ms (ignore context switch time; i.e. assume it takes 0 ms). Show the Gantt Chart for all your
answers.
A) Assume that each process has a total time of 48ms, and for each period of 12ms, each process
does/perform an I/O for the first ½ of a period (6ms), then follows with CPU operations (execution)
during the 2nd ½ of a period (6ms). All processes arrive at time t=0.
i) Which number of running process (1 process, 2 processes, or 4 processes) produces best CPU
utilization? Show all your work.
ii) What is the throughput if 2 processes are running?
iii) What is the average wait time if 4 processes are running? Give the wait time for P1, P2, P3 and
P4.
iv) What is the average turnaround time for 4 processes? Give the turnaround time for P1, P2, P3
and P4.
B) Now assume that four processes, P1, P2, P3 and P4, will run, and all of them arrive at time t=0. Each
of these processes has a total time of 24ms, with the exception of P4, which has 60ms. Assume
also that for each of these processes, the first and last quarter of a period (that is the first and last
3ms) are I/O, and that the second and third quarters are executions.
i) What is the system throughput?
v) What is the average wait time for the processes? Give the wait time for P1, P2, P3 and P4.
ii) What is the CPU utilization (during the time these processes are running until they terminate)?
iii) What is the average turnaround time for the processes? Give the turnaround time for P1, P2, P3
and P4.C o m p 3 4 6 – T a k e - h o m e F i n a l E x a m i n a t i o n © C o n c o r d i a U n i v e r s i t y – W i n t e r 2 0 2 0
N o P u b l i c a t i o n s o r c o p y i n g a l l o w e d w i t h o u t w r i t t e n p e r m i s s i o n f r o m A L L
i n s t r u c t o r s . - P a g e 4 | 10
Question 2: [8 Points]:
Given the following code, where id indicates a process number (or ID), launch() indicates concurrent start
of the processes passed on its parameters, and N is an integer representing the number of processes that
will be launched (i.e. processes that will run on that system).
[Show More]