The paper offers an interesting overview and classification of the software architectural styles. The authors argue that these styles are appropriate to certain classes of problems but not suitable for all of them. The designer should then employ careful discrimination when choosing a suitable architecture.
For the first classification, Pipe-and-Filter Systems and Dataflow networks, even though the ideas are very intuitive, except for Unix pipes and filters I found it hard to recall immediate applications of the styles to specific problems.
The second classification however, Cooperative Message-Passing Processes, offered a number of styles ranging from very common ones as Client-Server architecture to styles whose application is very specific to certain application domains (e.g. distributed systems, parallel computing, etc.)
Below I will elaborate a bit on “Token passing along edges in a graph” and its application in implementing mutual exclusion in distributed systems.
Distributed processes need to coordinate their activities. When multiple processes share a resource or a collection of resources, then distributed mutual exclusion is required to prevent interference and keep the access to resources consistent. Token-passing algorithms are being used to implement distributed mutual exclusion of a shared resource.
Depending on the way the control is transferred, two types of token passing algorithms can be distinguished:
1) Central server algorithms. This algorithm simply employs a server that grants permission to enter the critical section in the form of a permission token. In order to enter the critical section processes send a token request and wait for a token reply. If no other process has the token the server replies immediately with the token granting permission to the current process, otherwise the server queues the request. On exiting the critical section the process holding the token sends it back to the server.
2) Ring-based token algorithms. With this approach the control is passed from process to process without a server being involved. The processes are arranged in a logical ring and communication channels are available between a process and his immediate neighbor in the ring. The permission token is passed from process to process in a single direction, around the ring. Processes that do not want to enter the critical section simply pass the token along. However, if a process requires access to the critical section, it retains the token. Upon exiting the critical section the process sends the token to his neighbor.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment