International Journal of Computer Engineering and Applications, Volume XII, Issue I, Jan. 18, ISSN

Size: px
Start display at page:

Download "International Journal of Computer Engineering and Applications, Volume XII, Issue I, Jan. 18, ISSN"

Transcription

1 A PRIORITY AND REQUEST BASED MUTUAL EXCLUSION ALGORITHM FOR DISTRIBUTED SYSTEM Soumik Guha Roy 1, Sowvik Dey 2, Joy Samadder 3 1, 2, 3 Assistant Professor, Department of Computer Science & Engineering Brainware University Kolkata, India ABSTRACT: This paper aims towards designing a new token based mutual exclusion algorithm for distributed systems that addresses both fairness and priority of each process. One major limitation of the token based mutual exclusion algorithm in the distributed environment like Raymond's well known work is the absence of fairness property. In the proposed algorithm both priority as well as number of token request sent by a process are taken into consideration. Keywords: Distributed System, Mutual Exclusion, Critical Section, Priority [1] INTRODUCTION In order to secure integrity of the shared resources, concurrent access to a shared resources by several uncoordinated user requests are serialized. The problem of mutual exclusion frequently arises in distributed systems whenever concurrent access to shared resources by several site is involved. For correctness, it is necessary that the shared resource be accessed by a single site (process) at a time. Mutual exclusion is a fundamental issue in the design of distributed systems and an efficient and robust technique for mutual exclusion is essential to the viable design of distributed systems. In single computer-computer systems, the status of a shared resource and the status of the users is readily available in the shared memory, and the solutions to the mutual exclusion problem can be Soumik Guha Roy, Sowvik Dey and Joy Samadder 319

2 A PRIORITY AND REQUEST BASED MUTUAL EXCLUSION ALGORITHM FOR DISTRIBUTED SYSTEM easily implemented using shared variables (e.g. semaphores). However, in distributed systems, both the shared resources and the users may be distributed and shared memory does not exists. Consequently, approaches based on shared variables are not applicable to distributed systems and approaches based on message passing must be used. Solutions to the mutual exclusion problem in distributed systems tend to differ in their communication topology and in the amount of information maintained by each site about other sites. These algorithms can be classified into two groups-token based and non-token based algorithms. All the algorithms described in [1, 2, 3, 4, 5] are token based algorithms. In tokenbased algorithms, a unique token is shared among all sites. The site which holds the token is allowed to enter its critical section. Non token based algorithms [6, 7, 8, 9, 10] need two or more rounds of message exchanges among the nodes. Apart from Token and non-token based algorithm, there is also Hybrid based algorithm [11, 12, 13, 14]. Best of both token and non-token based algorithms are combined to form hybrid approach. In this paper, we have proposed a new token based prioritized algorithm which avoids starvation by taking care of both priority and critical section entry request. [2] OVERVIEW OF THE PROPOSED ALGORITHM We assume that the system contains N nodes which are uniquely numbered from 1 to N. Each node is assigned a priority. In the proposed algorithm, we have assumed that highest number indicates highest priority. At any point of time, each node can have any number of token requests. Nodes do not need to keep information about all other nodes. Each node has to keep information about the outgoing and incoming links. Each node Ni holds a token request holder queue (RQN i) and a variable RC i which contains total number of token holding request received by the node N i and a variable named HIGHPRIO i which holds the largest priority of a token request. Request queue (RQN i): Each node N i maintains a queue to store all the requests. Each tuple of the request queue has the following form: <N j, P j, RC j> where N j is address of the Node N j, P j is priority of the node N j and RC j is the total request message sent via N j. In general, the content of the RQN i is {...,<N i, P i, RC i>, <N j, P j, RC j>, <N k, P k, RCk>,...} where N i, N j, N k are the address of the nodes which want to enter its critical section and P i, P j, P k are the largest priorities of token requests that came from the nodes N i, N j, N k respectively and RC i, RC j, RC k are the request counter send by the nodes N i, N j, N k. Types of Nodes: All the nodes can be partitioned into two sets: Token Holder Node set and Non Token Holder set. Types of messages: Non token holder nodes can sent three different types of messages. They are New Token Request Message, High Priority Request and Request Counter Increase Message. New Token Request Message: This message is sent by a node N j which wants to access the critical section. This message is sent by node N j only for one time. This message contains <N j, P j, 1> High Priority Request Message: This message is send by Node Ni whose request queue is not empty and got a New Token Request message from node N j and priority of node N j is highest among all the nodes currently in the Request Queue of N i. Request Counter Message: This message is sent by the node N i whose request queue is not empty and got a New Token Request from a Node N j which already exists in the Token Request Holder Queue RQ of N i. This message contains <N i, RC> [3] THE PROPOSED ALGORITHM Soumik Guha Roy, Sowvik Dey and Joy Samadder 320

3 There are 5 major procedures as described from section 3.1 to 3.5 which describes the proposed token based mutual exclusion algorithm in distributed systems. Table.1. shows various events and actions which are used in phase 1 and phase 2 in tabular format. Table. 1. Various events and actions EVENT NAME DESCRIPTION ACTION DESCRIPTION Critical Section(CS) P i wants to enter CS Send Token Request message to P j P i want to enter CS. So P i sends a Token request message to P j Token Request message from P j P i receives a token request message from P j Send Request Counter Increase message to P j P i receives a message and its Request counter increases. So P i sends this message to node P j Request Count Increment message from P j HIGHPRIO &Token Increment message from P j P i receives a Request Counter Increment message from P j P i receives a Priority and token counter increment message from P j Send HIGHPRIO and Token Increment message to P j P i receives a message and increases both high priority and request counter. So P i sends this message to node P j [3.1] TOKEN REQUEST MESSAGE GENERATION BY NON TOKEN HOLDER SITE WHICH WANTS TO ENTER CRITICAL SECTION When a node N i (non-token holder site) wants to enter its critical section then the following sets are being executed. Step 1: if ( RQN i=null) then set RQN i=<n i, P i, 1>, RC i=1, HIGHPRIO i=p i Step 2: if (RQN i!=null) then node N i does not want to enter its critical section but other child nodes of node N i want to enter critical section. Other conditions will not occur. [3.2] TOKEN REQUEST MESSAGE RECEIVE [3.2.1] TOKEN REQUEST MESSAGE RECEIVED BY NON TOKEN HOLDER SITE When a node N i (non-token holder site) receives a token holding request from a node N j, then the following steps are being executed Step 1: if (RQN i=null) then Set Request Counter Variable for node N i to 1. and Set RQN i= (N j, P j, RC) and sent a token request message to the holder node. Step 2: if ((N j RQN i) and (RQN i!=null)) then increment RCi by one and update Request Queue of the node N i, RQNi=RQNi (N j, P j, RC j). Step 3: For all nodes N l RQN i and N j is parent of N l, if P l * RC l < P j * RC j then increment priority of node N l P l by one. Find the highest priority from RQN i and update HIGHPRIO i with the new high priority in the Request Queue of RQN i. Send the modified priority token request message <P i, HIGHPRIO i, RC i > to the holder node. Step 4: if ((N j RQN j) and (RQN i!= NULL) ) then increment RC i and RC j by one. Now send a token request counter message <N j, RC i> to holder. [3.2.2] TOKEN REQUEST MESSAGE RECEIVED BY TOKEN HOLDER SITE Soumik Guha Roy, Sowvik Dey and Joy Samadder 321

4 A PRIORITY AND REQUEST BASED MUTUAL EXCLUSION ALGORITHM FOR DISTRIBUTED SYSTEM When a node Ni (non-token holder site) receives a token holding request from a node N j, then the following steps are being executed Step 1: if (RQN i = NULL) then Set Request Counter Variable for node N i to 1. and Set RQN i=(n j, P j, RC) and sent a token request message to the holder node. Step 2: if ((Nj RQN i) and (RQN i!=null)) then increment RC i by one and update Request Queue of the node N i, RQNi=RQNi (N j, P j, RC j) Step 3: Now for all nodes N l RQN i and N j is parent of N l, if P l * RC l < P j * RC j then increment priority of node N l, P l by one. Now find the highest priority from RQN i and update HIGHPRIO i with the new high priority in the Request Queue of RQN i. Now send the modified priority token request message <P i, HIGHPRIO i, RC i> to the holder node. Step 4: if ( ( Nj RQN i ) and (RQN i!= NULL) ) then increment RC i and RC j by one. Now send a token request counter message <N j, RC i> to holder. [3.2.3] TOKEN REQUEST MESSAGE RECEIVED BY TOKEN HOLDER SITE When a token holder site N i receives a Token Request Message and N i has not finished its execution in critical section, it takes the following actions: Step 1: if (RQN i=null) then Set Request Counter Variable for node N i to 1. and Set RQN i=(n j, P j, RC j) Step 2: if ((N j RQN i) and (RQN i! =NULL)) then increment RC i by one and update Request Queue of the node Ni, RQNi=RQNi (N j, P j, RC j). Now for all nodes N l, N l RQN i, if P l * RC l < P j * RC j then increment P l by one. Now find the highest priority from RQN i and update HIGHPRIO i with the new high priority in the Request Queue of RQN i. [3.3] PRIVILEGE MESSAGE GENERATED BY THE TOKEN HOLDER SITE When a token holder site N i finishes its execution in critical section, it takes the following actions to generate the Privilege message: Step 1: Send a Privilege message to node N k such that N l RQN i N k RQN i and N k! =N l and P l*rc l< P k*rc k /* Send Privilege message to a node N k such that for all nodes N l in the Request Queue of the node N i if there exists another node N k in Request Queue of N i and P l*rc l< P k*rc k */ Step 2: Then node N i delete its entry from its Request Queue and set holder variable to point N k. Step 3: If RQN i! =NULL then send a Token Request Message <N i, HIGHPRIO i, RC i>to the node N k. [3.4] PRIVILEGE MESSAGE RECEIVED BY THE NON TOKEN HOLDER SITE WHICH WANTS TO ENTER CRITICAL SECTION When a non-token holder site N i receives a Privilege message, it takes the following actions: Step 1: if N i RQN i then delete the entry N i from RQN i. Step 2: Decrease RC i by 1. Step 3: Now N i will enter its critical section. [3.5] PRIVILEGE MESSAGE RECEIVED BY THE NON TOKEN HOLDER SITE WHICH DOES NOT WANT TO ENTER ITS CRITICAL SECTION Soumik Guha Roy, Sowvik Dey and Joy Samadder 322

5 When a non-token holder site N i which does not want to enter critical section receives a Privilege message, it takes the following actions: Step 1: Send a Privilege message to node N k which is children of N i, such that N l RQN i N k RQN i and N k! =N l and P l*rc l< P k*rc k /* Send Privilege message to a node N k such that for all nodes N l in the Request Queue of the node Ni if there exists another node N k in Request Queue of Ni and P l*rc l < P k*rc k */ Step 2: Set the holder variable to point N k. Step 3: if RQN i! = NULL then send a Token Request Message <N i, HIGHPRIO i, RC i> to the node N k. Step 4: Update the RC i by (RC i RC k) [4] ILLUSTRATING THE PROPOSED ALGORITHM We have taken 8 processes with the priority values has been listed in [Figure-1]. We assume that highest number in the priority values indicates highest priority. Process P8 is currently in its critical section and token requests are made by other processes in the distributed system in the order P1, P3, P2, P4, P5, P7. Figure: 1. A directed tree with eight nodes along with its priority list. According to the proposed algorithm the token request message (P1, 2, 1) generated by node P1 is stored in the request queue RQN1 and also stored in the request queue RQN8 of node P8. Then the token request message (P3, 1, 1) generated by Node P3 is stored into the request queue RQN3 and RQN8 of node P3 and P8 respectively. Then node P2 generated the token request message (P2, 2, 1) which is stored into RQN2 and sent to the node P3.Now the content of RQN3 is (P3, 1, 1) (P2, 2, 1). As the newly arrived token request message satisfies the property P2*RC2 > P3*RC3, the priority in the token request message (P3, 1, 1) in RQN3 is incremented and the content of RQN3 becomes (P3, 2, 1) (P2, 2, 1). Now P4 generates token request message and RQN4 becomes (P4, 1, 1). The token request message is sent to node P3 and the RQN3 becomes (P2, 2, 1) (P3, 2, 1) (P4, 1, 1). Now the request counter value RC3 increased to 3. According to the proposed algorithm, Node P3 send a Request Counter increment message <P3, 3> to node P8. Now the content of RQN8 becomes (P1, 3, 1) (P3, 2, 2) (P3, 3). The RQN8 becomes (P1, 3, 1) (P3, 2, 3). According to the proposed algorithm RQN8 becomes (P3, 2, 3) (P1, 4, 1).Now P5 generates a token request message (P5, 2, 1) to node P2. The request queue RQN2 of node P2 becomes (P2, 2, 1) (P5, 2, 1). The request counter value RC2 changed to 2.Hence the node P2 sends a request counter increment message (P2, 2) to node P3.The Request Queue RQN3 becomes (P2, 2, 1) (P3, 2, 1) (P4, 1, 1) (P2, 2). After receiving the request increment message, RQN3 becomes (P2, 2, 2) (P3, 2, 1) (P4, 1, 1). According to the proposed algorithm, RQN3 becomes (P2, 2, 2) (P3, 3, 1) (P4, 2, 1). Now both the priority and request counter increment of node P8 value becomes 3 and 4 respectively. According to the proposed algorithm node P3 send Priority and Request counter increment message (P3, 3, 4) to node P8. Now RQN8 becomes (P3, 2, 3) (P1, 4, 1) <P3, 3, 4>. Hence the RQN8 has been modified to (P3, 3, 4) (P1, 4, 1). According to the proposed algorithm, RQN8 becomes (P3, 3, 4) (P1, 5, 1). Now node P7 sends a token Soumik Guha Roy, Sowvik Dey and Joy Samadder 323

6 A PRIORITY AND REQUEST BASED MUTUAL EXCLUSION ALGORITHM FOR DISTRIBUTED SYSTEM request message (P7, 1, 1) to node P5 and the RQN5 becomes (P5, 2, 1) (P7, 1, 1). According to the proposed algorithm the priority values of the entry (P5, 2, 1) will not increase. Now the request counter variable of the node P5 has been incremented and request counter message (P5, 2) has been sent to the node P2 and the RQN2 becomes (P2, 2, 1) (P5, 2, 1) (P5, 2). Now according to the proposed algorithm RQN2 becomes (P2, 2, 1) (P5, 2, 2). Now as PR5*RC5>PR2*RC1, the priority value in the entry (P2, 2, 1) becomes (P2, 3, 1). Now RQN2 becomes (P2, 3, 1) (P5, 2, 2). Request counter at node P2 updated to 3. So P2 sends request increment message (P5, 2) to node P2 and RQN2 becomes (P2, 2, 1) (P5, 2, 1) (P5, 2). RQN2 updated to (P2, 2, 1) (P5, 2, 2). Priority entry of the entry (P2, 2, 1) changed to (P2, 3, 1) and RQN2 becomes (P2, 3, 1) (P5, 2, 2). Node P2 sends a request increment message (P2, 3) to node P3 and RQN3 becomes (P2, 2, 2) (P3, 3, 1) (P4, 2, 1) (P2, 3). After that RQN3 becomes (P2, 2, 3) (P3, 3, 1) (P4, 2, 1). Finally RQN3 is modified to (P2, 2, 3) (P3, 4, 1) (P4, 3, 1). As a result, both the priority and request counter message of the node P3 has been increased by one and Priority and request counter increase message (P3, 4, 5) is sent to P8.The request queue RQN8 becomes (P3, 3, 4) (P1, 5, 1) <P3, 4, 5>. After receiving the priority and request counter increase message by P8, RQN8 becomes (P3, 4, 5) (P1, 5, 1). According to the proposed algorithm, priority entry of the entry (P1, 5, 1) has been changed to (P1, 6, 1). Finally RQN8 becomes (P3, 4, 5) (P1, 6, 1). From the RQN8 we can conclude that P8 has received token request messages from node P3 and P1 and P3 has sent total 5 token request message and according to the proposed algorithm the priority of node P1 and P3 has been increased to 6 and 4 respectively. The [Figure-2] illustrates the first phase of proposed algorithm. Figure: 2. A tabular illustration of the first phase of proposed algorithm. Assume that P8 has finished its execution in the critical section. Now the Privilege message transmission phase begins from node P8.Request Queue of P8 holds (P3, 4, 5) (P1, 6, 1) and children of P8 is P1 and P3.Now according to the proposed algorithm P3*RC3>P1*RC1. Hence,P8 sends the Privilege Message (P8, 6, 1) to node P3 and holder node of P8 is P3.Then the request counter of P8 reduces to 1.When the privileged message is received by the node P3, the content of the request queue becomes (P2, 2, 3) (P3, 4, 1) (P4, 3, 1) (P8, 6, 1). Now according to the proposed algorithm, largest priority node is P2 as P2*RC2>P3*RC3 and holder node of P3 is P2. After sending the privileged message (P3, 4, 2) the request counter of P2 reduces to 2. After receiving the privileged message, the content of request queue of P2 becomes (P5, 2, 2) (P2, 3, 1) (P3, 4, 2). The privileged message (P5, 4, 1) will be send to the node P5 as according to the proposed algorithm P5*RC5 > P6*RC6 and holder node of P2 now becomes P5. When P5 receives the privileged message the request queue becomes (P5, 2, 1) (P7, 1, 1). Now P5 is the node which has the highest weighted priority according to this proposed algorithm. So P5 now enters its critical section after setting holder node of P5 to self. The [Figure-3] illustrates the last phase of proposed algorithm and the final result is shown in [Figure-4]. Soumik Guha Roy, Sowvik Dey and Joy Samadder 324

7 . Figure: 3. A tabular illustration of the last phase of proposed algorithm. Figure: 4. Final result of the proposed method. [4] PERFORMANCE ANALYSIS FOR THE PROPOSED ALGORITHM The performance of the proposed algorithm is measured by the following four metrics: the number of message per critical section invocation, synchronization delay, response time and the system throughput. [4.1] NUMBER OF MESSAGES PER CRITICAL SECTION INVOCATION All the messages which are exchanged between nodes to send critical section entry request, are divided into three parts: Token Request Message, High Priority Message and Request Counter Increment message. In order to estimate total number of messages needed to send critical section entry request, we need to take consideration of all three different messages. When a leaf node process wants to enter critical section, it will send only one Token request message to its parent and the parent node will sent either request counter increment message or high priority message to its parent. So total number of messages sent by a token requesting node will be bounded by (One Token request Message + m Request Counter Increment message + n High Priority Message) where m+n<= h (h is the height of the directed tree). [4.2] SYNCHRONIZATION DELAY The time needed after a site leaves the critical section and another site enters critical section is called the Synchronization Delay. The maximum Synchronization delay (d) is bounded by the height (h) of the directed tree i.e. d<=h. [4.3] RESPONSE TIME Soumik Guha Roy, Sowvik Dey and Joy Samadder 325

8 A PRIORITY AND REQUEST BASED MUTUAL EXCLUSION ALGORITHM FOR DISTRIBUTED SYSTEM The time interval between nodes sent Token request message and the node finishes its critical section execution is called the Response time (r). Now consider a directed tree which has maximum b branches. The response time (r) is related with the branching factor b and the height of the directed tree with the following inequality r<=kb h where k is constant. [4.4] SYSTEM THROUGHPUT If s is the synchronization delay and e is the average critical section execution time, then the throughput is given by the following equation: System throughput=1/(s + e). [5] CONCLUSION In this paper,we have proposed a mutual exclusion algorithm in distributed environment which uses priority of a process and as well as the number of token request received by that process to decide which process will enter critical section next. Hence starvation which may occur due to priority, can be avoided by using the request counter message information stored at each node. To achieve this, we have taken consideration of both priority and the number of token request message received by a process. We have taken consideration of three different types of control messages so that a process can indicate its parent that either it wishes to enter critical section or it has received a new token request or the highest priority of its queue has been increased. The size of the queue of each process P i has been increased monotonically towards the path from P i to the process which is currently in critical section. REFERENCES [1] Raymond, K. (1989). A tree-based algorithm for distributed mutual exclusion. ACM Transactions on Computer Systems (TOCS), 7(1), [2] Singhal, M. (1989). A heuristically-aided algorithm for mutual exclusion in distributed systems. IEEE transactions on computers, 38(5), [3] Suzuki, I., & Kasami, T. (1985). A distributed mutual exclusion algorithm. ACM Transactions on Computer Systems (TOCS), 3(4), [4] Van de Snepscheut, J. L. (1987). Fair mutual exclusion on a graph of processes. Distributed Computing, 2(2), [5] Kanrar, S., & Chaki, N. (2006, December). Modified Raymond s algorithm for priority (MRA-P) based mutual exclusion in distributed systems. In International Conference on Distributed Computing and Internet Technology (pp ). Springer, Berlin, Heidelberg. [6] Carvalho, O. S. (1983). An mutual exclusion in computer networks. Commun ACM, 26, [7] Lamport, L. (1978). Time, clocks and ordering of events in distributed systems. 21 (7): [8] Maekawa, M. (1985). An algorithm for mutual exclusion in decentralized systems. ACM Transactions on Computer Systems (TOCS), 3(2), [9] Yadav, N., Yadav, S., & Mandiratta, S. (2015). A review of various mutual exclusion algorithms in distributed environment. International Journal of Computer Applications, 129(14). [10] Ricart, G., & Agrawala, A. K. (1981). An optimal algorithm for mutual exclusion in computer networks. Communications of the ACM, 24(1), [11] Lodha, S., & Kshemkalyani, A. (2000). A fair distributed mutual exclusion algorithm. IEEE Transactions on Parallel and Distributed Systems, 11(6), Soumik Guha Roy, Sowvik Dey and Joy Samadder 326

9 [12] Kakugawa, H., Kamei, S., & Masuzawa, T. (2008). A token-based distributed group mutual exclusion algorithm with quorums. IEEE transactions on parallel and distributed systems, 19(9), [13] Taheri, H., Neamatollahi, P., & Naghibzadeh, M. (2011). A hybrid token-based distributed mutual exclusion algorithm using wraparound two-dimensional array logical topology. Information processing letters, 111(17), [14] Neamatollahi, P., Taheri, H., & Naghibzadeh, M. (2012). Info-based approach in distributed mutual exclusion algorithms. Journal of Parallel and Distributed Computing, 72(5), Soumik Guha Roy, Sowvik Dey and Joy Samadder 327

Distributed Mutual Exclusion

Distributed Mutual Exclusion Distributed Mutual Exclusion Mutual Exclusion Well-understood in shared memory systems Requirements: at most one process in critical section (safety) if more than one requesting process, someone enters

More information

A Dag-Based Algorithm for Distributed Mutual Exclusion. Kansas State University. Manhattan, Kansas maintains [18]. algorithms [11].

A Dag-Based Algorithm for Distributed Mutual Exclusion. Kansas State University. Manhattan, Kansas maintains [18]. algorithms [11]. A Dag-Based Algorithm for Distributed Mutual Exclusion Mitchell L. Neilsen Masaaki Mizuno Department of Computing and Information Sciences Kansas State University Manhattan, Kansas 66506 Abstract The paper

More information

A DAG-BASED ALGORITHM FOR DISTRIBUTED MUTUAL EXCLUSION ATHESIS MASTER OF SCIENCE

A DAG-BASED ALGORITHM FOR DISTRIBUTED MUTUAL EXCLUSION ATHESIS MASTER OF SCIENCE A DAG-BASED ALGORITHM FOR DISTRIBUTED MUTUAL EXCLUSION by Mitchell L. Neilsen ATHESIS submitted in partial fulfillment of the requirements for the degree MASTER OF SCIENCE Department of Computing and Information

More information

Distributed Mutual Exclusion Algorithms

Distributed Mutual Exclusion Algorithms Chapter 9 Distributed Mutual Exclusion Algorithms 9.1 Introduction Mutual exclusion is a fundamental problem in distributed computing systems. Mutual exclusion ensures that concurrent access of processes

More information

Several of these problems are motivated by trying to use solutiions used in `centralized computing to distributed computing

Several of these problems are motivated by trying to use solutiions used in `centralized computing to distributed computing Studying Different Problems from Distributed Computing Several of these problems are motivated by trying to use solutiions used in `centralized computing to distributed computing Problem statement: Mutual

More information

A Novel Approach to Allow Process into Critical Section with no delay-time

A Novel Approach to Allow Process into Critical Section with no delay-time A Novel Approach to Allow Process into Critical Section with no delay-time 1 Pradosh Chandra Pattnaik, 2 Md Shafakhatullah Khan, 3 Vsv Mallikharjuna Rao 1,2 Dept of IT & CA, Aurora s Engineering College,

More information

Coordination and Agreement

Coordination and Agreement Coordination and Agreement Nicola Dragoni Embedded Systems Engineering DTU Informatics 1. Introduction 2. Distributed Mutual Exclusion 3. Elections 4. Multicast Communication 5. Consensus and related problems

More information

Distributed Systems. coordination Johan Montelius ID2201. Distributed Systems ID2201

Distributed Systems. coordination Johan Montelius ID2201. Distributed Systems ID2201 Distributed Systems ID2201 coordination Johan Montelius 1 Coordination Coordinating several threads in one node is a problem, coordination in a network is of course worse: failure of nodes and networks

More information

Coordination 1. To do. Mutual exclusion Election algorithms Next time: Global state. q q q

Coordination 1. To do. Mutual exclusion Election algorithms Next time: Global state. q q q Coordination 1 To do q q q Mutual exclusion Election algorithms Next time: Global state Coordination and agreement in US Congress 1798-2015 Process coordination How can processes coordinate their action?

More information

A Two-Layer Hybrid Algorithm for Achieving Mutual Exclusion in Distributed Systems

A Two-Layer Hybrid Algorithm for Achieving Mutual Exclusion in Distributed Systems A Two-Layer Hybrid Algorithm for Achieving Mutual Exclusion in Distributed Systems QUAZI EHSANUL KABIR MAMUN *, MORTUZA ALI *, SALAHUDDIN MOHAMMAD MASUM, MOHAMMAD ABDUR RAHIM MUSTAFA * Dept. of CSE, Bangladesh

More information

A Synchronization Algorithm for Distributed Systems

A Synchronization Algorithm for Distributed Systems A Synchronization Algorithm for Distributed Systems Tai-Kuo Woo Department of Computer Science Jacksonville University Jacksonville, FL 32211 Kenneth Block Department of Computer and Information Science

More information

A Distributed Algorithm for Power Management in Mobile Ad-Hoc Networks

A Distributed Algorithm for Power Management in Mobile Ad-Hoc Networks Jurnal UMP Social Sciences and Technology Management Vol. 3, Issue. 1, 2015 A Distributed Algorithm for Power Management in Mobile Ad-Hoc Networks Bita Amirshahi, Assistant Professor, Department of Software

More information

An Efficient Distributed Mutual Exclusion Algorithm Based on Relative Consensus Voting

An Efficient Distributed Mutual Exclusion Algorithm Based on Relative Consensus Voting An Efficient Distributed Mutual Exclusion Algorithm Based on Relative Consensus Voting Jiannong Cao Hong Kong Polytechnic University Kowloon, Hong Kong csjcao@comp.polyu.edu.hk Jingyang Zhou Nanjing University

More information

A Delay-Optimal Group Mutual Exclusion Algorithm for a Tree Network

A Delay-Optimal Group Mutual Exclusion Algorithm for a Tree Network JOURNAL OF INFORMATION SCIENCE AND ENGINEERING 24, 573-583 (2008) Short Paper A Delay-Optimal Group Mutual Exclusion Algorithm for a Tree Network VINAY MADENUR AND NEERAJ MITTAL + Internet Services Qualcomm,

More information

A Token Based Distributed Mutual Exclusion Algorithm based on Quorum Agreements

A Token Based Distributed Mutual Exclusion Algorithm based on Quorum Agreements A Token Based Distributed Mutual Exclusion Algorithm based on Quorum Agreements hlasaaki Mizuno* Mitchell L. Neilsen Raghavra Rao Department of Computing and Information Sciences Kansas State University

More information

CSE 486/586 Distributed Systems

CSE 486/586 Distributed Systems CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo CSE 486/586 Recap: Consensus On a synchronous system There s an algorithm that works. On

More information

Ye-In Chang. National Sun Yat-Sen University. Kaohsiung, Taiwan. Republic of China. Abstract

Ye-In Chang. National Sun Yat-Sen University. Kaohsiung, Taiwan. Republic of China. Abstract A Simulation Study on Distributed Mutual Exclusion 1 Ye-In Chang Dept. of Applied Mathematics National Sun Yat-Sen University Kaohsiung, Taiwan Republic of China fe-mail: changyi@math.nsysu.edu.twg ftel:

More information

An Efficient Approach of Election Algorithm in Distributed Systems

An Efficient Approach of Election Algorithm in Distributed Systems An Efficient Approach of Election Algorithm in Distributed Systems SANDIPAN BASU Post graduate Department of Computer Science, St. Xavier s College, 30 Park Street (30 Mother Teresa Sarani), Kolkata 700016,

More information

A Dynamic Resource Synchronizer Mutual Exclusion Algorithm for Wired/Wireless Distributed Systems

A Dynamic Resource Synchronizer Mutual Exclusion Algorithm for Wired/Wireless Distributed Systems American Journal of Applied Sciences (7): 89-8, 008 IN 6-99 008 Science Publications A Dynamic Resource Synchronizer utual Exclusion Algorithm for Wired/Wireless Distributed Systems Ahmed Sharieh, ariam

More information

A Dynamic Distributed Algorithm for Read Write Locks

A Dynamic Distributed Algorithm for Read Write Locks A Dynamic Distributed Algorithm for Read Write Locks Soumeya Leila Hernane 1,2,3 Jens Gustedt 3 Mohamed Benyettou 1 1 University of Science and Technology of Oran USTO, Algeria 2 Lorraine University, France

More information

Event Ordering Silberschatz, Galvin and Gagne. Operating System Concepts

Event Ordering Silberschatz, Galvin and Gagne. Operating System Concepts Event Ordering Happened-before relation (denoted by ) If A and B are events in the same process, and A was executed before B, then A B If A is the event of sending a message by one process and B is the

More information

Chapter 16: Distributed Synchronization

Chapter 16: Distributed Synchronization Chapter 16: Distributed Synchronization Chapter 16 Distributed Synchronization Event Ordering Mutual Exclusion Atomicity Concurrency Control Deadlock Handling Election Algorithms Reaching Agreement 18.2

More information

Chapter 18: Distributed

Chapter 18: Distributed Chapter 18: Distributed Synchronization, Silberschatz, Galvin and Gagne 2009 Chapter 18: Distributed Synchronization Event Ordering Mutual Exclusion Atomicity Concurrency Control Deadlock Handling Election

More information

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Shrideep Pallickara Computer Science Colorado State University L23.1 Frequently asked questions from the previous class survey

More information

Chapter 1. Introd uction. Mutual exclusion is one of the first problems met in parallel processmg. The

Chapter 1. Introd uction. Mutual exclusion is one of the first problems met in parallel processmg. The 8 Chapter 1 Introd uction 1.1 Problem Description Mutual exclusion is one of the first problems met in parallel processmg. The implementation of a Mutual Exclusion mechanism is a major task facing every

More information

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey Yes. But what really is a second? 1 second ==time for a cesium 133 atom

More information

Distributed Systems (5DV147)

Distributed Systems (5DV147) Distributed Systems (5DV147) Mutual Exclusion and Elections Fall 2013 1 Processes often need to coordinate their actions Which rocess gets to access a shared resource? Has the master crashed? Elect a new

More information

Distributed Coordination! Distr. Systems: Fundamental Characteristics!

Distributed Coordination! Distr. Systems: Fundamental Characteristics! Distributed Coordination! What makes a system distributed?! Time in a distributed system! How do we determine the global state of a distributed system?! Event ordering! Mutual exclusion! Reading: Silberschatz,

More information

CPU THREAD PRIORITIZATION USING A DYNAMIC QUANTUM TIME ROUND-ROBIN ALGORITHM

CPU THREAD PRIORITIZATION USING A DYNAMIC QUANTUM TIME ROUND-ROBIN ALGORITHM CPU THREAD PRIORITIZATION USING A DYNAMIC QUANTUM TIME ROUND-ROBIN ALGORITHM Maysoon A. Mohammed 1, 2, Mazlina Abdul Majid 1, Balsam A. Mustafa 1 and Rana Fareed Ghani 3 1 Faculty of Computer System &

More information

Remaining Contemplation Questions

Remaining Contemplation Questions Process Synchronisation Remaining Contemplation Questions 1. The first known correct software solution to the critical-section problem for two processes was developed by Dekker. The two processes, P0 and

More information

殷亚凤. Synchronization. Distributed Systems [6]

殷亚凤. Synchronization. Distributed Systems [6] Synchronization Distributed Systems [6] 殷亚凤 Email: yafeng@nju.edu.cn Homepage: http://cs.nju.edu.cn/yafeng/ Room 301, Building of Computer Science and Technology Review Protocols Remote Procedure Call

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK II SEMESTER CP7204 Advanced Operating Systems Regulation 2013 Academic Year

More information

PROCESS SYNCHRONIZATION

PROCESS SYNCHRONIZATION DISTRIBUTED COMPUTER SYSTEMS PROCESS SYNCHRONIZATION Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Process Synchronization Mutual Exclusion Algorithms Permission Based Centralized

More information

Mutual Exclusion in DS

Mutual Exclusion in DS Mutual Exclusion in DS Event Ordering Mutual Exclusion Election Algorithms Reaching Agreement Event Ordering Happened-before relation (denoted by ). If A and B are events in the same process, and A was

More information

Time and Coordination in Distributed Systems. Operating Systems

Time and Coordination in Distributed Systems. Operating Systems Time and Coordination in Distributed Systems Oerating Systems Clock Synchronization Physical clocks drift, therefore need for clock synchronization algorithms Many algorithms deend uon clock synchronization

More information

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to:

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to: F2007/Unit5/1 UNIT 5 OBJECTIVES General Objectives: To understand the process management in operating system Specific Objectives: At the end of the unit you should be able to: define program, process and

More information

Using Maekawa s Algorithm to Perform Distributed Mutual Exclusion in Quorums

Using Maekawa s Algorithm to Perform Distributed Mutual Exclusion in Quorums Advances in Computing 2012, 2(4): 54-59 DOI: 10.5923/j.ac.20120204.02 Using Maekawa s Algorithm to Perform Distributed Mutual Exclusion in Quorums Ousmane Thiare 1,*, Papa Alioune Fall 2 1 Department of

More information

Reducing synchronization cost in distributed multi-resource allocation problem

Reducing synchronization cost in distributed multi-resource allocation problem Reducing synchronization cost in distributed multi-resource allocation problem Jonathan Lejeune Ecole des Mines de Nantes EMN-Inria, LINA Nantes, France Email:jonathan.lejeune@mines-nantes.fr Luciana Arantes,

More information

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006 Operating Systems Comprehensive Exam Spring 2006 Student ID # 3/16/2006 You must complete all of part I (60%) You must complete two of the three sections in part II (20% each) In Part I, circle or select

More information

Frequently asked questions from the previous class survey

Frequently asked questions from the previous class survey CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED COORDINATION/MUTUAL EXCLUSION] Shrideep Pallickara Computer Science Colorado State University L22.1 Frequently asked questions from the previous

More information

A Dynamic Token-Based Distributed Mutual Exclusion Algorithm

A Dynamic Token-Based Distributed Mutual Exclusion Algorithm A Dynamic Token-Based Distributed Mutual Exclusion Algorithm Ye-n Chang, Mukesh Singhal, and Ming T. Liu Dept. of Computer and nformation Science The Ohio State University Columbus, OH 43210-1277, USA

More information

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University Frequently asked questions from the previous class survey CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED COORDINATION/MUTUAL EXCLUSION] Shrideep Pallickara Computer Science Colorado State University

More information

The Prioritized and Distributed Synchronization in Distributed Groups

The Prioritized and Distributed Synchronization in Distributed Groups The Prioritized and Distributed Synchronization in Distributed Groups Michel Trehel and hmed Housni Université de Franche Comté, 16, route de Gray 25000 Besançon France, {trehel, housni} @lifc.univ-fcomte.fr

More information

Lock Based Distributed Data Structures

Lock Based Distributed Data Structures The Interdisciplinary Center, Herzlia Efi Arazi School of Computer Science Lock Based Distributed Data Structures M.Sc dissertation Submitted by Yuval Lubowich Under the supervision of Prof. Gadi Taubenfeld

More information

What is the Race Condition? And what is its solution? What is a critical section? And what is the critical section problem?

What is the Race Condition? And what is its solution? What is a critical section? And what is the critical section problem? What is the Race Condition? And what is its solution? Race Condition: Where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular

More information

CSE 5306 Distributed Systems. Synchronization

CSE 5306 Distributed Systems. Synchronization CSE 5306 Distributed Systems Synchronization 1 Synchronization An important issue in distributed system is how processes cooperate and synchronize with one another Cooperation is partially supported by

More information

SAMPLE MIDTERM QUESTIONS

SAMPLE MIDTERM QUESTIONS SAMPLE MIDTERM QUESTIONS CS 143A Notes: 1. These questions are just for you to have some questions to practice. 2. There is no guarantee that there will be any similarities between these questions and

More information

Mutual Exclusion. A Centralized Algorithm

Mutual Exclusion. A Centralized Algorithm Mutual Exclusion Processes in a distributed system may need to simultaneously access the same resource Mutual exclusion is required to prevent interference and ensure consistency We will study three algorithms

More information

ENGR 3950U / CSCI 3020U UOIT, Fall 2012 Quiz on Process Synchronization SOLUTIONS

ENGR 3950U / CSCI 3020U UOIT, Fall 2012 Quiz on Process Synchronization SOLUTIONS Name: Student Number: SOLUTIONS ENGR 3950U / CSCI 3020U (Operating Systems) Quiz on Process Synchronization November 13, 2012, Duration: 40 Minutes (10 questions and 8 pages, 45 Marks) Instructor: Dr.

More information

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008. CSC 4103 - Operating Systems Spring 2008 Lecture - XII Midterm Review Tevfik Ko!ar Louisiana State University March 4 th, 2008 1 I/O Structure After I/O starts, control returns to user program only upon

More information

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali Self Stabilization CS553 Distributed Algorithms Prof. Ajay Kshemkalyani by Islam Ismailov & Mohamed M. Ali Introduction There is a possibility for a distributed system to go into an illegitimate state,

More information

Homework #2 Nathan Balon CIS 578 October 31, 2004

Homework #2 Nathan Balon CIS 578 October 31, 2004 Homework #2 Nathan Balon CIS 578 October 31, 2004 1 Answer the following questions about the snapshot algorithm: A) What is it used for? It used for capturing the global state of a distributed system.

More information

Volume 2, Issue 4, April 2014 International Journal of Advance Research in Computer Science and Management Studies

Volume 2, Issue 4, April 2014 International Journal of Advance Research in Computer Science and Management Studies Volume 2, Issue 4, April 2014 International Journal of Advance Research in Computer Science and Management Studies Research Article / Paper / Case Study Available online at: www.ijarcsms.com Efficient

More information

11/7/2018. Event Ordering. Module 18: Distributed Coordination. Distributed Mutual Exclusion (DME) Implementation of. DME: Centralized Approach

11/7/2018. Event Ordering. Module 18: Distributed Coordination. Distributed Mutual Exclusion (DME) Implementation of. DME: Centralized Approach Module 18: Distributed Coordination Event Ordering Event Ordering Mutual Exclusion Atomicity Concurrency Control Deadlock Handling Election Algorithms Reaching Agreement Happened-before relation (denoted

More information

Concurrency: Mutual Exclusion and Synchronization

Concurrency: Mutual Exclusion and Synchronization Concurrency: Mutual Exclusion and Synchronization 1 Needs of Processes Allocation of processor time Allocation and sharing resources Communication among processes Synchronization of multiple processes

More information

CS3733: Operating Systems

CS3733: Operating Systems CS3733: Operating Systems Topics: Process (CPU) Scheduling (SGG 5.1-5.3, 6.7 and web notes) Instructor: Dr. Dakai Zhu 1 Updates and Q&A Homework-02: late submission allowed until Friday!! Submit on Blackboard

More information

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling Review Preview Mutual Exclusion Solutions with Busy Waiting Test and Set Lock Priority Inversion problem with busy waiting Mutual Exclusion with Sleep and Wakeup The Producer-Consumer Problem Race Condition

More information

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5 OPERATING SYSTEMS CS3502 Spring 2018 Processor Scheduling Chapter 5 Goals of Processor Scheduling Scheduling is the sharing of the CPU among the processes in the ready queue The critical activities are:

More information

WEEK 5 - APPLICATION OF PETRI NETS. 4.4 Producers-consumers problem with priority

WEEK 5 - APPLICATION OF PETRI NETS. 4.4 Producers-consumers problem with priority 4.4 Producers-consumers problem with priority The net shown in Fig. 27 represents a producers-consumers system with priority, i.e., consumer A has priority over consumer B in the sense that A can consume

More information

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web:     Ph: Serial :. T_CS_A_Operating System_ Delhi Noida Bhopal yderabad Jaipur Lucknow Indore une Bhubaneswar Kolkata atna Web: E-mail: info@madeeasy.in h: - CLASS TEST - COMUTER SCIENCE & IT Subject : Operating

More information

QUESTIONS Distributed Computing Systems. Prof. Ananthanarayana V.S. Dept. Of Information Technology N.I.T.K., Surathkal

QUESTIONS Distributed Computing Systems. Prof. Ananthanarayana V.S. Dept. Of Information Technology N.I.T.K., Surathkal QUESTIONS Distributed Computing Systems Prof. Ananthanarayana V.S. Dept. Of Information Technology N.I.T.K., Surathkal Questions Fundamentals 1. Discuss five fundamental issues in distributed system 2.

More information

Distributed Systems - I

Distributed Systems - I CSE 421/521 - Operating Systems Fall 2011 Lecture - XXIII Distributed Systems - I Tevfik Koşar University at Buffalo November 22 nd, 2011 1 Motivation Distributed system is collection of loosely coupled

More information

Local Coteries and a Distributed Resource Allocation Algorithm

Local Coteries and a Distributed Resource Allocation Algorithm Vol. 37 No. 8 Transactions of Information Processing Society of Japan Aug. 1996 Regular Paper Local Coteries and a Distributed Resource Allocation Algorithm Hirotsugu Kakugawa and Masafumi Yamashita In

More information

An Improved Priority Dynamic Quantum Time Round-Robin Scheduling Algorithm

An Improved Priority Dynamic Quantum Time Round-Robin Scheduling Algorithm An Improved Priority Dynamic Quantum Time Round-Robin Scheduling Algorithm Nirali A. Patel PG Student, Information Technology, L.D. College Of Engineering,Ahmedabad,India ABSTRACT In real-time embedded

More information

(MCQZ-CS604 Operating Systems)

(MCQZ-CS604 Operating Systems) command to resume the execution of a suspended job in the foreground fg (Page 68) bg jobs kill commands in Linux is used to copy file is cp (Page 30) mv mkdir The process id returned to the child process

More information

Two hours. Question ONE is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 25th January 2013 Time: 14:00-16:00

Two hours. Question ONE is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 25th January 2013 Time: 14:00-16:00 Two hours Question ONE is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Operating Systems Date: Friday 25th January 2013 Time: 14:00-16:00 Please answer Question ONE and any TWO other

More information

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):

More information

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date: Subject Name: OPERATING SYSTEMS Subject Code: 10EC65 Prepared By: Kala H S and Remya R Department: ECE Date: Unit 7 SCHEDULING TOPICS TO BE COVERED Preliminaries Non-preemptive scheduling policies Preemptive

More information

Chapter 9 Uniprocessor Scheduling

Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 9 Uniprocessor Scheduling Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Aim of Scheduling Assign

More information

Clock Synchronization. Synchronization. Clock Synchronization Algorithms. Physical Clock Synchronization. Tanenbaum Chapter 6 plus additional papers

Clock Synchronization. Synchronization. Clock Synchronization Algorithms. Physical Clock Synchronization. Tanenbaum Chapter 6 plus additional papers Clock Synchronization Synchronization Tanenbaum Chapter 6 plus additional papers Fig 6-1. In a distributed system, each machine has its own clock. When this is the case, an event that occurred after another

More information

Chapter 5 Concurrency: Mutual Exclusion and Synchronization

Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles Chapter 5 Concurrency: Mutual Exclusion and Synchronization Seventh Edition By William Stallings Designing correct routines for controlling concurrent

More information

wait with priority An enhanced version of the wait operation accepts an optional priority argument:

wait with priority An enhanced version of the wait operation accepts an optional priority argument: wait with priority An enhanced version of the wait operation accepts an optional priority argument: syntax: .wait the smaller the value of the parameter, the highest the priority

More information

Process Synchroniztion Mutual Exclusion & Election Algorithms

Process Synchroniztion Mutual Exclusion & Election Algorithms Process Synchroniztion Mutual Exclusion & Election Algorithms Paul Krzyzanowski Rutgers University November 2, 2017 1 Introduction Process synchronization is the set of techniques that are used to coordinate

More information

Deadlock Managing Process in P2P System

Deadlock Managing Process in P2P System Deadlock Managing Process in P2P System Akshaya A.Bhosale Department of Information Technology Gharda Institute Of Technology,Lavel, Chiplun,Maharashtra, India Ashwini B.Shinde Department of Information

More information

16 Greedy Algorithms

16 Greedy Algorithms 16 Greedy Algorithms Optimization algorithms typically go through a sequence of steps, with a set of choices at each For many optimization problems, using dynamic programming to determine the best choices

More information

Silberschatz and Galvin Chapter 18

Silberschatz and Galvin Chapter 18 Silberschatz and Galvin Chapter 18 Distributed Coordination CPSC 410--Richard Furuta 4/21/99 1 Distributed Coordination Synchronization in a distributed environment Ð Event ordering Ð Mutual exclusion

More information

Quality of Service (QoS)

Quality of Service (QoS) Quality of Service (QoS) The Internet was originally designed for best-effort service without guarantee of predictable performance. Best-effort service is often sufficient for a traffic that is not sensitive

More information

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Latest Solved from Mid term Papers Resource Person Hina 1-The problem with priority scheduling algorithm is. Deadlock Starvation (Page# 84) Aging

More information

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree.

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree. The Lecture Contains: Index structure Binary search tree (BST) B-tree B+-tree Order file:///c /Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture13/13_1.htm[6/14/2012

More information

8: Scheduling. Scheduling. Mark Handley

8: Scheduling. Scheduling. Mark Handley 8: Scheduling Mark Handley Scheduling On a multiprocessing system, more than one process may be available to run. The task of deciding which process to run next is called scheduling, and is performed by

More information

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech Advanced Topics in Distributed Systems Dr. Ayman A. Abdel-Hamid Computer Science Department Virginia Tech Synchronization (Based on Ch6 in Distributed Systems: Principles and Paradigms, 2/E) Synchronization

More information

Process behavior. Categories of scheduling algorithms.

Process behavior. Categories of scheduling algorithms. Week 5 When a computer is multiprogrammed, it frequently has multiple processes competing for CPU at the same time. This situation occurs whenever two or more processes are simultaneously in the ready

More information

Following are a few basic questions that cover the essentials of OS:

Following are a few basic questions that cover the essentials of OS: Operating Systems Following are a few basic questions that cover the essentials of OS: 1. Explain the concept of Reentrancy. It is a useful, memory-saving technique for multiprogrammed timesharing systems.

More information

CSE 5306 Distributed Systems

CSE 5306 Distributed Systems CSE 5306 Distributed Systems Synchronization Jia Rao http://ranger.uta.edu/~jrao/ 1 Synchronization An important issue in distributed system is how process cooperate and synchronize with one another Cooperation

More information

Scheduling. The Basics

Scheduling. The Basics The Basics refers to a set of policies and mechanisms to control the order of work to be performed by a computer system. Of all the resources in a computer system that are scheduled before use, the CPU

More information

Chapter 6 Synchronization

Chapter 6 Synchronization DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 6 Synchronization Clock Synchronization Figure 6-1. When each machine has its own clock, an event

More information

Implementation of Clocks and Sensors

Implementation of Clocks and Sensors Implementation of Clocks and Sensors Term Paper EE 382N Distributed Systems Dr. Garg November 30, 2000 Submitted by: Yousuf Ahmed Chandresh Jain Onur Mutlu Global Predicate Detection in Distributed Systems

More information

Homework Assignment #5

Homework Assignment #5 Homework Assignment #5 Question 1: Scheduling a) Which of the following scheduling algorithms could result in starvation? For those algorithms that could result in starvation, describe a situation in which

More information

1 Process Coordination

1 Process Coordination COMP 730 (242) Class Notes Section 5: Process Coordination 1 Process Coordination Process coordination consists of synchronization and mutual exclusion, which were discussed earlier. We will now study

More information

Binary Trees

Binary Trees Binary Trees 4-7-2005 Opening Discussion What did we talk about last class? Do you have any code to show? Do you have any questions about the assignment? What is a Tree? You are all familiar with what

More information

International Journal of Advanced Research in Computer Science and Software Engineering

International Journal of Advanced Research in Computer Science and Software Engineering Volume 2, Issue 11, November 2012 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Process Scheduling

More information

CS2223: Algorithms Sorting Algorithms, Heap Sort, Linear-time sort, Median and Order Statistics

CS2223: Algorithms Sorting Algorithms, Heap Sort, Linear-time sort, Median and Order Statistics CS2223: Algorithms Sorting Algorithms, Heap Sort, Linear-time sort, Median and Order Statistics 1 Sorting 1.1 Problem Statement You are given a sequence of n numbers < a 1, a 2,..., a n >. You need to

More information

Broadcasting with Hard Deadlines in Wireless Multi-hop Networks Using Network Coding

Broadcasting with Hard Deadlines in Wireless Multi-hop Networks Using Network Coding WIRELESS COMMUNICATIONS AND MOBILE COMPUTING Wirel. Commun. Mob. Comput. 0000; 00: 6 Broadcasting with Hard Deadlines in Wireless Multi-hop Networks Using Network Coding Pouya Ostovari, Abdallah Khreishah,

More information

The priority is indicated by a number, the lower the number - the higher the priority.

The priority is indicated by a number, the lower the number - the higher the priority. CmSc 250 Intro to Algorithms Priority Queues 1. Introduction Usage of queues: in resource management: several users waiting for one and the same resource. Priority queues: some users have priority over

More information

Multi-threaded programming in Java

Multi-threaded programming in Java Multi-threaded programming in Java Java allows program to specify multiple threads of execution Provides instructions to ensure mutual exclusion, and selective blocking/unblocking of threads What is a

More information

Introduction to Real-Time Operating Systems

Introduction to Real-Time Operating Systems Introduction to Real-Time Operating Systems GPOS vs RTOS General purpose operating systems Real-time operating systems GPOS vs RTOS: Similarities Multitasking Resource management OS services to applications

More information

A Level-wise Priority Based Task Scheduling for Heterogeneous Systems

A Level-wise Priority Based Task Scheduling for Heterogeneous Systems International Journal of Information and Education Technology, Vol., No. 5, December A Level-wise Priority Based Task Scheduling for Heterogeneous Systems R. Eswari and S. Nickolas, Member IACSIT Abstract

More information

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU BCA-3 rd Semester 030010304-Fundamentals Of Operating Systems Unit: 1 Introduction Short Answer Questions : 1. State two ways of process communication. 2. State any two uses of operating system according

More information

Chapter 2 Processes and Threads. Interprocess Communication Race Conditions

Chapter 2 Processes and Threads. Interprocess Communication Race Conditions Chapter 2 Processes and Threads [ ] 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling 85 Interprocess Communication Race Conditions Two processes want to access shared memory at

More information

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter Lecture Topics Today: Uniprocessor Scheduling (Stallings, chapter 9.1-9.3) Next: Advanced Scheduling (Stallings, chapter 10.1-10.4) 1 Announcements Self-Study Exercise #10 Project #8 (due 11/16) Project

More information