CamScanner
CamScanner
Ministry of Higher Education Acad. Year : 2015 / 2016
El-Shorouk Academy Term : First
Higher Institute for Computer & Year : 3rd
Information Technology No. Questions : 4
Department : Computer Sciences Date : 21/9 /2016
Instructor : Dr. Abdellatief Time Allowed : 120 Min
Hussein Abouali
Reviewer : Prof. Ahmed Elabbasy
3102 Operating Systems ( Final Corrective Exam )
Try (1,2,3) and one of (4,5) questions
Question 1 (20 points): Clarify the following terms in the context of Operating Systems:-
a. Process active states
b. Race condition and its remedy methodologies.
c. Dealing with deadlock methods.
d. SVC
e. Semaphores
f. PCB
g. Page map table
h. Preemptive scheduling
Question 2 (20 points) :Complete the following:-
1. FCFS scheduling main features include: a)-------- b)------- c)-------
2. Coffman’s deadlock conditions are: a) ------- b)------ c)-------- e)------
3. Scheduling objectives include: a) ------- b)------ c)-------- e)--------- f)----------
4. Memory Fragmentation Treatment includes: a)------- b)---------
5. From the desired features in variable partitioning multiprogramming: a)---- b)-----
6. Dynamic address translation process may lead to ---------- or initiate -------------
7. Process x is performing the P operator on semaphore S then either ------------ or ---------
8. In virtual memory ----------------- is a abnormal event and will lead to ---------------------
9. From the scheduling schemes that suffer from indefinite postponement a)------ b)------
10. From the preemptive scheduling schemes a)------- b)-------- c)------
Question 3 (20 points)
• For the table below compute the overall average waiting time and the turnaround times
1) Round Robin with quantum 1 ms.
Process Bust time Priority Arrival
(ms) time
P1 3(ms) 4 0
P2 3(ms) 2 1
P3 3(ms) 3 2
P4 2(ms) 4 5
P5 3(ms) 1 7
P6 4(ms) 3 9
Operating Systems Of 2- 1 - Page 21/09 / 2016
• In some computer system the following information have been taken from the
wait(block) State
Process ID The resources owned by The resources waiting
for
P1 2,9 1,3
P2 1 4
P3 4 5
P4 6,5,3 7,8
P5 8 6,2
Investigate this data for possible dead lock(s) existence? Show the steps. Outline an algorithm
for the process. State the prober action that should be taken to resolve the problem(s), if
exist.
Question 4 (20 points)
a) An operating system process can provide one service for a request at a
time and have a buffer of size 5 for service request waiting in queue. Using
semaphores model the process of the service process and the service
request processes to avoid the race condition. Make any assumption you
may need clear.
b) In a system that implements deadlocks avoidance through the use of banker’s
algorithm show which of these allocations are safe, and which is not, explaining
why. Giving that the system has total of 500 unit of the resource and running
four processes with upper limits to the use of that resource and sequence of
request ions as indicated in table below
Process Maximum 1 2 3 4 5
to finish
P1 350 200 50
P2 400 100
P3 300 70
P4 200 100
Operating Systems Of 2- 2 - Page 21/09 / 2016
Ministry of Higher Education Acad. Year : 2014 / 2015
El-Shorouk Academy Term : First
Higher Institute for Computer & Year : 3rd
Information Technology No. Questions : 5
Department : Computer Sciences Date : 10/1 /2015
Instructor : Dr. Abdellatief Time Allowed : 120 Min
Hussein Abouali
Reviewer : Prof. Ahmed Elabbasy
3102 Operating Systems ( Final Exam )
Try (1,2,3) and one of (4,5) questions
Question 1 (18 points): Clarify the following terms in the context of Operating Systems:-
a. Process states
b. Major operating systems functions
c. Race condition and its remedy methodologies.
d. Dealing with deadlock methods.
e. SVC
f. Semaphores
g. Process starvation
h. PCB
i. Virtual memory concepts
Question 2 (18 points) :Complete the following:-
1. Multilevel feedback queues main features include: a)-------- b)------- c)------- d)-------
2. The OS subprograms that change process state include: a)--- b)--- c)---d)--- e)---
3. Coffman’s deadlock conditions are: a) ------- b)------ c)-------- e)------
4. Scheduling objectives include: a) ------- b)------ c)-------- e)--------- f)----------
5. Users complaining of waiting ready for long time without dispatch then the problem is
in -------------
6. Memory Fragmentation Treatment includes: a)------- b)---------
7. From the desired features in variable partitioning multiprogramming: a)---- b)-----
8. Dynamic address translation process may lead to ---------- or initiate -------------
9. Process x is performing the P operator on semaphore S then either ------------ or ---------
10. In virtual memory ----------------- is a normal event and will lead to ---------------------
11. From the scheduling schemes that suffer from indefinite postponement a)------ b)------
12. From the preemptive scheduling schemes a)------- b)-------- c)--------- d)--------
Question 3 (17 points)
• For the table below compute the overall average waiting time and the turnaround times
1) Round Robin with quantum 1 ms.
2) Preemptive highest response ratio with quantum 1 ms.
Process Bust time Priority Arrival
(ms) time
P1 3(ms) 4 0
P2 3(ms) 2 1
P3 3(ms) 3 2
P4 2(ms) 4 5
P5 3(ms) 1 7
P6 4(ms) 3 9
Operating Systems Of 2- 1 - Page 10/ 1 / 2014
• In some computer system the following information have been taken from the
wait(block) State
Process ID The resources owned by The resources waiting
for
P1 2,9 1,3
P2 1 4
P3 4 5
P4 6,5,3 7,8
P5 8 6,2
P6 7 8,1
Investigate this data for possible dead lock(s) existence? Show the steps. Outline an algorithm
for the process. State the prober action that should be taken to resolve the problem(s), if
exist.
Question 4 (17 points)
a) An operating system process can provide one service for a request at a
time and have a buffer of size 5 for service request waiting in queue. Using
semaphores model the process of the service process and the service
request processes to avoid the race condition. Make any assumption you
may need clear.
b) In a system that implements deadlocks avoidance through the use of banker’s
algorithm show which of these allocations are safe, and which is not, explaining
why. Giving that the system has total of 500 unit of the resource and running
four processes with upper limits to the use of that resource and sequence of
request ions as indicated in table below
Process Maximum 1 2 3 4 5
to finish
P1 350 200 50
P2 400 100
P3 300 70
P4 200 100
Question 5 (17 points)
a) Write a program that uses objects, objects-locks, and threads to create 5 threads that
will come to a point of creating two deadlocks.
b) Write shell commands to read three strings compare the last two if not equal then print
“ Password Mismatch “. If equal create user id equal to the first string with password
equal to the second string. Then create file called “welcomefile” concatenate the three
strings and add them to the created file close the file. Then, change its permission to read
only. Then, Print “User:”, ‘first string’, “Ready”.
Operating Systems Of 2- 2 - Page 10/ 1 / 2014
2014-2015 Complete
1-Multilevel feedback queues main features include: Favor short jobs,
Favor I/O Bound, Determine Job Nature Quick, Quantum gets larger as
level # get higher.
2-The OS subprograms that change process state include: Running,
Suspend, Blocked, Dispatch, Timer-run-out.
3-Coffman’s deadlock conditions are: Mutual exclusion, Hold and wait,
No preemption condition, Circular wait condition.
4-Scheduling objectives include: Throughput, Mean response time,
Predictability, Fair.
5-Users complaining of waiting ready for long time without dispatch
then the problem is in Dispatch latency.
6-Memory Fragmentation Treatment includes: Holes Coalescing,
Storage Compaction.
7-From the desired features in variable partitioning
multiprogramming: Jobs occupy as much as they need, No boundary
observed, Good utilization may happen, Overheads are higher in
security & Placement.
8-Dynamic address translation process may lead to Memory address
or initiate process blocking.
9-Process x is performing the P operator on semaphore S then either S
or process blocked.
10-In virtual memory Missing block is a normal event and will lead to
process blocking.
11-From the scheduling schemes that suffer from indefinite
postponement Multi-level feedback queues, shortest remaining.
12-From the preemptive scheduling schemes RR, MLFQ, SRTF, Priority.
2015-2016 Complete
1-FCFS scheduling main features include: The default of this
scheduling scheme is non-preemptive, With minimal overhead, A
process will wait in queue until all processes arrive ahead of it finished
execution.
2-Coffman’s deadlock conditions are: Mutual exclusion, Hold and wait,
No preemption condition, Circular wait condition.
3-Scheduling objectives include: Throughput, Mean response time,
Predictability, Fair.
4-Memory Fragmentation Treatment includes: Holes Coalescing,
Storage Compaction.
5-From the desired features in variable partitioning
multiprogramming: Jobs occupy as much as they need, No boundary
observed, Good utilization may happen, Overheads are higher in
security & Placement.
6-Dynamic address translation process may lead to Memory address
or initiate process blocking.
7-Process x is performing the P operator on semaphore S then either S
or process blocked.
8-In virtual memory Missing block is a normal event and will lead to
process blocking.
9-From the scheduling schemes that suffer from indefinite
postponement Multi-level feedback queues, shortest remaining.
10-From the preemptive scheduling schemes RR, MLFQ, SRTF, Priority.
2016-2017 Complete
1-Storage fetch strategy used to determine when and which to bring
to memory, and it’s one of management strategies required for
memory.
2-Dispatcher() used to move from ready to run state and It is part of
the operations on processes of the operating system.
3-Memory Fragmentation Treatments main methods are Holes
Coalescing, Storage Compaction.
4-Interrupts enables ready, run, wait, timer-run-out.
5-Process active states are ready, run, wait.
6-Disk defrag process is reorganizing fragments existed due to the
deletion of files.
2020-2021 Complete
1-Scheduling criteria include: Utilization, Throughput, Service Time,
Waiting time, Turn around time, Response Time.
2-Users complaining of waiting ready for long time without dispatch
then the problem is in Dispatch latency.
3-Memory Fragmentation Treatment includes: Holes Coalescing,
Storage Compaction.
4-From the desired features in variable partitioning
multiprogramming: Jobs occupy as much as they need, No boundary
observed, Good utilization may happen, Overheads are higher in
security & Placement.
5-Dynamic address translation process may lead to Memory address
or initiate process blocking.
6-Process x is performing the P operator on semaphore S then either S
or process blocked.
7-In virtual memory Missing block is a normal event and will lead to
process blocking.
8-From the scheduling schemes that suffer from indefinite
postponement Multi-level feedback queues, shortest remaining.
9-From the preemptive scheduling schemes RR, MLFQ, SRTF, Priority.
10-Multilevel feedback queues main features include: Favor short
jobs, Favor I/O Bound, Determine Job Nature Quick, Quantum gets
larger as level # get higher.
11-The OS subprograms that change process state include: Running,
Suspend, Blocked, Dispatch, Timer-run-out.
12-Coffman’s deadlock conditions are: Mutual exclusion, Hold and
wait, No preemption condition, Circular wait condition.