Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 27.1, Problem 5E
Program Plan Intro
The following are the measurements of multithreaded
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The issue has the property if it can be solved by creating optimum subproblem solutions. overlapping subproblems, optimal substructure, memory, greedy
Apply the (1) FIFO, (2) LRU, and (3) optimal (OPT) replacement algorithms for the following page-reference strings. • 5, 8, 3, 7, 5, 9, 2, 1, 2, 5, 0, 3, 7, 1, 2, 4, 2, 9, 6, 2 • 8, 5, 3, 1, 4, 2, 7, 0, 1, 8, 6, 2, 5, 3, 8, 9, 7, 1, 2, 4
Solve on a page!
Apply the (1) FIFO, (2) LRU, and (3) optimal (OPT) replacement algorithms for the following page-reference strings:
4,2,1,7,9,8,3,5,2,6,8,1,0,7,2,4,1,3,5,8
0,1,2,3,4,4,3,2,1,0,0,1,2,3,4,4,3,2,1,0
Indicate the number of page faults for each algorithm assuming demand paging with three frames.
Chapter 27 Solutions
Introduction to Algorithms
Ch. 27.1 - Prob. 1ECh. 27.1 - Prob. 2ECh. 27.1 - Prob. 3ECh. 27.1 - Prob. 4ECh. 27.1 - Prob. 5ECh. 27.1 - Prob. 6ECh. 27.1 - Prob. 7ECh. 27.1 - Prob. 8ECh. 27.1 - Prob. 9ECh. 27.2 - Prob. 1E
Ch. 27.2 - Prob. 2ECh. 27.2 - Prob. 3ECh. 27.2 - Prob. 4ECh. 27.2 - Prob. 5ECh. 27.2 - Prob. 6ECh. 27.3 - Prob. 1ECh. 27.3 - Prob. 2ECh. 27.3 - Prob. 3ECh. 27.3 - Prob. 4ECh. 27.3 - Prob. 5ECh. 27.3 - Prob. 6ECh. 27 - Prob. 1PCh. 27 - Prob. 2PCh. 27 - Prob. 3PCh. 27 - Prob. 4PCh. 27 - Prob. 5PCh. 27 - Prob. 6P
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
- Apply the (1) FIFO, (2) LRU, and (3) optimal (OPT) replacement algorithms for the following page-reference strings: 2, 6, 9, 2, 4, 2, 1, 7, 3, 0, 5, 2, 1, 2, 9, 5, 7, 3, 8, 5 0, 6, 3, 0, 2, 6, 3, 5, 2, 4, 1, 3, 0, 6, 1, 4, 2, 3, 5, 7 4, 1, 4, 2, 5, 4, 1, 3, 5, 2, 0, 1, 1, 0, 2, 3, 4, 5, 0, 1 3, 2, 1, 7, 9, 8, 3, 5, 2, 6, 8, 1, 0, 7, 2, 4, 1, 3, 5, 8 2, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 Indicate the number of page faults for each algorithm assuming demand paging with three frames, as shown in your textbook and in class. Show your workarrow_forwardA fast computer is used to break a ciphertext (A) using columnar transposition cipher that needs 150attempts, the speed of processor is 4 MIPS (million instructions per second), and each attempt needs5 instructions. Another computer of speed 3 MIPS is used to break ciphertext (B) using Caesar Cipherthat needs 110 attempts, and each attempt needs 4 instructions for ciphertext (B). Determine whichciphertext will be broken first (consider the worst case, i.e. the last attempt is the successful one),write your answer in details?arrow_forward(i) Describe Banker’s algorithm for deadlock avoidance with supporting example Consider a computer system with has four identical units of a resource R. There are three processes each with a maximum claim of two units of resource R. Processes can request these resources in anyway, that is, two in one shot or one by one. The system always satisfies a request a request for a resource if enough resources are available. If the process doesn’t request any other kind of resource, show that the system never deadlock Give a solution for the following synchronization problem using semaphores Producer- Consumer Problem Readers- Writers Problem List out the issues in preprocessor scheduling that causes performance degradation in multiprocessor systemsarrow_forward
- A 2-dimensional Turing machine has an infinite 2-dimensional grid asits storage device (one cell for every address (i, j) ∈Z×Z). Instead ofL and R, there are 5 options for the head to move from (i, j): Left (to(i −1, j), Right (to (i + 1, j)), Up (to (i, j + 1)), Down (to (i, j −1)),and Stay (remain at (i, j)) .Let us assume, that our 2-dimensional TM M has an additional 1-dimensional tape where the input is located as in a 1-tape TM. The2-dimensional storage device contains a blank symbol in every cell atthe start of the computation.Show that a 2-dimensional TM is not more powerful, i.e., every lan-guage accepted by a 2-dimensional TM M is accepted by one of ourstandard 1-dimensional TMs. You don’t have to simulate directly witha 1-tape TM, as you are allowed to use what we know about k-tape(1-dimensional) TMs without proof.Describe the moves of a simulating TM M ′ in plain English. For everypossible move of M , you have to design a sequence of moves of M ′that simulates that move of…arrow_forwardConsider the LCS problem discussed in class. Suppose we only want to compute the length of the LCS of x[1..m] and y[1..n] (i.e. we do not care about the actual subsequence itself). This means we do not need to “traceback” to find the LCS. In this setting, show how the algorithm can be altered so that it only needs min(m,n) + O(1) space rather than m · n space (note that it must be min(m,n) and not O(min(m, n))).arrow_forwardDetermine whether there is a feasible schedule for the following set of periodic processes. If yes, show the schedule and the steps used to derive it. T1: c1,1 = 2, c1,2 = 3, c1,3= 3, d1 = p1 = 21 T2: c2,1 = 1, c2,2 = 2, d2 = 6, p2 = 7 T3: c3 = 4, d3 = p3 = 21 T1 must rendezvous with T2 after the first, second, and third scheduling blocks.T2 must rendezvous with T1 after the first scheduling block. please type the answers (that is it for the question all other assume 0 dont ask for more)arrow_forward
- Implement this algorithm in C program . Show the gantt chart as output. Round-robin (RR) is one of the algorithms employed by process and network schedulers in computing. As the term is generally used, time slices (also known as time quanta) are assigned to each process in equal portions and in circular order, handling all processes without priority (also known as cyclic executive).arrow_forwardConsider the following computation problem in two variables Plus: Input -14 <= x <= 28, x ∈ Z; -10 <= y <= 32, y∈ Z Output the integer x+y-7 and the following partition of the input domains: Ax = {[-14,-1], [0,10], [11,18]} for the variable x Ay = {[-10,12], [13, 32]} for the variable y Consider the following test suite: S: Test case x y Expected result T1 -5 5 -7 T2 5 5 3 T3 15 15 23 Say what holds for S: Consider the following computation problem in two variables Plus: Input -14 <= x <= 28, x ∈ Z; -10 <= y <= 32, y∈ Z Output the integer x+y-7 and the following partition of the input domains: Ax = {[-14,-1], [0,10], [11,18]} for the variable x Ay = {[-10,12], [13, 32]} for the variable y Consider the following test suite: S: Test case x y Expected result T1 -5 5 -7 T2 5 5 3 T3 15 15 23 Say what holds for S: a) It has more test…arrow_forwardIf it is possible to solve the problem by first solving its subproblems, the issue has the provided attribute. overlapping subproblems, optimal substructure, memory, and greed.arrow_forward
- Write pseudo code for it & what conditions) what else should change in Semigroup computation on a PRAM algorithm? to avoid the final broadcasting phase which essentially doubles the execution time of the semigroup computation algorithm in the EREW PRAM, it has been suggested that we replace the indices j + s in the algorithm with j + s mod p (i.e., allow the computations to wrap around). And under what conditions would this method yield correct results in all processors? (Write pseudo code for it)arrow_forwardApply the (1) FIFO, (2) LRU, and (3) optimal (OPT) replacement algorithms for the following page-reference strings:2, 6, 9, 2, 4, 2, 1, 7, 3, 0, 5, 2, 1, 2, 9, 5, 7, 3, 8, 5arrow_forwardThe use of information flow measurements may be utilized to inhibit the spread of viruses and other malware. Given that Anne has a VA of 4, Bill has a VB of 2, and Cathy has a VC of 3, we may calculate the following: Anne develops a virus-infected software called P. Cathy performs P, which causes Q to be written to. Is Bill able to perform Q (assumedly in order to generate R)? Who has the authority to carry out Q? Who has the authority to execute R?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole