Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
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
• 3, 1, 4, 2, 5, 4, 1, 3, 5, 2, 0, 1, 1, 0, 2, 3, 4, 5, 0, 1
• 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
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps
Knowledge Booster
Similar questions
- The off-line minimum problem maintains a dynamic set T of elements from the domain {1, 2,...,n}under the operations INSERT and EXTRACT-MIN. A sequence S of n INSERT and m EXTRACT-MIN calls are given, where each key in {1, 2,...,n} is inserted exactly once. Let a sequence S berepresented by I1 , E, I2, E, ... , E, Im+1 , where each Ij stands for a subsequence (possibly empty) ofINSERT and each E stands for a single EXTRACT-MIN. Let Kj be the set of keys initially obtainedfrom insertions in Ij. The algorithm to build an array extracted[1..m], where for i = 1, 2, ..., m,extracted[i] is the key returned by the ith EXTRACT-MIN call is given below: Off-Line-Minimum(m, n)for i = 1 to n determine j such that i ∈ ?? if j ≠ m + 1 extracted[j] = i let L be the smallest value greater than j for which KL exists KL = KL U Kj, destroying ????return extracted (1) Given the operation sequence 9, 4, E, 6, 2, E, E, 5, 8, E, 1, 7, E, E, 3; where eachnumber stands for its…arrow_forwardThe off-line minimum problem maintains a dynamic set T of elements from the domain {1, 2,...,n}under the operations INSERT and EXTRACT-MIN. A sequence S of n INSERT and m EXTRACT-MIN calls are given, where each key in {1, 2,...,n} is inserted exactly once. Let a sequence S berepresented by I1 , E, I2, E, ... , E, Im+1 , where each Ij stands for a subsequence (possibly empty) ofINSERT and each E stands for a single EXTRACT-MIN. Let Kj be the set of keys initially obtainedfrom insertions in Ij. The algorithm to build an array extracted[1..m], where for i = 1, 2, ..., m,extracted[i] is the key returned by the ith EXTRACT-MIN call is given below: Off-Line-Minimum(m, n)for i = 1 to n determine j such that i ∈ Kj if j ≠ m + 1 extracted[j] = i let L be the smallest value greater than j for which KL exists KL = KL U Kj, destoying Kjreturn extracted Given the operation sequence 9, 4, E, 6, 2, E, E, 5, 8, E, 1, 7, E, E, 3; where eachnumber stands for its insertion.…arrow_forwardPerform Dijkstra's algorithm on the graph below to find the minimum-weight paths from the source vertex a to all other vertices. Fill out the table shown below. Set S contains vertices in the order of vertices removed from the min priority queue Q. Finally, reconstruct the path from vertex a to vertex e and give the total cost of the path. Consider alphabetic order for EXTRACT-MIN (Q) with same weight. D P 3 3 8 Path from a to e: Cost: 5 4 b (V) 4 Vertex Previous (л[V]) Cost from source (d[v]) e S d[v]arrow_forward
- Perform Dijkstra’s algorithm (while (Q is not empty){...}, where Q isa min priority queue) on the following graph for source node “s”, writing outevery execution of the RELAX function, the update to the priority queue and theupdates of distance from the source node and parent for the currently visited node.arrow_forwardConsider the following adjacency-lists representation of a digraph with 8 vertices and 13 edges: A: E F В: FA С: ВFG D: C G E: F F: G G: H H: Here is a graphical representation of the same digraph: (A) (F) (G) Run breadth-first search (using the adjacency-lists representation), starting from vertex A. Give the sequence in which the vertices are dequeued from the FIFO queue. Answer Your answer should be a sequence of uppercase letters, starting with A and separated by whitespace.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, 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_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
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 Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
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
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY