School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Scien
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
COMP604 Operating Systems
LAB 02
Unix Shell Setup and Unix Command
In the first lab, we setup our lab machine environment. As we have learned in Lecture 1, an OS is usually
a multi-user environment. What we will do in the lab is that everyone uses a remot
COMP604 Operating Systems
FINAL EXAMINATION
Semester 2, 2017
PAPER CODE:
COMP604
TIME ALLOWED:
2 hours plus reading time of 5 minutes
TOTAL MARKS:
70
INSTRUCTIONS:
1.
Answer ALL the questions. All questions are compulsory
2.
This is a closed book examinat
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Sciences
School of Engineering, Computer and
Mathematical Sciences
School of Engineering, Computer and Mathematical Sciences
COMP 604
Operating Systems
M G Abbas Malik
[email protected]
M G Abbas Malik
School of Engineering, Computer and Mathematical Scien
COMP604 Operating Systems
Assignment 01
COMP604 OPERATING SYSTEMS
COURSE ASSIGNMENT
Semester 2, 2017
DUE DATE: Week 10: Friday, October 6, 2017, 11:59 PM
Assignment Worth: 30% of total marks
NB: This is a team or individual assignment: The assignment is i
COMP604 Operating Systems
LAB 01
In the first lab, we look at the basic commands in Windows Platform. As we have learned in Lecture 1,
an OS is usually a multi-user environment. What we will do in the lab is that everyone uses a Windows
command-line en
Week 5: Process
Synchronization & Deadlocks
Not only on earth
Agenda
Background
The Critical-Section Problem
Solutions to the critical section problem
Synchronization Hardware
Mutex Locks
Semaphores
Monitors
Deadlock and Starvation
Classic Problem
COMP604 Operating Systems
Lab 01 Unix Shell Setup and Unix Command
In the first lab, we setup our lab machine environment. As we have learned in Lecture 1, an OS is usually a
multi-user environment. What we will do in the lab is that everyone uses a remot
Operating Systems
Lab 04 Threads
In the lecture, we have studied the concept of thread and the benefits of multithreading including
responsiveness, resource sharing, economy, and scalability. We have also examined how to use PThreads and
Java Thread lib t
Operating Systems
Lab 05 Process Synchronization & Deadlocks
In the lecture, we have studied the concepts race conditions, mutex, semaphores, deadlocks, and we also have
examined some classic synchronization problems such as bounded buffer problem and din
Operating Systems
2014-S2
Lab 6: CPU Scheduling
Task 1: CPU Scheduling Exercise 1 (10 Marks)
ss tt t rsss rr t t
Prss rst Prrt
P
P
P
P
P
t r rrt r ts r rrt
r t P s rts tr t trr t ts r
rss s s t r t trr ts
rst rst r
rtst rst
Pr
COMP604 Operating Systems
Lab 02 Shell Scripting and System Calls
In this lab, we explore how to write and use shell scripts to interact with the operating system, and we explore
the overhead of system calls.
Task 1: Shell Scripting Exercises (10 Marks)
A
Operating Systems
Lab 03 Process Management (20 Marks)
In the lecture, we have studied the structure of a process, how to create a process using fork, execute and
terminate a process, and also inter-process communication using pipes. In this lab, we revie
Operating Systems
Lab 07 Main Memory
Task 1: Dynamic Storage Allocation (5 Marks)
Given six memory partitions (holes) of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order),
how would the first-fit, best-fit, and worst-fit algorithms place proce
Operating Systems
Lab 08 Virtual Memory
Task 1: Page Fault Rate (5 Marks)
Assume we have a demand-paged memory. The page table is held in registers. It takes 8 milliseconds to service a
page fault if an empty page is available or the replaced page is not
Operating Systems
Lab 09 File System Implementation
Task 1: Disk Allocation Techniques (5 Marks)
Contrast the performance of the three techniques for allocating disk blocks (contiguous, linked, and indexed) for both
sequential and random file access.
Answ