Saint Louis University |
Computer Science 115
|
Dept. of Math & Computer Science |
Topic: Operating Systems
Related Reading: Ch. 10 of Dale/Lewis, as well as our
leccture notes.
Due:
8pm Tuesday, 16 November 2004
You will not need an Internet connection for completing the assignment, other than for submission, though several of the practice problems rely on applets from the Meyer text.
The Meyer text includes applets for simulating various CPU Scheduling Policies, simulating First-Come First-Serve, Shortest Job Next, and the Round Robin policies.
Please feel free to use this applet to review examples from the text, or to try out other sets of jobs. However, as with the examples in the Dale/Lewis text, this applet only considers examples for which all jobs arrive at time zero.
Exercise 70 of Ch. 10 (pp. 359-360); use Meyer software to simulate
Exercise 71 of Ch. 10 (pp. 359-360); answer in back of text
Exercise 72 of Ch. 10 (pp. 359-360); use Meyer software to simulate
All of the CPU scheduling examples given in the text involve the simpler case when all jobs "arrive" into the system at time 0. In this problem, we wish to examine the more general case which is when jobs arrive at differing times. One such example was given in the lecture notes.
Consider the following set of jobs:
Job | Arrival Time | Service Time |
---|---|---|
p1 | 0 | 120 |
p2 | 0 | 60 |
p3 | 50 | 180 |
p4 | 100 | 50 |
p5 | 250 | 300 |
The Meyer text includes applets for simulating various Memory Management Policies. You might wish to use this as a tool for the following practice problems of several of the problems to submit.
Exercise 35 of Ch. 10 (p. 356); answer in back of text
Exercise 49 of Ch. 10 (p. 357); answer in back of text
Exercise 51 of Ch. 10 (p. 357); answer in back of text
Exercise 55 of Ch. 10 (p. 357); answer in back of text
Using the page map table of Exercise 59-61 of Ch. 10 (p. 359) and a frame size of 1024, what is the physical address of the following logic addresses?
All of the CPU scheduling examples given in the text involve the simpler case when all jobs "arrive" into the system at time 0. In this problem, we wish to examine the more general case which is when jobs arrive at differing times. One such example was given in the lecture notes.
Consider the following set of jobs:
Job | Arrival Time | Service Time |
---|---|---|
p1 | 0 | 150 |
p2 | 0 | 200 |
p3 | 100 | 10 |
p4 | 120 | 130 |
p5 | 140 | 50 |
p6 | 240 | 40 |
For each of the following Scheduling Policies, draw a Gantt chart which shows the CPU usage. Then calculate the average turnaround time for the resulting schedule.
(3 points)
First-Come, First Served
(3 points)
Shortest Job Next (please note that SJN is non-preemptive
as described in the text)
(4 points) Round Robin with time slice of 30.
Note: Though you are asked to give Gantt charts, it may be difficult to typeset the diagrams as in the book. You may choose to report the same information in whatever way you choose. For example, the solution to Excercise 71, in the back of the book, might be represented more easily as:
Feel free to also see the solutions given to the practice problems.Job From To ---------------------- P4 0 50 P2 50 110 P1 110 230 P3 230 360 P5 360 710 Average turnaround time is 292 (because all arrival times were 0)
If, in a dynamic-partition memory management system, the current value of the base register is 58712 in decimal, and the current value of the bounds register is 1587, compute the physical addresses that correspond to the following logical addresses:
In a paged memory-management system, the frame and page sizes are 2048 and the following page map table applies to the currently executing process,
Page | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|
Frame | 64 | 22 | 8 | 71 | 55 |
Assume that dynamic partitioning is used for memory management, with 500 blocks of memory, the first 100 of which are used by the operating system. Consider the following sequence of process events, encountered by the system.
Process P1 arrives, requiring 200 blocks. Process P2 arrives, requiring 100 blocks. Process P1 terminates. Process P3 arrives, requiring 70 blocks. Process P4 arrives, requiring 60 blocks. Process P5 arrives, requiring 80 blocks. Process P6 arrives, requiring 20 blocks.
If the operating system uses "best fit" policy for memory management, describe the final memory configuration.
If the operating system uses "worst fit" policy for memory management, describe the final memory configuration.
Note: There will be an issue of how you wish to typeset your answer. Using the figure on page 358 as an example, we might suggest the following tabular form for describing such a partition set
Partitions | |
---|---|
process | size |
OpSys | 100 blocks |
Process 1 | -?- blocks |
Empty | 60 blocks |
Process 2 | -?- blocks |
Process 3 | -?- blocks |
Empty | 52 blocks |
Empty | 100 blocks |
Note that we use '-?-' for the size of the partitions for existing process because they are not specified in that example. In your solution, you should identify the size of all partitions.
Overall, please type your answers to all of the problems in a single document to be submitted electronically. Please see details about the submission process.
Though not discussed in the text, the lecture notes describe a CPU scheduling policy known as Shortest Remaining Processing Time (SRPT). (it is a preemptive version of the SJN policy).
Demonstrate your understanding of the SRPT policy by giving the Gantt chart and average turnaround time which results on the set of jobs used in Problem A of the submitted problems.