Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 3, Problem 40CRP
a.
Program Plan Intro
Starvation
The starvation is a phenomenon in which a process has to wait for its execution due to low priority.
b.
Program Plan Intro
Starvation
The starvation is a phenomenon in which a process has to wait for its execution due to low priority.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A common variable x, introduced to nothing, is worked on by four simultaneous cycles W, X, Y, Z as follows. Every
one of the cycles W and X peruses x from memory, increases by one, stores it to memory, and afterward ends.
Every one of the cycles Y and Z peruses x from memory, decrements by two, stores it to memory, and afterward
ends. Each cycle prior to perusing x summons the P activity (i.e., look out) on an including semaphore S and
conjures the V activity (i.e., signal) on the semaphore S in the wake of putting away x to memory. Semaphore S is
introduced to two. What is the most extreme conceivable worth of x after all cycles total execution?
A system is made up of three processes that share five resources of the same kind that are all used in the same manner. Each process may be completed with a maximum of two resources. Are there any deadlocks in the system that can be demonstrated?
In the picture attached, the
Say that the system is running 3 jobs, A, B, and C, and that all of them are CPU-intensive (i.e., each one does one infinitely long CPU burst). The system begins with A on the CPU at the beginning its time quantum while B and C are in the Ready Queue, in that order.
a) Show the execution pattern (as a string of A’s, B’s, C’, and o’s) assuming that the scheduler time quantum is equal to 4 ms. Show the execution for more than 20ms (but less than 30ms).
b) In the long run (i.e, assuming jobs don’t ever terminate), what percentage of the CPU time is wasted doing context-switching/scheduling?
The answers I came up with is as follows:
a) AAAAoBBBoCCCoAAAoBBBoCCCoAAA, because for the first 4ms, A gets to execute it's full time quantum, however, when context-switching to the next job, the switch is included in the time quantum.
b) 2.77% spent context switching, divide the number of o's by the total amount of runtime.
Chapter 3 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 3.1 - Identify examples of queues. In each case,...Ch. 3.1 - Which of the following activities require...Ch. 3.1 - Prob. 3QECh. 3.1 - Prob. 4QECh. 3.2 - Prob. 1QECh. 3.2 - What is the difference between application...Ch. 3.2 - Prob. 3QECh. 3.2 - Prob. 4QECh. 3.3 - Summarize the difference between a program and a...Ch. 3.3 - Summarize the steps performed by the CPU when an...
Ch. 3.3 - Prob. 3QECh. 3.3 - If each time slice in a multiprogramming system is...Ch. 3.3 - Prob. 5QECh. 3.4 - Prob. 1QECh. 3.4 - Suppose a two-lane road converges to one lane to...Ch. 3.4 - Prob. 3QECh. 3.4 - Prob. 4QECh. 3.5 - Prob. 1QECh. 3.5 - Prob. 2QECh. 3.5 - If a process in a multiprogramming system could...Ch. 3 - List four activities of a typical operating...Ch. 3 - Summarize the distinction between batch processing...Ch. 3 - Prob. 3CRPCh. 3 - Prob. 4CRPCh. 3 - What is a multitasking operating system?Ch. 3 - Prob. 6CRPCh. 3 - On the basis of a computer system with which you...Ch. 3 - a. What is the role of the user interface of an...Ch. 3 - What directory structure is described by the path...Ch. 3 - Define the term process as it is used in the...Ch. 3 - Prob. 11CRPCh. 3 - What is the difference between a process that is...Ch. 3 - What is the difference between virtual memory and...Ch. 3 - Suppose a computer contained 512MB (MiB) of main...Ch. 3 - What complications could arise in a...Ch. 3 - What is the distinction between application...Ch. 3 - Prob. 17CRPCh. 3 - Summarize the booting process.Ch. 3 - Why is the booting process necessary?Ch. 3 - If you have a PC, record the sequence activities...Ch. 3 - Suppose a multiprogramming operating system...Ch. 3 - Prob. 22CRPCh. 3 - Prob. 23CRPCh. 3 - Prob. 24CRPCh. 3 - Prob. 25CRPCh. 3 - Would greater throughput be achieved by a system...Ch. 3 - Prob. 27CRPCh. 3 - What information is contained in the state of a...Ch. 3 - Identify a situation in a multiprogramming system...Ch. 3 - List in chronological order the major events that...Ch. 3 - Prob. 31CRPCh. 3 - Prob. 32CRPCh. 3 - Explain an important use for the test-and-set...Ch. 3 - Prob. 34CRPCh. 3 - Prob. 35CRPCh. 3 - Prob. 36CRPCh. 3 - Prob. 37CRPCh. 3 - Each of two robot arms is programmed to lift...Ch. 3 - Prob. 39CRPCh. 3 - Prob. 40CRPCh. 3 - Prob. 41CRPCh. 3 - Prob. 42CRPCh. 3 - Prob. 43CRPCh. 3 - Prob. 44CRPCh. 3 - Prob. 45CRPCh. 3 - Prob. 46CRPCh. 3 - Prob. 47CRPCh. 3 - Prob. 48CRPCh. 3 - Prob. 49CRPCh. 3 - Prob. 50CRPCh. 3 - Prob. 51CRPCh. 3 - Prob. 52CRPCh. 3 - How is the window manager related to the operating...Ch. 3 - Prob. 54CRPCh. 3 - Prob. 55CRPCh. 3 - Suppose you are using a multiuser operating system...Ch. 3 - Prob. 2SICh. 3 - Prob. 3SICh. 3 - Prob. 4SICh. 3 - Prob. 5SI
Knowledge Booster
Similar questions
- According to the research conducted in the area of computer science, which method of scheduling processes has shown to be the most successful?arrow_forward: Consider a system that has two processes A and B, each wants to record a scanned document on CD. Process A requests permission to use the scanner and is granted permission. Process B is programmed differently and requests the CD recorder first & is also granted permission. Now A asked for the CD recorder but the request is denied until B releases it. Unfortunately, instead of releasing the CD recorder B asks for the scanner. Answer the following question for given above scenario; Draw the Resource Allocation Graph (RAG) & also determine that there is a deadlock that exists or not. Verify the four sufficient & necessary conditions with reasons. Which one is satisfied or not?arrow_forwardRead this Paragraph and answer the Given question: A A&A that runs a chain of hospitals in Karachi has decided to start a new computer program to manage patients, admit-in, and discharge of patients. Currently, A&A has software that can carry out these tasks for an individual hospital. This is problematic since, for example, if one hospital is full and receives a new patient request, the A&A tries to locate a suitable bed in another of its hospital; it is then necessary for hospital management to ring around the other hospitals. Similar problems arise if a patient wants to transfer to another hospital that has better facilities. A&A requires a new web application that should resolve the existing system problem by implementing a single, common patient admission and discharge system across the whole chain. Additionally, the A&A wishes to gain a competitive edge with a frequent-guest program to encourage repeat patient who readmits will be given discounts and other…arrow_forward
- Implement Round Robin scheduling algorithm in C programming. NOTE: Please do not compute and print the average waiting time and the average turnaround time. You are required to compute these for each process and print these times for each process separately. Add comments in the code so that the code is understandable. Take input from the user: the number of processes, the time quantum and their CPU burst times for n number of processes. Compute and print the completion Time(CT), Turnaround Time(TAT), and Waiting Time(WT) for each process using C Programming. Assuming all the processes have arrived at time 0, please do not take arrival times as input from the user.arrow_forwardPlease Implement in C programming Language Given the list of processes, their CPU burst times, arrival times, and priorities implement the Priority 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_forwardPlease 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_forward
- sleep() is a system call? What are the steps that occur from the time when a call to sleep() is made by a process up to the time that it returns?arrow_forwardLet the processes P1, P2, P3, and P4 be given. They arrive in the system at the same time in this order. The processes have the following service times (in time units): Process Service time (CPU burst) P1 53 P2 17 P3 68 P4 24 2) For the scheduling method "Round Robin" (RR), specify the average execution time (average turnaround time) and the number of context switches. The time quantum q is set to 20 time units. You must show your calculations. You will not have to draw Gantt charts. Note: For RR, processes execute in order of their ID (i.e., P1-P2-P3- P4).arrow_forwardComputer sciencearrow_forward
- On a real computer system, neither the resources available nor the demands of processes forresources are consistent over long periods (months). Resources break or are replaced, newprocesses come and go, new resources are bought and added to the system. If deadlock iscontrolled by the banker's algorithm, which of the following changes can be made safely(without introducing the possibility of deadlock), and under what circumstances?a) Increase Available (new resources added).b) Decrease, Available (resource permanently removed from system).c) Increase Max for one process (the process needs more resources than allowed; it maywant more).d) Decrease Max for one process (the process decides it does not need that manyresources).e) Increase the number of processes.arrow_forwardQ3: Suppose there is a processing unit composed by CPU and I/O component. For a specific task, CPU takes 5 second to finish the execution and I/O takes 2 second to process. The communication time between CPU and I/O can be elimiate under this circumstance. Execution Time 7 second 5second 2 second CPU time I/O time If CPU time decreases by 25% per year for 3 years and I/O time decreases by 20% per year 1) How many times faster is this program after 3 years? 2) What percentage of new time is I/O? and what percentage of new time is CPU?arrow_forwardWhich method for scheduling processes has been validated as the gold standard in the area of computer science?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengagePrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning