The Wayback Machine - https://web.archive.org/web/20240913180502/https://www.geeksforgeeks.org/difference-between-token-based-and-non-token-based-algorithms-in-distributed-system/
Open In App

Difference between Token based and Non-Token based Algorithms in Distributed System

Last Updated : 21 Jun, 2022
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

A distributed system is a system in which components are situated in distinct places, these distinct places refer to networked computers which can easily communicate and coordinate their tasks by just exchanging asynchronous messages with each other. These components can communicate with each other to conquer one common goal as a task. There are many algorithms are used to achieve Mutual Exclusion ,where there are multiple processes(or sites) requesting access for a single shared resource(often called as Critical Section)  ,and these are broadly divided into 2 categories: Token-Based Algorithms and Non-Token Based Algorithms. Difference between Token based and Non-Token based Algorithms in Distributed System:

S.No. Token Based Algorithms Non-Token Based Algorithms
1. In the Token-based algorithm, a unique token is shared among all the sites in Distributed Computing Systems. In Non-Token based algorithm, there is no token even not any concept of sharing token for access.
2. Here, a site is allowed to enter the Critical Section if it possesses the token. Here, two or more successive rounds of messages are exchanged between sites to determine which site is to enter the Critical Section next.
3. The token-based algorithm uses the sequences to order the request for the Critical Section and to resolve the conflict for the simultaneous requests for the System. Non-Token based algorithm uses the timestamp (another concept) to order the request for the Critical Section and to resolve the conflict for the simultaneous requests for the System.
4. The token-based algorithm produces less message traffic as compared to Non-Token based Algorithm. Non-Token based Algorithm produces more message traffic as compared to the Token-based Algorithm.
5. They are free from deadlock (i.e. here there are no two or more processes are in the queue in order to wait for messages that will actually can’t come) because of the existence of unique token in the distributed system. They are not free from the deadlock problem as they are based on timestamp only.
6. Here, it is ensured that requests are executed exactly in the order as they are made in. Here there is no surety of execution order.
7. Token-based algorithms are more scalable as they can free your server from storing session state and also they contain all the necessary information which they need for authentication. Non-Token based algorithms are less scalable than the Token-based algorithms because server is not free from its tasks.
8. Here the access control is quite Fine-grained because here inside the token roles, permissions and resources can be easily specifying for the user. Here the access control is not so fine as there is no token which can specify roles, permission, and resources for the user.
9. Token-based algorithms make authentication quite easy. Non-Token based algorithms can’t make authentication easy.
10.

Examples of Token-Based Algorithms are:

(i) Singhal’s Heuristic Algorithm
(ii) Raymonds Tree Based Algorithm
(iii) Suzuki-Kasami Algorithm    

Examples of Non-Token Based Algorithms are:

(i) Lamport’s Algorithm
(ii) Ricart-Agarwala Algorithm
(iii) Maekawa’s Algorithm 

Previous Article
Next Article

Similar Reads

Operating System - Difference Between Distributed System and Parallel System
A distributed system is a model where distributed applications are running on multiple computers linked by a communications network. Sometimes it is also called loosely coupled systems because in which each processor has its own local memory and processing units. LOCUS and MICROS are some examples of distributed operating systems. Parallel Systems
4 min read
Difference between a Distributed Lock Manager and a Distributed Database
In today’s world, managing data and resources efficiently across multiple locations is crucial. Distributed Lock Managers and Distributed Databases are foundational in achieving this. They serve different yet complementary roles in distributed systems. While a distributed lock manager coordinates access to shared resources, a distributed database h
5 min read
Distributed System - Thrashing in Distributed Shared Memory
In this article, we are going to understand Thrashing in a distributed system. But before that let us understand what a distributed system is and why thrashing occurs. In naive terms, a distributed system is a network of computers or devices which are at different places and linked together. Each one of these distributed computers shares the same s
4 min read
Distributed System - Types of Distributed Deadlock
A Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource occupied by some other process. When this situation arises, it is known as Deadlock. A Distributed System is a Network of Machines that can exchange information with each other through Message-passing. It can be
4 min read
Distributed Information Systems in Distributed System
Distributed systems consist of multiple independent computers working together as a unified system. These systems offer enhanced scalability, reliability, and fault tolerance. They ensure efficient resource utilization and performance by distributing tasks across various nodes. One crucial aspect is managing and sharing data effectively, which is t
9 min read
Distributed Ledger Technology(DLT) in Distributed System
Distributed Ledger Technology (DLT) is a way to record and share data across multiple computers, ensuring that all copies of the data are synchronized and secure. Unlike traditional databases controlled by a single entity, DLT allows for decentralized data storage and management. This makes it harder for data to be tampered with and increases trans
11 min read
Distributed System Algorithms
Distributed systems are the backbone of modern computing, but what keeps them running smoothly? It's all about the algorithms. These algorithms are like the secret sauce, making sure everything works together seamlessly. In this article, we'll break down distributed system algorithms in simple language. Important Topics for Distributed System Algor
9 min read
Consensus Algorithms in Distributed System
Consensus Algorithms in Distributed Systems explain how multiple computers in a distributed network agree on a single data value or decision. It introduces consensus algorithms, which ensure that all computers, even if some fail or act maliciously, can agree on the same result. Important Topics to Understand Consensus Algorithms in Distributed Syst
12 min read
Difference Between Load Balancing and Load Sharing in Distributed System
A distributed system is a computing environment in which different components are dispersed among several computers (or other computing devices) connected to a network. These devices broke up the work and coordinated their efforts to do the job faster than if it had been assigned to a single device. Load Balancing:Load balancing is the practice of
2 min read
Difference Between Load Balancing and Load Sharing in Distributed System
A distributed system is a computing environment in which different components are dispersed among several computers (or other computing devices) connected to a network. This article clarifies the distinctions between load balancing and load sharing in distributed systems, highlighting their respective roles in optimizing resource allocation and tas
4 min read
Component-Based Architecture vs. Distributed System
When it comes to software engineering, the terms ‘Component-Based Architecture’ and ‘Distributed System', in one way or another, crop up to refer to two different approaches for building out complex applications. Comparing the key concepts and approaches, as well as learning about the distinctive features of each architectural style, is imperative
5 min read
Distributed Consensus in Distributed Systems
In distributed systems, achieving consensus among nodes is critical for maintaining coherence and reliability. This article explores the principles, algorithms, challenges, and applications of distributed consensus, which are essential for ensuring agreement across decentralized networks. Important Topics for Distributed Consensus in Distributed Sy
11 min read
Distributed Task Queue - Distributed Systems
A Distributed Task Queue is a system used in distributed computing to manage and coordinate tasks across multiple machines or servers. Instead of one machine handling all tasks, a distributed task queue spreads out the work, making the process faster and more efficient. Each task is placed in a queue, and available workers pick up and complete task
11 min read
Distributed System vs. Clustered System
When discussing scalability and reliability as well as performance in the context of computing, terms such as distributed systems and clustered systems are unavoidably mentioned. Even though they have a few common characteristics, they are two different ideas with different architectures and usage. It is important to understand the distinctions bet
5 min read
What is Scalable System in Distributed System?
In distributed systems, a scalable system refers to the ability of a networked architecture to handle increasing amounts of work or expand to accommodate growth without compromising performance or reliability. Scalability ensures that as demand grows—whether in terms of user load, data volume, or transaction rate—the system can efficiently adapt by
10 min read
Google File System(GFS) vs. Hadoop Distributed File System (HDFS)
In distributed file systems, Google File System (GFS) and Hadoop Distributed File System (HDFS) stand out as crucial technologies. Both are designed to handle large-scale data, but they cater to different needs and environments. In this article, we will understand the differences between them. Table of Content What is Google File System (GFS)? Key
6 min read
Handling Communication Disruptions Between Services in a Distributed System
Distributed systems power many critical applications. They depend on seamless communication between services to function smoothly. However, communication disruptions can occur, causing significant issues. These disruptions can stem from network failures or service malfunctions. Detecting and handling such disruptions is crucial for maintaining syst
10 min read
Difference between Resource and Communication Deadlocks in Distributed Systems
A deadlock occurs when a set of processes requests resources that are already occupied by other processes in the group. Because each process possesses a resource and waits for another resource held by another process, the execution of two or more processes is blocked. Four requirements must be met for a deadlock to occur : Mutual Exclusion -At leas
5 min read
Difference Between Computer Networks and Distributed Systems
A computer network is a group of interconnected computers that share resources and data. Distributed systems, while similar, consist of autonomous computers working together to perform tasks. These systems form the backbone of modern digital communication and processing. Yet, they serve different purposes and operate under different principles. In
5 min read
What is the Difference Between Masking and Tolerating Failures in Distributed Systems?
In distributed systems, dealing with failures is a critical aspect of design and implementation. Since these systems consist of multiple interconnected components, the likelihood of failures increases. Two primary approaches to handling these failures are masking and tolerating them. This article explores the differences between these approaches, t
4 min read
Scheduling and Load Balancing in Distributed System
In this article, we will go through the concept of scheduling and load balancing in distributed systems in detail. Scheduling in Distributed Systems:The techniques that are used for scheduling the processes in distributed systems are as follows: Task Assignment Approach: In the Task Assignment Approach, the user-submitted process is composed of mul
7 min read
Wave and Traversal Algorithm in Distributed System
As we know a distributed system is a collection where different processes in order to perform a task communicate with each other. In wave algorithm exchange of messages and decision take place, which depends on the number of messages in each event of a process. As it is important to traverse in a connected network Wave algorithm has applications in
10 min read
Analysis of Monolithic and Distributed Systems - Learn System Design
System analysis is the process of gathering the requirements of the system prior to the designing system in order to study the design of our system better so as to decompose the components to work efficiently so that they interact better which is very crucial for our systems. System design is a systematic process involving phases such as planning,
10 min read
How to Combine Sharding and Consistent Hashing within a Distributed System?
Managing large volumes of data efficiently is crucial for businesses. Distributed systems often rely on techniques like sharding and consistent hashing to achieve this. Sharding splits databases into manageable pieces, while consistent hashing distributes these pieces across a network. Combining these methods can enhance system performance and scal
8 min read
Distributed System Fault Tolerance Using Message Logging and Checkpointing
In distributed computing, ensuring system reliability and resilience in the face of failures is very important. Fault tolerance mechanisms like message logging and checkpointing play a crucial role in maintaining the consistency and availability of distributed systems. This article makes you understand the intricacies of combining message logging a
11 min read
WFG-Based Distributed Algorithm For Deadlock Detection
In distributed computing systems, deadlocks can occur when multiple processes are unable to proceed due to circular dependencies in resource allocation. Detecting and resolving deadlocks is crucial to maintain system integrity and prevent disruptions in critical operations. The WFG-based (Wait-for-Graph-based) distributed algorithm for deadlock det
4 min read
Cluster-Based Distributed File Systems
Cluster-based distributed file systems are designed to overcome the limitations of traditional single-node storage systems by leveraging the collective power of multiple nodes in a cluster. This architecture not only enhances storage capacity and processing power but also ensures high availability and resilience, making it an ideal solution for mod
11 min read
Distributed Coordination-Based Systems
Distributed Coordination-Based Systems in Distributed Systems explores how different parts of a computer network work together to achieve common goals. It explains the methods and tools used to coordinate tasks and share information across multiple computers, making the system efficient and reliable. By focusing on distributed coordination, the art
8 min read
Maekawa’s Algorithm for Mutual Exclusion in Distributed System
Prerequisite - Mutual exclusion in distributed systems Maekawa's Algorithm is quorum based approach to ensure mutual exclusion in distributed systems. As we know, In permission based algorithms like Lamport's Algorithm, Ricart-Agrawala Algorithm etc. a site request permission from every other site but in quorum based approach, A site does not reque
4 min read
Ricart–Agrawala Algorithm in Mutual Exclusion in Distributed System
Prerequisite: Mutual exclusion in distributed systems Ricart–Agrawala algorithm is an algorithm for mutual exclusion in a distributed system proposed by Glenn Ricart and Ashok Agrawala. This algorithm is an extension and optimization of Lamport's Distributed Mutual Exclusion Algorithm. Like Lamport's Algorithm, it also follows permission-based appr
3 min read
Article Tags :