College of Computing and InformaticsAssignment 2
Deadline: Thursday 01/04/2021 @ 23:59
[Total Mark for this Assignment is 5]
Student Details:
Name: ###
ID: ###
CRN: ###
Instructions:
•
•
•
•
•
•
•
•
•
•
You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on
Blackboard via the allocated folder. These files must not be in compressed format.
It is your responsibility to check and make sure that you have uploaded both the correct files.
Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between
words, hide characters, use different character sets or languages other than English or any kind of
manipulation).
Email submission will not be accepted.
You are advised to make your work clear and well-presented. This includes filling your information on the
cover page.
You must use this template, failing which will result in zero mark.
You MUST show all your work, and text must not be converted into an image, unless specified otherwise by
the question.
Late submission will result in ZERO mark.
The work should be your own, copying from students or other resources will result in ZERO mark.
Use Times New Roman font for all your answers.
Question One
Pg. 01
Learning
Outcome(s):
Question One
Describe the OS
Consider the following snapshot of a system:
2 Marks
mechanism for
Allocation
Max
Available
ABCD
ABCD
ABCD
P0
2001
4212
3321
concurrency
P1
3121
5252
management.
P2
2103
2316
P3
1312
1424
P4
1432
3665
process
management,
Process
timing, memory,
I/O, file and
Answer the following questions using the banker’s algorithm:
1. How many instances of resources are present in the system under each type of a
resource?
2. What is the content of the matrix Need?
Question One
Pg. 02
3. Is the system in a safe state? (explain your answer)
4. If a request from process P1 arrives for (1,1,0,0), can the request be granted
immediately? (explain your answer)
Question Two
Pg. 03
Learning
Outcome(s):
Recognize the
impact of the
interaction
between design
2 Marks
Question Two
Provided memory partitions of 50K 150K, 500K, 200K, 300K, and 650K
(sequentially). Determine how would each of the Best-fit, First-fit, and Worst-fit
algorithms place processes of 223K, 489K, 200K, and 547K (sequentially)? Also
mention which algorithm makes the best efficient use of memory
Best-Fit:
decisions and
operating system
features on the
performance and
robustness of the
programs.
First-Fit:
Worst-Fit:
Algorithm that makes the best efficient use of memory.
Question Three
Pg. 04
1 Marks
Learning
Outcome(s):
Question Three
Describe the OS
One of the methods that could be used for handling deadlocks, is ensuring that the
mechanism for
system will never enter a deadlock state. And that could be achieved by:
process
management,
timing, memory,
I/O, file and
concurrency
management.
1) Deadlock Prevention,
2) Deadlock Avoidance.
Explains the differences between these two mechanisms in your own language.