Chapter 10 Exercises and Answers: Answers Are in Blue
Chapter 10 Exercises and Answers: Answers Are in Blue
Chapter 10 Exercises and Answers: Answers Are in Blue
For Exercises 19 -23 , match the operating system with information about it.
A. MacOS
B. Unix
C. Linux
D. DOS
E. Windows
For Exercise 24 - 26, match the following software type with its definition.
A. Systems software
B. Operating system
C. Application software
Process 1
New process
Process 2
Empty
52 blocks
Empty
100 blocks
55. If the partitions are fixed and a new job arrives requiring 52 blocks of main memory, show memory
after using each of the following partition selection approaches:
A. First fit
B. Best fit
C. Worst fit
A. First fit
Operating
System
Process 1
New process
Process 2
Process 3
Empty
52 blocks
Empty
100 blocks
B. Best fit
Operating
System
Process 1
Empty
60 blocks
Process 3
New process
Empty
100 blocks
C. Worst fit
Operating
System
Process 1
Empty
60 blocks
Process 2
Process 3
Empty
52 blocks
New process
56. If the partitions are dynamic and a new job arrives requiring 52 blocks of main memory, show
memory after using each of the following partition selection approaches:
A. First fit
B. Best fit
C. Worst fit
A. First fit
Operating
System
Process 1
Empty 8 blocks
Process 2
Process 3
Empty
52 blocks
Empty
100 blocks
B. Best fit
Operating
System
Process 1
Empty
60 blocks
Process 2
Process 3
New process
Empty
100 blocks
C. Worst fit
Operating
System
Process 1
Empty
60 blocks
Process 3
Empty
52 blocks
New process
Empty 48 blocks
57. If a logical address in a paged memory management system is <2, 133>, what do the values mean?
This address means the 133 byte on page 2.
Frame 5 2 7 3
58. If the frame size of 1024, what is the physical address associated with the logical address <2, 85>?
7253
59. If the frame size of 1024, what is the physical address associated with the logical address <3,555>?
3627
60. If the frame size of 1024, what is the physical address associated with the logical address
<3,1555>?
Illegal address. The offset is larger than the page size.
61. What is virtual memory and how does it apply to demand paging?
Virtual memory is the illusion that memory is limitless and thus there is no limit on the size of a
program. Demand paging is the technique where pages are brought into memory only when they are
referenced (needed). Demand paging allows programs of any size, thus giving the illusion of
infinite memory.
62. What are the conceptual stages through which a process moves while being managed by the
operating system?
new, ready, running, waiting, and terminated
63. Describe how a process might move through the various process states. Create specific reasons why
this process moves from one state to another.
A new process begins in the new state. When the process has no bars to its execution, it moves into
the ready state. It waits in the ready state until it gets time in the running state. It runs for a while
and issues a command for file input. The process is moved into the waiting state until the I/O has
been completed, at which time it moves into the ready state to await another turn in the running
state. Eventually it gets back to the CPU and runs until it needs access to a part of the program that
is on secondary storage. It moves into the waiting state until the needed pages are brought in; then it
moves back to the ready state. It gets its third shot at the CPU and finishes, and moves into the
terminated state.
64. What is a process control block?
A process control block (PCB) is a data structure that contains information about a process. A PCB
is created for each new process. When a process moves from one state to another, its PCB is moved
with it.
65. How is each conceptual stage represented in the OS?
Use the following table of processes and service time for Exercises 69 through 71.
Process P1 P2 P3 P4 P5
69. Draw a Gantt chart that shows the completion times for each process using first-come, first served
CPU scheduling.
0 120 180 360 410 710
P1 P2 P3 P4 P5
70. Draw a Gantt chart that shows the completion times for each process using shortest-job-next CPU
scheduling.
0 50 110 230 410 710
P4 P2 P1 P3 P5
71. Draw a Gantt chart that shows the completion times for each process using round-robin CPU
scheduling with a time slice of 60.
72. Distinguish between fixed partitions and dynamic partitions.
The sizes of the partitions are fixed in a fixed partition scheme, although they are not necessarily the
same size. In a dynamic partition scheme, the partitions are allocated as needed.