Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 8, Problem 8.9HW
Program Plan Intro
Given:
Process | Start time | End Time |
A | 5 | 7 |
B | 2 | 4 |
C | 3 | 6 |
D | 1 | 8 |
Expert Solution & Answer
Explanation of Solution
Determine whether the pair of processes run concurrently or not:
Diagram for processes AB:
Explanation:
- In the above timing diagram, process “A” starts with “5” and end with “7”.
- Process “B” starts with “2” and end with “4”.
- Process “A” and “B” are not concurrent with respect to each other because their corresponding executions do not overlap, that is, process “A” completes before process “B” starts.
Therefore, the processes “AB” are do not run concurrently.
Diagram for processes AC:
Explanation:
- In the above timing diagram, process “A” starts with “5” and end with “7”.
- Process “C” starts with “3” and end with “6”.
- Process “A” and “C” are concurrent with respect to each other because their corresponding executions overlap, that is, process “C” starts before the process “A” completes.
Therefore, the processes “AC” are run concurrently.
Diagram for processes AD:
Explanation:
- In the above timing diagram, process “A” starts with “5” and end with “7”.
- Process “D” starts with “1” and end with “8”.
- Process “A” and “D” are concurrent with respect to each other because their corresponding executions overlap, that is, process “D” starts before the process “A” completes.
Therefore, the processes “AD” are run concurrently.
Diagram for processes BC:
Explanation:
- In the above timing diagram, process “B” starts with “2” and end with “4”.
- Process “C” starts with “3” and end with “6”.
- Process “B” and “C” are concurrent with respect to each other because their corresponding executions overlap, that is, process “C” starts before the process “B” completes.
Therefore, the processes “BC” are run concurrently.
Diagram for processes BD:
Explanation:
- In the above timing diagram, process “B” starts with “2” and end with “4”.
- Process “D” starts with “1” and end with “8”.
- Process “B” and “D” are concurrent with respect to each other because their corresponding executions overlap, that is, process “D” starts before the process “B” completes.
Therefore, the processes “BD” are run concurrently.
Diagram for processes CD:
Explanation:
- In the above timing diagram, process “C” starts with “3” and end with “6”.
- Process “D” starts with “1” and end with “8”.
- Process “C” and “D” are concurrent with respect to each other because their corresponding executions overlap, that is, process “D” starts before the process “C” completes.
Therefore, the processes “CD” are run concurrently.
Completed table:
Process pair | Concurrent? |
AB | No |
AC | Yes |
AD | Yes |
BC | Yes |
BD | Yes |
CD | Yes |
Want to see more full solutions like this?
Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
please write the program of the following question in C language or Shell/Bash Script
If you have many processes that are running
concurrently, some code is a critical section if
one of the following options among others is
true :
a. At least one process is reading
O b. At least one process is writing
c. All processes should be writing
d. At least one process is reading and at
least one process is writing
e. All processes should be reading
Read each description of each Process Scheduler on the left and match it with the appropriate
name on the right.
This scheduler decides which processes in
memory get time on the CPU. It is executed
very frequently.
This scheduler handles "swapping" of
processes from main memory to mass
storage. For example, it may swap-out
processes that are waiting for I/O to
complete.
This scheduler selects spooled processes to
load from the mass storage device into mai
memory. It attempts to find a good mix of
"I/O bound" and "CPU Bound" processes to
maximize resource utilization.
[Choose ]
[Choose ]
✓ [Choose ]
Cool Scheduler
Schedulers aren't real; Nothing is real
Short-term Scheduler
Medium-term Scheduler
Spool Scheduler
Bound Scheduler
Frequency Scheduler
Swap Scheduler
Long-term Scheduler
Chapter 8 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 8.2 - Prob. 8.1PPCh. 8.4 - Prob. 8.2PPCh. 8.4 - Prob. 8.3PPCh. 8.4 - Prob. 8.4PPCh. 8.4 - Practice Problem 8.5 (solution page 797) Write a...Ch. 8.4 - Practice Problem 8.6 (solution page 797) Write a...Ch. 8.5 - Practice Problem 8.7 (solution page 798) Write a...Ch. 8.5 - Prob. 8.8PPCh. 8 - Prob. 8.9HWCh. 8 - In this chapter, we have introduced some functions...
Ch. 8 - How many hello output lines does this program...Ch. 8 - How many "hello' output lines does this program...Ch. 8 - Prob. 8.13HWCh. 8 - How many hello output lines does this program...Ch. 8 - How many "hello lines does this program print?Ch. 8 - Prob. 8.16HWCh. 8 - Prob. 8.17HWCh. 8 - Consider the following program: Determine which of...Ch. 8 - How many lines of output does the following...Ch. 8 - Use execve to write a program called my1s whose...Ch. 8 - What are the possible output sequences from the...Ch. 8 - Write your own version of the Unix system function...Ch. 8 - One of your colleagues is thinking of using...Ch. 8 - Modify the program in Figure 8.18 so that the...Ch. 8 - Write a version of the fgets function, called...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0 =1, S1= 0, S2=0 Process P0 Process P1 Process P2 wait(S0); print '0' release(S1) release (S2);} wait(S1); release(S0); wait(S2); release(S0); How many times will process P0 print ‘0’?arrow_forwardP and Q are two processes that share a set of variables that is common. The variable includes: seq, tA and tB: Before either process starts to execute, variable seg initially has the value 10. State the possible sets of different values of seg when both processes have finished executing. Provide an order of execution of statements from processes P and Q that would produce each of the values you give. Justify your answer in detail. P P1: tA= seq + 1; P2: seq = tA; tily has the value 10. Q Q1: tB = seq+ 2; Q2: seq = tB;arrow_forwardP and Q are two processes that share a set of variables that is common. The variable includes: seq, tA and tB: Before either process starts to execute, variable seg initially has the value 10. State the possible sets of different values of seg when both processes have finished executing. Provide an order of execution of statements from processes P and Q that would produce each of the values you give. Justify your answer in detail. P P1: tA= seq + 1; P2: seq = tA; stilly has the value 10. Q Q1: tB = seq+ 2; Q2: seq = tB;arrow_forward
- P and Q are two processes that share a set of variables that is common. The variable includes: seq, tA and tB: Before either process starts to execute, variable seg initially has the value 10. State the possible sets of different values of seg when both processes have finished executing. Provide an order of execution of statements from processes P and Q that would produce each of the values you give. Justify your answer in detail. P P1: tA= seq + 1; P2: seq = tA; inly has the value 10. Q1: tB = seq+ 2; Q2: seq = tB;arrow_forwardP and Q are two processes that share a set of variables that is common. The variable includes: seq, tA and tB: Before either process starts to execute, variable seg initially has the value 10. State the possible sets of different values of seg when both processes have finished executing. Provide an order of execution of statements from processes P and Q that would produce each of the values you give. Justify your answer in detail. ... P1: tA = seq + 1; P2: seq tA; Q1: tB = seqt 2; Q2: seq = tB; %3D %3Darrow_forwardplease write c programarrow_forward
- Please Implement in C programming Language Given the list of processes, their CPU burst times, arrival times, and priorities implement the Round Robin scheduling algorithm on the processes with preemption. Compute and print the completion Time(CT), Turnaround Time(TAT), and Waiting Time(WT) for each process using C Programming. Waiting time: Processes need to wait in the process queue before execution starts and in execution while they get preempted. Turnaround time: Time elapsed by each process to get completely served. (Difference between submission time and completion time).arrow_forwardP and Q are two processes that share a set of variables that is common. The variable includes: seq, tA and tB: Before either process starts to execute, variable seg initially has the value 10. State the possible sets of different values of seg when both processes have finished executing. Provide an order of execution of statements from processes P and Q that would produce each of the values you give. Justify your answer in detail. P ... P1: tA= seq + 1; P2: seq = tA; .. atfe seg inally has the value 10 Q1: tB = seq+ 2; Q2: seq = tB;arrow_forwardThere are six processes in three priority classes. Class 1 has the highest priority. (The amount of CPU time needed by each process is written in brackets.) • Class 1: II₁ (13 ms), II3 (8 ms), II6 (6 ms) • Class 2: II₂ (10 ms), II5 (4 ms) Class 3: II4 (12 ms) The system is using the following algorithm: The scheduler picks a process from the highest (non-empty) class. To schedule processes within the same class, the Round-Robin algorithm is used with quantum 5 ms. Process switch takes 1 ms. (a) Draw the schedule for the above processes on a timeline. (b) Mirko decided to modify the above algorithm: After each burst (i.e. when the quantum experies) the process is degraded by one class (unless it is already in Class 3). Draw the schedule for Mirko's modified algorithm.arrow_forward
- Write a c program called file1.c Program file1.c uses these: (a) fork() to launch another process. (b) exec() to replace the program driving this process, while supplying arguments to file2.c to complete its execution. (c) wait() to complete the execution of the child process. (d) file1.c takes two arguments x( a number less than 1) and n (number of terms to be added, 1 or more). For example: file1 0.5 5 (e) When the child process finishes, the parent prints: Parent(PID=yyy) : Donearrow_forwardP and Q are two processes that share a set of variables that is common. The variable includes: seq, tA and tB: Before either process starts to execute, variable seg initially has the value 10. State the possible sets of different values of seg when both processes have finished executing. Provide an order of execution of statements from processes P and Q that would produce each of the values you give. Justify your answer in detail.arrow_forwardConsider that we need to use semaphores to allow the below sequence of processes to execute: P4 P1 P3 P5 P2 Write the necessary semaphores and pseudocode to allow this execution sequence. Semaphores: P1 P2 P3 P4 P5arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning