Workbook in Operating System
Workbook in Operating System
IN
OPERATING SYSTEM 1
Prepared by:
Committee in Operating System
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
RESEARCH ACTIVITY 1
1. Research on at least three other definitions of Operating Systems that were not
used in this module. Include the reference of source of the material.
2. Enumerate at least three (3) operating systems available in the market or still
under research using the format below.
Operating
System Name
Developer
Description / Features
1.
2.
3.
Sources
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 1
1. Define Operating Systems in your own words.
6. Interface
7. Time Sharing
8. Embedded
9. Smart Card
10. Mainframe
11. Asymmetric
12. Symmetric
13. Job Pool
14. Throughput
15. Multitasking
Note: Words make come in Horizontal, vertical or diagonal up and down manner.
Words may also be spelled backwards. Let SMILEY help you!
O F F L I N E P R O C E S S I
P S R T E R R M E O
S O S X
H A E E H A R R Y M P H S I
S M A R T C A R D B
T
I
N G M
A T T E G O F F Y
H A P E T S E G D P D Z O I
E K D I
B T F I
P W C N
W O N C Y O A H T
E M I O G N K N Z E N A G S I
S A N Y U M G T G D
S P I
M Y J O U L
A S Y M M E T R I C A L
M E R X A E I
K O R O E
R F D U Q L E O R
H R E S Y G A E A S V E A G Y W R P K F
A F L M S O H X L O Y X D H T E S T A A
R N L O E I
I
M P S Y S S Y M M E T R I C
I S O M U O U O M
N A O K S K I
G M U L T I
T K R A T Z
K T T E T J E N L
T A S K I
N G
L A K I
M A N U T E
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 2
I.
5. Differentiate the Hard Real Time OS and Soft Real Time OS.
II.
M S
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
RESEARCE ACTIVITY 2
1. Make a compilation of a least 5 different secondary storage devices in the market using the format below:
Storage
Device
Name
Developer /
Company
Description /
Features
Capacity
Sources
1.
2.
2. Give at least 3 different commercial types of primary memory using the format
below:
Storage
Device
Name
Developer /
Company
Description /
Features
1.
2.
Capacity
Sources
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 3
1. Define Interrupt in your own words. Provide an analogy of your own.
4. Enumerate the differences of the primary and secondary storage devices. Discuss.
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 4
1. What are the different process models? Discuss.
6. Concurrent
7. User Space
8. Terminated
9. Cooperating Process
10. Kernel
B U S R A L O V E T H Y P E S O H O P E
R A S N E I
G H B O R S
T A C O J O R O S S
R C A N E C R R
M E O O N L R P O A
E T
C K A T H R E A D S
C N D Y O R C D
D Y
O J G I
R C A B B O U F
Y E A R N S
H M K U P R U N N I
N G E U R L A C R G
U S
U R G R O L H O N S
T E
S A R E S U A S
A R A O G E E H
M Y T R H C U S M U
F D E T A K E R N E L
M E E S K I
U S
R E L O V E S D I
S A S T T E R M I
N A T E D A T T O
S E Y
S N E E O S N I
S W P R E K P S O O M N S A R T U A S K
A Q A N A B L A Y A M A L E S I
S P C O O P E R A T I
O R E S A N A R T S
G T O Y
N G P R O C E S S
A P O T I
L E G N A
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 5
1. Draw the Gantt Chart illustrating the execution of these processes using FCFS
and SJF.
Job
Arrival Time
Burst Time
Priority
J1
1
15
3
J2
11
5
4
J3
16
12
5
J4
21
8
1
J5
30
7
2
FCFS
SJF
2. What is the individual turnaround time of each process for each scheduling algorithm in #1?
FCFS
tt1 =
tt2 =
tt3 =
tt4 =
tt5 =
Ttave =
SJF
tt1 =
tt2 =
tt3 =
tt4 =
tt5 =
Ttave =
3. What is the individual waiting time of each process for each scheduling algorithm in #1?
FCFS
wt1 =
wt2 =
wt3 =
wt4 =
wt5 =
wtave =
SJF
wt1 =
wt2 =
wt3 =
wt4 =
wt5 =
wtave =
4. Given the same data in #1 draw the Gantt Chart using the SRTF algorithm.
SRTF
5. Compute for the individual waiting time and turnaround time using the SRTF
Gantt Chart in #4.
FCFS
tt1 =
tt2 =
tt3 =
tt4 =
tt5 =
ttave =
SJF
wt1 =
wt2 =
wt3 =
wt4 =
wt5 =
wtave =
6. Is there a difference between the non-preemptive SJF and its preemptive version (SRTF) in terms of:
a. Gantt Chart?
b. Average Waiting Time?
c. Average Turnaround Time?
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 6
1. Given the following job stream data:
Job
P1
P2
P3
P4
P5
P6
Arrival Time
1
5
5
11
16
20
Burst Time
4
12
9
2
10
11
Priority
6
2
4
3
1
5
Priority
2. What is the individual turnaround time each process for each scheduling algorithm in #1
SRTF
tt1 =
tt2 =
tt3 =
tt4 =
tt5 =
Ttave =
Priority
tt1 =
tt2 =
tt3 =
tt4 =
tt5 =
Ttave =
3. What is the individual waiting time each process for each scheduling algorithm
in #1?
SRTF
wt1 =
wt2 =
wt3 =
wt4 =
wt5 =
wtave =
Priority
Wt1 =
Wt2 =
Wt3 =
Wt4 =
Wt5 =
Wtave =
4. Given the same data in #1 draw the Gantt Chart using the preemptive priority
algorithm.
P-Prio
5. Compute for the individual waiting time and turnaround time using the PPriority Gantt Chart in #4.
SRTF
Priority
tt1 =
wt1 =
tt2 =
wt2 =
tt3 =
wt3 =
tt4 =
wt4 =
t5 =
wt5 =
ttave =
wtave =
6. Is there a difference between the preemptive and non-preemptive priority
scheduling algorithms in terms of:
a. Average Waiting Time?
b. average turnaround Time?
7. In the two priority algorithms which algorithm was able to complete processing
first?
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 7
1. Using the given data below draw the SRTF and Round Robin Gantt Chart:
Job
P1
P2
P3
P4
P5
P6
Arrival Time
1
5
5
11
16
20
Burst Time
4
12
9
2
10
11
Priority
6
2
4
3
1
5
q=4
SRTF
RR
2. What is the individual turnaround time each process for each scheduling algorithm in #1?
SRTF
tt1 =
tt2 =
tt3 =
tt4 =
t5 =
ttave =
RR
tt1 =
tt2 =
tt3 =
tt4 =
tt5 =
ttave =
3. What is the individual waiting time of each process for each scheduling algorithm in #1?
SRTF
RR
wt1 =
Wt1 =
wt2 =
Wt2 =
wt3 =
Wt3 =
wt4 =
Wt4 =
w5 =
Wt5 =
wtave =
Wtave =
4. Given the same data in #1 draw the Gantt Chart using the Round Robin algorithm with a time quantum of 3.
RR
5. Compute for the individual waiting time and turnaround time using the PPriority Gantt Chart in #4
tt1 =
tt2 =
tt3 =
tt4 =
t5 =
ttave =
P-Prio
wt1 =
wt2 =
wt3 =
wt4 =
wt5 =
wtave =
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
RESEARCH ACTIVITY 3
Make a research based on the following questions:
1. What is a Bernoulli Disk Drive?
2. What is Disk Array?
3. What is Redundant Array of Inexpensive Disk or R.A.I.D?
4. How is Disk Formatting done?
5. What is a Cylinder Skew?
6. What is a Constant Angular Velocity?
7. What is a Constant Linear Velocity?
8. What is Disk Interleaving?
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 8
1. Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is
currently serving a request at cylinder 160 and has previously serviced cylinder
80. The queue of pending requests in First In First Out order is:
94
1445
915
1787
955
1505
1030
1753
1905
Starting from the current head position, what is the total distance traversed by
the disk arm in satisfying all the request using the following disk scheduling algorithms?
Draw the diagram on the box provided. Assume that the is negligible.
a. FCFS
b. SCAS
c. SSTF
d. LOOK
e. C-SCAN
f. C-LOOK
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 9
1. The head of the moving disk, with 200 tracks number 0 to 199, is currently serving request at track 133 and had just finished a request at track 123. If the rate of
movement form one track to another is 6 millisecond/track. What is the seek time
of each scheduling algorithm with the following requests which is kept in FIFO order:
89
150
94
180
97
b. SCAN
c. SSTF
153
105
178
133
d. LOOK
e. C-SCAN
f. C-LOOK
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
RESEARCH ACTIVITY 4
1. Make a research how memory management is done in the following:
a. Mobile Phones
b. Multimedia Systems
c. Calculators
2. Make a research how the human memory functions. Draw possible similarities
with the computers memory and its management.
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 10
1. What are the important considerations in the different memory management
schemes?
3. What is the difference between MVP and MFP. Provide your own analogy.
4. Given the following memory partitions 15k, 9k, 25k, 23k, 12k, 14k, 17k, and
20k, respectively. Also the following processes, J1, J2 and J3 have the corresponding memory requirements of 17k, 15k and 14k respectively. Which hole will be
taken by these processes using the following memory partitions allocation algorithm:
a.) First Fit
Bt
7
12
5
5
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 11
1. Explain the Following:
a) Internal Fragmentation. How does it occur?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
2. Describe the major disadvantages for each of the four memory allocation schemes.
a) Single User Configuration
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
b) Fixed Partitions
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
c) Dynamic Partitions
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
b) Fixed Partitions
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
c) Dynamic Partitions
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
Memory Requested
Job 1
740K
Job 2
500K
Job 3
700K
Memory List
Memory Blocks
Size
Block 1
610K
Block 2
850K
Block 3
700K
a) Use the best-fit algorithm to allocate the memory blocks to the three arriving jobs.
b) Use the first-fit algorithm to allocate the memory blocks to the three arriving jobs.
Memory Requested
Job 1
800K
Job 2
650K
Job 3
700K
Job 4
600K
Job 5
1000
Memory List
Memory blocks
Size
Block 1
600K
Block 2
850K
Block 3
700K
Block 4
650K
Block 5
1500K
c) Use the best-fit algorithm to allocate the memory blocks to the three arriving jobs.
d) Use the first-fit algorithm to allocate the memory blocks to the three arriving jobs.
6. Worst-fit is an allocation algorithm that is the opposite of the best fit. It allocates free to a new job.
a) What might be an advantage of the algorithm?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
b) How would it compare to best-fit and first-fit for the conditions given in exercise 4?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
c) How would it compare are to best-fit and first-fit for the conditions given in exercise 5?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
7. The relocation implies that compaction is done entirely in memory, without secondary storage. Can all
free sections of memory be merged into one contiguous block using this approach? Why or why not?
8. One way to compact memory would be to copy all existing jobs to a secondary storage device and
then reload them contiguously into main memory, thus, creating one free block after all jobs have been
recopied (and relocated) into memory. Is this viable? Could you advice a better way to compact
memory? Write your algorithm and explain why it is better.
Job 2 (15K)
Job 3 (45K)
At this point, job 4 arrives requesting a block of 100K. Answer the following:
a) Can Job 4 be accommodated? Why or Why not?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
b) If relocation is used, what are the contents of the relocation register for Job 1, Job 2,
and Job 3 after compaction?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
c) What are the contents of the relocation register for job 4 after it has been loaded into
memory?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
10. You have been given the job of determining whether the current fixed partition memory
configuration in your computer system should be changed.
a) What information do you need to help you make the decision?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
c) Once you had the information, how would you determine the best configuration for
your system?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 12
P0
P1
P2
P3
P4
Allocation
A B C D
0 0 1 2
1 0 0 0
1 3 2 0
0 2 1 0
0 0 1 4
A
0
0
1
0
2
Max
B C
0 0
7 5
0 0
0 2
6 4
D
0
3
2
0
2
Available
A B C D
1 5 2 0
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 13
1. What are the major differences between deadlock, starvation, and race?
2. Give some real life examples (not related to a computer system environment) of deadlock, starvation and race.
3. Select one example of deadlock from question no. 2 and list the four necessary conditions needed for
the deadlock.
1.What is the status of the system if P2s request is granted before P1s?
2.What is the status of the system if P1s request is granted before P2s?
5. Consider the following directed resource graph:
c.Three processes P1, P2, and P3 are requesting resources from R2.
1.Which requests would you satisfy to minimize the number of processes involved in the
deadlock?
2.Which requests would you satisfy to maximize the number of processes involved in
the deadlock?
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
RESEARCH ACTIVITY 5
1. Make a research in the following types of File Systems. Make a detailed discussion on its implementation and compare it with one another.
Unix V7 File System
Windows File System
CO/M File System
MS/DOS File System
Elephant File System
ISO 9660 File System
2. What is a Log Structured File System?
3. How is File Backup done?
Name ____________________________________________
Date _________
Instructor _________________________________________
Rating _________
EXERCISE 14
1. Discuss the importance of a File Manager.
2. Differentiate the absolute path name and relative path name method in specifying Files.
6. Graphical User
7. Command Line
8. Subfolder
9. Hierarchical
10. Absolute Path
11. Append
12. Record
13. Field
14. Contiguous
15. Seek
G R A P H I C A L U S E R A B C D E F G
C R H T I I J K B L M D I
R E C T O R Y
O N E O T R E E P S Q R S T U V W X Y Z
M N W L
E R I R V R O S U N G M Y A B C
M N E X A T I T A F I
E S Y S T E M I
A M E W O T F B N R T S U B F O L
D E R
N P Y O U S I I U N C G W T I T H M E E
D A P B C D E V E T F H G H E I
L M N E O P L Q E R E S I
I
K L C
T U P V W X O
Y Z A N B D K D P E G H C I L A M N R
N N G O P D R S T U A W Y A A A N T G D
E C O N T I G U O U S T M A G L A R H A
L A Y G I N T U N G T E H U N A Y B A G
A Y N A D A P A T P A G E S I K A P A N
K A R U N U N G A N Y M A K H A L
A G A