6.5. Given the following state of a system: The system comprises of five processes and four resources. P1-P5 denotes the set of processes. R1-R4 denotes the set of resources. Total Existing Resources: R1 R2 R3 R4 3 6 3 4 6.13 / KEY TERMS, REVIEW QUESTIONS, AND PROBLEMS 333 Snapshot at the initial time stage: Allocation Claim R1 R2 R3 R4 R1 R2 R3 R4 P1 3 0 1 1 6 2 1 1 P2 0 1 0 0 0 2 1 2 P3 1 1 1 0 3 1 0 P4 1 1 0 1 1 1 1 P5 0 0 0 0 2 1 1 1 a. Compute the Available vector. b. Compute the Need Matrix. c. Is the current allocation state safe? If so, give a safe sequence of the process. In addition, show how the Available (working array) changes as each process terminates. d. If the request (1, 1, 0, 0) from P1 arrives, will it be correct to grant the request? Justify your decision. 17 722N No

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

please i need the answer

6.5. Given the following state of a system:
The system comprises of five processes and four resources.
P1-P5 denotes the set of processes.
R1-R4 denotes the set of resources.
Total Existing Resources:
R1
R2
R3
R4
3
6
3
4
6.13/ KEY TERMS, REVIEW QUESTIONS, AND PROBLEMS 333
Snapshot at the initial time stage:
Allocation
Claim
R1
R2 R3 R4 R1
R2
R3 R4
P1 3
0
1
1
6 2 1
1
P2 0
1
0
0
0 2
1
2
P3 1 1
1
0 3
2
1
0
P4 1
1
0
1
1
1
1
1
P5 0
0
0
0
2 1
1
1
a. Compute the Available vector.
b. Compute the Need Matrix.
c. Is the current allocation state safe? If so, give a safe sequence of the process.
In addition, show how the Available (working array) changes as each process.
terminates.
d. If the request (1, 1, 0, 0) from P1 arrives, will it be correct to grant the request?
Justify your decision.
Transcribed Image Text:6.5. Given the following state of a system: The system comprises of five processes and four resources. P1-P5 denotes the set of processes. R1-R4 denotes the set of resources. Total Existing Resources: R1 R2 R3 R4 3 6 3 4 6.13/ KEY TERMS, REVIEW QUESTIONS, AND PROBLEMS 333 Snapshot at the initial time stage: Allocation Claim R1 R2 R3 R4 R1 R2 R3 R4 P1 3 0 1 1 6 2 1 1 P2 0 1 0 0 0 2 1 2 P3 1 1 1 0 3 2 1 0 P4 1 1 0 1 1 1 1 1 P5 0 0 0 0 2 1 1 1 a. Compute the Available vector. b. Compute the Need Matrix. c. Is the current allocation state safe? If so, give a safe sequence of the process. In addition, show how the Available (working array) changes as each process. terminates. d. If the request (1, 1, 0, 0) from P1 arrives, will it be correct to grant the request? Justify your decision.
11.3. Consider a disk drive with 4,000 cylinders, numbered from 0 to 3,999. The request
queue has the following composition:
1045 750 932 878 1365 1787 1245 664 1678 1897
If the current position is 1167 and the previous request was served at 1250, compute
the total distance (in cylinders) that the disk arm would move for each of the following
algorithms: FIFO, SSTF, SCAN, and C-SCAN scheduling.
9.16. Five batch jobs, A through E, arrive at a computer center at essentially the same time.
They have an estimated running time of 15, 9, 3, 6, and 12 minutes, respectively. Their
(externally defined) priorities are 6, 3, 7, 9, and 4, respectively, with a lower value cor-
responding to a higher priority. For each of the following scheduling algorithms, deter-
mine the turnaround time for each process and the average turnaround for all jobs.
Ignore process switching overhead. Explain how you arrived at your answers. In the
last three cases, assume only one job at a time runs until it finishes, and all jobs are
completely processor bound.
a. round robin with a time quantum of 1 minute
b. priority scheduling
c. FCFS (run in order 15, 9, 3, 6, and 12)
d. shortest job first
8.4. Consider the following page-reference string: a, b, d, c, b, c, d, b, d, b, a, c, b, c, a, c, f.
a, f, d. Assume that there are 3 frames available and that they are all initially empty.
Complete a figure, similar to Figure 8.14, showing the frame allocation for each of the
following page replacement policies:
a. First-in-first-out
b. Optimal
c. Least recently used
Then, find the relative performance of each policy with respect to page faults.
7.6. This diagram shows an example of memory configuration under dynamic partitioning.
after a number of placement and swapping-out operations have been carried out.
Addresses go from left to right; gray areas indicate blocks occupied by processes;
white areas indicate free memory blocks. The last process placed is 2 Mbytes and is
marked with an X. Only one process was swapped out after that.
4M MX 5M
8M
2M 4M
3M
a. What was the maximum size of the swapped-out process?
b. What was the size of the free block just before it was partitioned by X?
c. A new 3-Mbyte allocation request must be satisfied next. Indicate the intervals of
memory where a partition will be created for the new process under the follow-
ing four placement algorithms: best-fit, first-fit, next-fit, and worst-fit. For each
algorithm, draw a horizontal segment under the memory strip and label it clearly.
Transcribed Image Text:11.3. Consider a disk drive with 4,000 cylinders, numbered from 0 to 3,999. The request queue has the following composition: 1045 750 932 878 1365 1787 1245 664 1678 1897 If the current position is 1167 and the previous request was served at 1250, compute the total distance (in cylinders) that the disk arm would move for each of the following algorithms: FIFO, SSTF, SCAN, and C-SCAN scheduling. 9.16. Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have an estimated running time of 15, 9, 3, 6, and 12 minutes, respectively. Their (externally defined) priorities are 6, 3, 7, 9, and 4, respectively, with a lower value cor- responding to a higher priority. For each of the following scheduling algorithms, deter- mine the turnaround time for each process and the average turnaround for all jobs. Ignore process switching overhead. Explain how you arrived at your answers. In the last three cases, assume only one job at a time runs until it finishes, and all jobs are completely processor bound. a. round robin with a time quantum of 1 minute b. priority scheduling c. FCFS (run in order 15, 9, 3, 6, and 12) d. shortest job first 8.4. Consider the following page-reference string: a, b, d, c, b, c, d, b, d, b, a, c, b, c, a, c, f. a, f, d. Assume that there are 3 frames available and that they are all initially empty. Complete a figure, similar to Figure 8.14, showing the frame allocation for each of the following page replacement policies: a. First-in-first-out b. Optimal c. Least recently used Then, find the relative performance of each policy with respect to page faults. 7.6. This diagram shows an example of memory configuration under dynamic partitioning. after a number of placement and swapping-out operations have been carried out. Addresses go from left to right; gray areas indicate blocks occupied by processes; white areas indicate free memory blocks. The last process placed is 2 Mbytes and is marked with an X. Only one process was swapped out after that. 4M MX 5M 8M 2M 4M 3M a. What was the maximum size of the swapped-out process? b. What was the size of the free block just before it was partitioned by X? c. A new 3-Mbyte allocation request must be satisfied next. Indicate the intervals of memory where a partition will be created for the new process under the follow- ing four placement algorithms: best-fit, first-fit, next-fit, and worst-fit. For each algorithm, draw a horizontal segment under the memory strip and label it clearly.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY