QUIZ 1
-Solution
1.The service provided by an Operating System can be divided into two main categories. Briefly describe the two categories and discuss how they differ.
The service provided by an Operating System can be divided into two main categories, first services is for ease user such as user interface, program execution and I/O operations. The second services is for ensuring the efficient operation of the system itself such as resources allocation, accounting and protection.
2. List five services provided by an Operating System that are designed to make it more convenient for users to use computer system.
a)user interface,
b)program execution,
c)I/O operations,
d)File-system manipulation,
e)Communications
3.Describe the three general methods for passing parameters to the Operating System.
a) Simplest: pass the parameters in registers
b) Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register
c) Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system
4.What are the five major activities of an Operating System with regards to file management?
a)Create, b) delete, c) copy, d)rename, e)print, f)dump, e)list
1.The service provided by an Operating System can be divided into two main categories. Briefly describe the two categories and discuss how they differ.
The service provided by an Operating System can be divided into two main categories, first services is for ease user such as user interface, program execution and I/O operations. The second services is for ensuring the efficient operation of the system itself such as resources allocation, accounting and protection.
2. List five services provided by an Operating System that are designed to make it more convenient for users to use computer system.
a)user interface,
b)program execution,
c)I/O operations,
d)File-system manipulation,
e)Communications
3.Describe the three general methods for passing parameters to the Operating System.
a) Simplest: pass the parameters in registers
b) Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register
c) Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system
4.What are the five major activities of an Operating System with regards to file management?
a)Create, b) delete, c) copy, d)rename, e)print, f)dump, e)list
Quiz 2 - Solution
1) Which one is not one of the
Scheduling algorithms mentioned earlier.
a) First-Come First-Serve
b) Round Bear
c) Shortest Job First
2) Using the FCFS algorithm,
which process is allocated the CPU first?
a) The process
that requests the CPU first.
b) The process that requests the CPU last.
c) Processes are allocated the CPU randomly.
3) Using the SJF algorithm,
which process is allocated the CPU first?
a) The process that requests the CPU first.
b) The process that requests the CPU last.
c) The process
with the smallest CPU execution time.
4) The SJF algorithm is not fair
for which type of job?
a) Small jobs.
b) Any size job.
c) Large jobs.
5) Four processes are arrived at
time 0, with the length of the CPU burst given in milliseconds:
Process Burst
Time * Priority
P1 10 3
P2 5
1
P3 7 3
P4 10 2
*smaller priority number implies a higher priority
Table1 List of processes that are arrived at time 0
The processes are assumed to have arrives in order P1,P2,P3,P4
all at time 0.
I.
Draw two (2) Gantt charts that
illustrate the execution of these processes using the following scheduling
algorithms: FCFS and Priority.
II. What
is the waiting time of each process of the scheduling algorithms in part I?
Average waiting
time for first come first serve = (0+10+15+22)/4
= 11.8
Average waiting
time for Priority = (0+5+15+25) /4
=11.3
III. Which
of the algorithms in part II. results in the minimum average waiting time (over
all processes)?
Priority Scheduling shows the
most minumum average waiting time (11.3).
No comments:
Post a Comment