Answer |
Answer |
Answer |
Answer |
Answer |
Answer |
Answer |
![]() |
Give a short definition of an operating system and list a few function that it provides
Definition: ____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
Functions: ____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
List
a few criteria that are used in evaluating the performance of the CPU
|
|
|
|
What is a PCB (Process Control Block)? Elaborate.
Given
the following processes, use deterministic analysis and Gantt chart to
calculate which CPU scheduling algorithm will be optimal among
|
|
|
|
(Only for Priority) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
What
is the completion time of each process for each of the scheduling methods
in number 4 (fill in the table)
|
|
|
|
|
|
||||
|
||||
|
||||
|
What do you know about starvation? How to remedy?
What do you know about multilevel queue scheduling?
Definition:
-*- A program that acts as an
intermediary between a user and the computer hardware (and software)
-*- A program that provides an environment in which a user can execute program conveniently and efficiently -*- A resource allocator and manager -*- Similar to a government
|
-*- Program execution:
Run, terminate
-*- Input / Output operations -*- File system manipulation: Read, write, open, create, delete . . . -*- Error detection: Hardware |
-*- Resource allocation
-*- Accounting: Read keeping and usage statictics -*- Protections |
There
are three criteria that used in evaluating the performance of the CPU
|
|
|
|
It contains many pieces of information associated with a specific process, including; process state, program counter, CPU register, CPU scheduling information, memory - management information, accounting information, I/O status information
Click
on hypertext links in the table below for answers. For more details
in solving technique, please see Assignment
number one. In this part, there are only results, not explaination.
|
|
|
|
1. FCFS method |
|
= 0 + (5 - 1) + (6 - 2) + ( 12 - 3) |
= 4 + 4 + 9 = 17 | |
|
= 17 / 4 = 4.25 |
|
The average waiting time of given jobs is 4.25 |
|
|
2. SRTF algorithm |
|
= (2 - 1) + 0 + (10 - 2) + (6 - 3) |
= 12 | |
|
= 12 / 4 = 3 |
|
The average waiting time of the given jobs is 3 |
|
|
3. Priority method |
|
= 0 + (5 - 1) + (6 - 3) + (10 - 2) |
= 4 + 3 + 8 = 15 | |
|
= 15 / 4 = 3.75 |
|
The average waiting time of the given jobs is 3.75 |
|
|
4. Round robin | ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
= (11 - 7) + (5 - 2) + (2 - 1) + (14 - 11) + (9 - 5) + (3 - 2) + (12 - 9) + ( 7 - 3) |
= 4 + 3 + 1 + 3 + 4 + 1 + 3 + 4 | |
= 23 | |
|
= 23 / 4 = 5.75 |
|
The average waiting time of given jobs is 5.75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FCFS Gantt Chart |
|
|
|
|
|
SRTF Gantt Chart |
|
|
|
|
|
Priority Gantt Chart |
|
|
|
|
|
RR Gantt Chart |
Stavation of low priority process: Low priority jobs may waits indefinitely the CPU if there are always jobs of greater priority.
Multilevel queue scheduling is used to schedule many queue of jobs in defferent levels. It helps CPU run faster and finish the jobs in useful ways
-
Copy right Spring 99
Last Update March 23, 1999