代写代考 FIT3143 Tutorial Week 7

FIT3143 Tutorial Week 7
Lecturers: ABM Russel (MU Australia) and (MU Malaysia)
SYNCHRONISATION
OBJECTIVES

Copyright By PowCoder代写 加微信 powcoder

• The purpose of this tutorial is to introduce the concept of Synchronisation, Mutex, Deadlock
• Understand the concept of Averaging algorithm
• Understand the concept of Chandy-Misra-Haas algorithm
• Describe Berkeley’s synchronization algorithm and compare it with Cristian’s algorithm.
Note: Tutorials are not assessed. Nevertheless, please attempt the questions to improve your unit comprehension in preparation for the labs, assignments, and final assessments.
1. Discuss the difference between logical clock and real clock synchronization.
A sensible discussion that includes points around, synchronisation, causation and ordering. The clocks that agree among certain computers but not necessarily with the real clock are logical clocks. Clocks that agree on time and within a certain time limit, are physical clocks.
2. Outline when and why you might need to use a centralised or distributed MUTEX algorithm.
When multiple processes need to access shared resources in a distributed environment. MUTEX ensures there are no collisions between processes for a given resource.
3. Discuss Averaging algorithm
“Averaging algorithm” is a decentralized algorithm. This algorithm divides time into resynchronization intervals with a fixed length R. Every machine broadcasts the current time at the beginning of each interval according to its clock. A machine

collects all other broadcasts for a certain interval and sets the local clock by the average of their arrival times.
4. Discuss the relationship between the Chandy-Misra-Haas algorithm and the wait for graph in the context of deadlock identification.
CMH essentially passes a message along the “wait-for-graph.” If a dead-lock exists, that is, if a cycle exists in the wait-for-graph then the message will return to whence it started.
5. Describe Berkeley’s algorithm by write its pseudo-code. Compare this algorithm with Cristian’s algorithm.
Solution from: https://www.quora.com/How-do-I-implement-a-Berkeley-clock- synchronization-algorithm-in-C++

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com