
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

Transcribed Image Text:4.
Lucy Zhu
4 min
Edit
Suppose that the underlying communication system guarantees FIFO ordering of
messages. How will you exploit this feature to reduce the communication complexity of the
vector clock algorithm? Give an expression for overhead savings if your scheme is used instead
of the traditional vector clock algorithm. Assume that any process can send at most m messages.
(Hint: You should use only O(n) storage at each process.)
ge
Expert Solution

arrow_forward
Step 1
- To make the communication difficulty of vector clock method less complicated, we may take use of the FIFO ordering for messages.
Consider a system having n processes, each of which is capable of sending a maximum of m messages. The sequence of events at every process may be tracked using a conventional vector clock technique. However, we can also use a scheme where each process only stores the vector clock of the last message it received. This scheme has the advantage that it only requires O(n) storage at each process, instead of O(nm) storage for the traditional vector clock algorithm. - The overhead savings for this scheme can be expressed as follows.
Traditional vector clock algorithm: O(nm)
Reduced vector clock algorithm: O(n)
Overhead savings: O(nm - n) = O(n(m-1))
Thus, we can save O(n(m-1)) in storage overhead by using the reduced vector clock algorithm.
Explanation:
- One way to exploit the FIFO ordering of messages is to use a timestamp-based vector clock algorithm. A timestamp variable of length n, where n is the total number of processes, is maintained by each process in this approach. Process's most recent communication is reflected there in timestamp vector by its own time stamp. A process's timestamp vector is included in every message it sends. A process compares its timestamp vector in such a message with its personal timestamp vector to update its very own timestamp vector when it gets one. When a timestamp vector in a message is later than that of the process's internal timestamp vector, the program adjusts its very own timestamp vector to match the timestamp vector there in message. This algorithm has the advantage of being very simple to implement, and it requires only O(n) storage at each process.
- The disadvantage of this algorithm is that it is not very efficient. In particular, it requires O(n) time to update the timestamp vector at each process, and it requires O(n) space to store the timestamp vector at each process.
A more efficient way to exploit the FIFO ordering of messages is to use a log-based vector clock algorithm. The quantity of processes there in system determines the amount of the log kept by each process in this method. The log documents the last time any given process communicated with the system. Every time a process transmits a message, it also logs the message's transmission in its own history. - Each process keeps its own log and, when receiving a message, compares the log there in message to its own log to make any necessary adjustments. The process will update its very own log to match the log there in message if the message's log is more recent. The efficiency of this approach is improved over the timestamp-based vector clocks algorithm. In particular, updating the log at every process takes just O(1) time, while storing the log takes only O(n) space.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- "Dijkstra's single-source shortest path algorithm returns a results grid that contains the lengths of the shortest paths from a given vertex [the source vertex] to the other vertices reachable from it. Develop a pseudocode algorithm that uses the results grid to build and return the actual [shortest] path, as a list of vertices, from the source vertex to a given [target] vertex. (Hint: This algorithm starts with a given vertex [the target vertex] in the grid's first column and gathers ancestor [parent] vertices, until the source vertex is reached.)" *For your algorithm, assume that grid is the name of the results grid produced by Dijkstra's single-source shortest path algorithm. *Each vertex is identified by its label/name, which is in column 1 of grid. *As the first step of your algorithm, find the name of the source vertex. *Next, get the name of the target vertex from the user. Pseudocode should avoid details through broad-stroke statements. However, it must give enough information…arrow_forwardWrite the generic steps that you will undertake to compute the product of two numbers with 4 digits using Strassen’s algorithm. The 4 digit numbers are A0A1A2A3 and B0B1B2B3. Then compute using Strassen algorithm the product of 27 and 19.arrow_forwardDraw the function ? = 1⁄(1 + ?2) on 2 dimensions X and Z by dividing the -2π to 2π range of x from steps of 0.1 with color blue and dash-dotted line. Imagine that the drawn line of z is a ‘thread’ which if we can copy it multiple times and those copies are kept in parallel to the first one over the direction of a 3rd axis we will generate a surface representing the same curve. a. Use meshgrid function on the x vector and save the result on xx. b. Using size function find the size of xx. c. How does dimensions of xx relate to dimensions of x? d. Using the knowledge of vector multiplication in Octave and using in-built generating functions and size functions, for a given vector v write a single argument function to generate its ‘meshgrid version’ and return it in the variable rep. Avoid using loops! Name your function replicate. (Note: Check if the result is identical to the meshgrid function’s output. Cross check with a small vector) ChatGPTarrow_forward
- Please explain What is the worse-case performance of quicksort? Select the correct answer with the correct justification. Group of answer choices a. O(n*n), because during the partitioning stage it is possible that we select a 'bad' random pivot point that only sorts one item at a time. If we continuously do this over and over again, we are effectively only sorting 1 item each time. We then need to perform this pivot step n more times to sort the remaining n-1 items, thus giving us an O(n*n) complexity. b. O(n*n), because quicksort is a comparison-based sorting algorithm in which we have to compare every possible element against every other element in order to swap each element into the correct position. c. O(n*log(n)), because each time we are selecting a pivot point, on the average-case we are able to split our problem into roughly two collections, and sort half of our elements at the pivot point.arrow_forwardUsing Java Modify the program 1 in guided activity 3 to compute the multiplication of two vectors with the sizes 1xn and nx1. The result is a number (one element matrix) computed as the sum of the products of the corresponding elements from the first vector with the ones from the second vector: m1[0][0]m2[0][0]+m1[0][1]*m2[1][0]+...+m1[0][n-1]m2[n-1][0arrow_forwardquestion- Implement Floyd's algorithm for the Shortest Path on your system, and study its performance using different graphs. Side note- Below I have attached Floyd's Algorithm for Shortest Paths. please use java language for coding java file - should start with your Last Name, Like SmithClubApp, PetrowskiTravelLogApp, for your class short paragraph should include- -description of the java file -what it does? -what is the input data? expected output, samples of botharrow_forward
- Consider the following variation on MergeSort: instead of dividing a list (say, of integers) evenly (that is, half and half or half and half plus 1) at all levels of recursion, we choose to divide a list this way - a left list that consists of exactly one integer and a right list that consists of the remaining integers. The time-complexity of this variation of MergeSort is: (a) O(n log n) (b) O(n²) (c) O(n) (d) none of the abovearrow_forwardPLEASE USE PYTHONGiven a jungle matrix NxM:jungle = [ [1, 0, 0, 0], [1, 1, 0, 1], [0, 1, 0, 0], [1, 1, 1, 1,]]Where 0 means the block is dead end and 1 means the block can be used in the path fromsource to destination.Task:Starting at position (0, 0), the goal is to reach position (N-1, M-1).Your program needs to build and output the solution matrix – a 4x4 matrix with 1’s inpositions used to get from the starting position (0,0) to the ending position (N-1,M-1)with the following constraints:You can only move one space at a timeYou can only in two directions: forward and down.You can only pass thru spaces on the jungle matrix marked ‘1’If you cannot reach the ending position – print a message that you’re trapped in thejungleAlgorithm:If destination is reachedprint the solution matrixElseMark current cell in the solution matrixMove forward horizontally and recursively check if this leads to a solution If there is no solution, move down and recursively check if this leads to a solution If…arrow_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