Professional Documents
Culture Documents
FALSE 1. The operating system is a control program which manages the computer
system hardware and other application software.
FALSE 2. The operating system hides from the human user the technical and complex
truth about computer operation.
TRUE 3. The first computer does not have an operating system.
TRUE 4. Multiprocessor computers are computers with more than one memory unit.
TRUE 5. Multiprogramming simple allows multiple processes to stay in memory while
having alternate turns with the processor.
TRUE 6. ACPU burst denotes the amount of time a job is utilizing the computer
processor.
FALSE 7. In time sharing, the OS rapidly switches the processor to multiple jobs, which
create the illusion that the computer is not handling multiple jobs simultaneously.
TRUE 8. A task or a process is always composed of a CPU burst and I/O burst.
TRUE 9. OS provides an environment where users can run their programs/applications.
FALSE 10. Device managers are in charge with how hardware mechanisms of the
compute operate in the coordination with the OS.
1 5 5 11 16 20
FCFS
A4 B12 C9 D2 E10 F11
0 1 5 17 26 28 38 49
A4 B12 C9 D2 E10 F11
C9 D2 E10 F11
E10 F11
SJF
A4 C9 D2 E10 F11 B12
0 1 5 14 16 26 37 49
A4 B12 B12 B12 B12 B12
C9 D2 E10 F11
0 1 5 17 27 29 38 49
SRTF
A4 C6 D2 C3 E4 E6 F11 B12
0 1 5 11 13 16 20 26 37 49
PP
A4 B6 B5 E4 E6 B1 D2 C9 F11
0 1 5 11 16 20 26 27 29 38 49
RR (q=3)
A3 A1 B3 C3 B3 D2 C3 B1 E3
0 1 4 5 8 11 14 16 19 20 23
A4 A1 B12 C9 B9 D2 C6 B6 E10 C3
C9 B9 D2 C6 B6 E10 C3 F11
C6 B6 E10 C3 F11 B5
B5 E7
C3 F3 B3 E3 F3 B2 E3 F3 E1 F2
26 29 32 35 38 40 43 46 47 49
F11 B5 E7 F8 B2 E4 F5 E1 F2
B5 E7 F8 B2 E4 F5 E1 F2
E7 F8 B2 E4 F5
RR 20.83 MS 12.83 MS
Problem 2: Compute for TTA and WTA using FCFS and RR(q=5).
Jobs Arrival Time Burst Time
P1 3 8
P2 7 2
P3 9 11
P4 14 4
P5 17 12
P6 19 8
P7 27 9
Flow line
P1 P2 P3 P4 P5 P6 P7
3 7 9 14 17 19 27
FCFS
P1 P2 P3 P4 P5 P6 P7
0 3 11 13 24 28 40 48 57
P1 P2 P3 P4 P5 P6 P7
P3 P5 P6 P7
P6 P7
P7=57-27=30 30-9-=21
RR (q=5)
P1(5) P2(1) P1(3) P3(2) P2(1) P4(2) P3(2) P5(5) P4(2)
0 3 8 9 12 14 15 17 19 24 26
P1(8) P2(2) P1(3) P3(11) P2(1) P4(4) P3(9) P5(12) P4(2) P6(8)
P1(3) P3(11) P2(1) P4(4) P3(9) P5(12) P4(2) P6(8) P3(7)
P2(1) P3(9) P4(2) P6(8) P3(7) P5(7)
P3(7) P5(7)
P6(1) P3(5) P5(5) P7(5) P6(5) P3(2) P5(2) P7(4) P6(2)
27 32 37 42 47 49 51 55 57
P7=55-27=28 28-9-=19
TTA WTA
RR 24.14 MS 16.42 MS
C 1. Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk
arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85,
90,100,105,110,135 and145. If Shortest-Seek Time First (SSTF) is being used for
scheduling the disk access, the request for cylinder 90 is serviced after servicing
____________number of requests.
a)1 b)2 c)3 d)4
D 2. Consider an operating system capable of loading and executing a single sequential
user process at a time. The disk head scheduling algorithm used is First Come First
Served (FCFS). If FCFS is replaced by Shortest Seek Time First (SSTF), claimed by the
vendor to give 50% better bench mark results, what is the expected improvement in the
I/O performance of user programs?
a) 50% b) 40% c) 25% d) 0%
C 3. Suppose the following disk request sequence (track numbers) for a disk with 100
tracks is given: 45,20,90,10,50,60,80,25,70. Assume that the initial position of the R/W
head is on track 50. The additional distance that will be traversed by the R/W head
when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN
(Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts
execution) is _________tracks
a) 8 b) 9 c) 10 d) 11
LESSON 7: DEADLOCKS
ASSESSMENTS:
True or False: Write TRUE if the statement is correct otherwise write FALSE on the
space provided.
FALSE 1. Deadlocks are beneficial to the computer system, but are commonly
misunderstood like interrupts.
TRUE 2. A safe sequence guarantees the process is not in deadlock.
FALSE 3. Processes is in a Hold and wait condition whenever there is exclusive owner
ship of a particular resource.
TRUE 4. There can be more than one safe sequence in a given set of processes and
resources.
FALSE 5. Deadly embrace can be avoided in the computer system by preventing any of
the conditions for deadlock to be true.
TRUE 6. Pretending that a deadlock problem does not exist is also known ostrich
algorithm.
TRUE 7. All four conditions for deadlocks must be true before a state of deadlock can
exist.
FALSE 8. A request can not be granted if the resources are sufficient or when the
request would place the system in a state of deadlock.
TRUE 9. A safe state is a situation where in all processes can finish execution.
TRUE10. When the system accepts a request for a particular resource/s, it runs the
Banker’s Algorithm to check it, it is safe to grant the request.