Tuesday, June 4, 2019

An Election Algorithm In Distributed Systems Information Technology Essay

An alternative algorithm In Distributed Systems Information Technology EssayIn our increasingly globalised, distributed information transiting system systems have been changed few(prenominal) aspect of our life, especi both last(predicate)y parallel computing these days commercial application provide the strength of the development of faster computer, which allow a large fall data in sophisticated expressive style, for instances, economic and financial modelling, database, mul clipdia technology, and oil exploration. double computing has the ability to solve larger problems, provide the attribute of concurrency, free time and m acey.Distributed systems architecture leads to a wider use of parallelism as future of computing sector this evolution made possible to run softw argon on concurrent do work on multiple abutors. One of the main issues in visualizeing concurrent softw be is resource algorithm.The issue of choice algorithm is the in truth question the current paper seeks to answer. The importance of this issue leads to effectiveness enhancements by develop and design algorithm use a new technique. Therefore, the aims of this dissertation be design and develop this technique, also discuss the benefits of parallel computing.RationaleI have been utilise the computer and the internet for or so(prenominal) of years, my concentration is ne cardinalrks with emphasis in distributed systems.Recently, the internet is vastly inter attached a variety number of computer networks in many different institutions, which make a huge motivation to be professional user in that locationfore, my MSc course at Oxford Brookes University is really brilliant opportunity for achieving this goal with deep information path for further search in software engineering and networks.In oddly distributed systems are unrivalled of the signifi locoweedtly growing on demand in this sector, as they used to accelerate the computingal speed of the problem solving. Thus, o ne of the most fundamental problems in distributed systems is the attracter bankruptcy, further more than, it is spectacular to improve and enhance my C manner of speaking curriculumming.With all these changes in the athletic case of computer industry, my goal to helps and assists for use the choice algorithm in distributed systems with a new technique and software for solving the coordinator failure.During study of distributed systems with connecting of parallel computing, this was bring a new interested challenge to go more further in development and contribute to gain wide rang of knowledge, all of these ordain have lively me for a future career in computer software engineering and broadened my perspective and enriched my life beyond my career aspiration.Preliminary Research (maybe)ObjectivesThe nonsubjectives of this dissertation is to explore and develop the stand of an option in distributed systems which allow a throng of put to workes to elect one process to act as a coordinator when a failure happen. However, as well as to get to this goal PVM (Parallel Virtual Machine) and improve the understanding of this environment as it will used as an environment essence passing for this project, this facility provides send and receive data message between processes and support concurrent programming, moreover it is easy and simple to spawn a establish of processes. One of the most significant goods of PVM is provide unified framework within parallel programs handle cluster, where is possible for a programmer to divide a shove of data into tasks that can run concurrently by send and receive data to all processes. This paper will focus on how to produce an resource algorithm use above idea.This environment will be write in C language, and there will be a main program (Master), in which the user can initialise and make the declaration for the main attribute of executed program there are varieties of dutys to send and receive all data types du ring the chat between programs. The second program called (Slave), this program will carryout the operation after receive the data from master program, thusly packet the exit and send it back.Finally, a part from the objectives will be self skills specifically improve project planning, programming as well as project create verbally skills.MethodsThe research methods which used to achieve these objectives will be as the following(a)Research the Oxford Brookes library for books and documentation for the distributed systems and specially an pick and agreement, the library has a bus of sources, the book Distributed Systems Principle and Paradigms 7 has cover important information to achieve the goal of this project also the book Distributed Systems Concept and Design 1 the was a brilliant scheme to cover the distributed systems. Another book was giving a complete list of function, examples, and explanation to be familiar with virtual(prenominal) environment 2. On the other hand, research the Internet, which has a lot of useful materials and describing an resource algorithm 3.Study and evaluate some kinds of algorithms those help and develop the topology idea of the project to achieve my goal. stool a resultant design to meet the compulsion of the problem, as well as developed which haveed for both task and discussed the findings with my supervisor. Moreover, PVM message passing conference design which gives a right direct path for problem solving.Implement every task as a proposed design use PVM library written in C language. System run and testing will be done on Cluster of school of technology.Make a review and forestall an arranging to complete writing of the final report.Testing (may)ResourcesThis dissertation will be achieved by using a variety of resources of software and hardware, also some of information and documents sources that cover all the area of the research.SoftwareThe environment of code will be writing in C language, that it suppor t concurrent computer and UNIX, as well as it is simple language to understand. Moreover, it is also support the software PVM (Parallel Virtual Machine). PVM is mainly designed for using by concurrent and entangled environment it is possible for providing a virtual view. There are many of useful websites like (http//www.netlib.org/pvm3/).HardwareThe Cluster of Brookes School of Technology will be needed to implement the project, and all test and run steps will do on it. The cluster consists of 6 bosss with 1 main invitee ssh 161.73.146.51 committed as processors and run PVM which installed in every invitee.Information Sources and Experts AdviceThere are several of documentation belongs to PVM which can be found in the book of A Users Guide and Tutorial for Networked Parallel Computing as mentioned earlier, and websites 4. Further more, the lectures of modules software technologies that have a good reference of covering the topic of distributed systems in general. also all of th is my supervisor/tutor Chris Cox who gives useful advice and information as he is specialise in distributed systems programming.SchedulePERT ChartGantt Chart victimizeThe election algorithm code has been implemented according to the design decision made. It includes function to perform sending and receiving ( parley channel) operations for group of functions toAcknowledgementI would like to take the opportunity to thank my supervisor Mr. Chris Cox who was ever available to support when I missed up I am deeply indebted(predicate) for his constant help and advice. Since this push to more steps in my research, this reflects on the right direction to the target of finishing the dissertation.I want to thank my accomplice Abobaker Almowfeq for his encouragement and advice.Finally, I dedicated this thesis to my parents and thank them for the supporting throughout my MSc study in the UK. I am honoured to show my respects to them. They were my correctly source of energy.ContentsDissertati on PlanAbstractAcknowledgementIntroduction The Importance of Concurrent ProgrammingThe Need of Election in Distributed SystemsStructure of this documentResearch .Election Algorithm conjectureDescriptionBully AlgorithmRing AlgorithmMethodIntroductionDesign StageThe Core AlgorithmComments on the AlgorithmEvolution of the Core AlgorithmThe SoftwareDevelopmentC LanguagePVMClusterTestingFailure SimulationTesting hightail itConclusionsCritical Appraisal of the ProjectAchievementArea of Future ImprovementWork Schedule ReviewLessons LearntList of AbbreviationDDMS (Distributed Database Management System)MPI (Message Passing Interface)MPP (Massively Parallel Processing)PVM (Parallel Virtual Machine)SMP (Symmetric Multi Processing)List of FiguresChapter 1IntroductionThe Importance of Concurrent ProgrammingThe past thirty years have seen increasingly rapid advances in the field of concurrent programming computing, a concurrent program is a set of sequential programs that can be executed in p arallel book of principles concurrent. On the theme of distributed systems that enable the computers to coordinate their activities and share hardware, software, and data. The strategies characteristics of the systems which include shared state, multiple computers, and a processor that suited to a particular function to make the improvement for execution of instrument and utilization. As well as the concurrent computing have the availability of fault interconnections give the predominance over all the others. All of these offer several advantages The cost of this computing can be low each individual task assigned to appropriate architecture that lead to optimized performance. Network computing can be offer a computer task partitioning along of services functions. Another advantage, the computing networks have the capability to execute subtasks of a computation on tolerance. Consequently, one of the study problems that distributed systems face is the failure this problem can be sol ved by election algorithm for the agreement to only one pommel that distinguished and all other nodes aware of it. Thus this paper describes the design and producing an algorithm to achieve communication of parallel programming in virtual environment.The Need of Election in Distributed SystemElection process is a program distributed over all nodes. When the loss leader has failed and discovered by one or more nodes, then election starts. The leader election algorithms are used in many topologies. For example, in token ring and when the node that has token fails, a new node should be s elect from the system to have the token. The leader election is also used to sole single point failure in client-server that is when the systems need to transfer the leadership to another station and the fail authorises.Many researches have studied the subject of leader election algorithms. The researches pre displaceed different techniques and strategies to have with the election algorithm.The obj ective of this dissertation is to research the election algorithm in distributed systems and design and develop an election algorithm in distributed systems to get hold of and agreed with biggest identifier to be coordinator. The software systems PVM used as a library of design and development.Structure of this DocumentsThis dissertation has structured and separated into three parts. The first part describes and discusses the research topic theory of the election algorithm in distributed systems, as provides some applications with description to show and investigate their use in the subject of election algorithm.The second part describes the methodology that equal to accomplish this dissertation, as well as outline design of the core algorithm and development description which shows the dissertation deliverables.The final part outlines the conclusion with act of this project.Chapter 2ResearchThis segment shows the research and development of the related investigation and moreove r, the works that have been done relating election algorithm. It covers the theory of distributed systems and the failure problems this part was particularly important in the progress of understanding an election and the agreement in distributed systems and gives a clear idea for design the core algorithm.The need for software technologies module lectures, specially distributed systems was deceive there were brief description for some material and examples of programming code those were good point to start from for this dissertation.Election Algorithm Theory (in Distributed SystemsAs more and more, distributed systems have been rapidly changed the field of computer science. Distributed systems are application that executes a collection of autonomous network computers to coordinate and communicate their action.However, the major goal of distributed systems including the ability to connect remote users with remote resources in open scalable way in other words give an easy way and simp le way for the users and application to access remote resources, and sharing the facilities included by efficient/controlled way.Furthermore, the brilliant benefits of sharing resources are vary the obvious one is economic, that is to say reduce the expenditure for institutions, such as Universities, and also the collaboration will be easier to connect users and resources. This characteristic is a direct as a result of having independent computer 7.DescriptionAn election algorithm Is an algorithm for solving the coordinator election problem which is choosing a unique process from among a group of processes on different processors to act as central coordinator in distributed system, that is to say a group of processes on different machines need to make agreement to choose a coordinator7.However, there is no way to choose/select one process, if all processes are exactly the same and there are no distinguishing characteristics. Accordingly, there requirement is for the choice of electe d process to be unique hence election algorithm attempt to locate process with highest process number and evidence it as coordinator 7.When a failure occurs, which means one or more node fails, or during a communication channel fails the subsystem that enables the nodes/processes to communicate there is requisite for the nodes to start coordination agreement to elect node for new situation, therefore live nodes can continue working to fulfil their task 3.Distributed systems have to be pliant to failures at least by two strategies. The first strategy is a capability for operating continuously and correctly by have software when failures occur (using an algorithm). The other strategy is to take a period of time out to reorganize the system by temporarily halt operation (reorganization by coordinator) 3.The election algorithms vary, for exampleWired system which are for instances.Bully Algorithm (the biggest guy in town wins)Ring AlgorithmWireless systemVery big systemBully Algorit hmIt is an election algorithm, in the paper of Election in a Distributed Computing Systems by Garcia-Molina 9 this algorithm can handle process crashes and the presumptions are all processes have got unique identity, all other processes in the network are known by every process and the system is synchronous, that is, there is a maximal time limit T within a request and if the requested process P is alive the request will be answered.However, the algorithm defined as, when there is no responding to the requests from the coordinator, there will an initiating for an election. ThereforeThe process P send an election-message to all processors with higher numbers than itself, then P waits for answer-message.The process P will itself elected (P win the election), if the answer-messages are not arrive with in the time T, after that sends a coordinator message to all processors a lower number.Process P will wait a further time period T a coordinator message, if there is one or more answer-me ssageA process P receives an election message and returns the answer-message, then start the algorithm from the beginning if there is nothing have been done before.A process P receives the coordinator message register the senders number and considers it elected.The algorithm will be started , when faulty process restarts if the process which was previously down comes back up, it holds an election and if happens to be the highest numbered process currently running, this will win the election and take over the job of coordinator. As a result of that the biggest process in all processes always wins therefore the name is bully algorithm.Here an example of the election of coordinator P2 after the failure of P4 3.ElectionCoordinatorStage 1ElectionP1P4P3P2AnswerElectionCoordinatorElectionP1Stage 2ElectionP4ElectionP3P2AnswerStage 4Stage 3coordinatorTime outP1P2P3P4P2P1P3P4Figure (Bully Algorithm)In this operation, four processes are shown when process P1 detect the failure of the coordinat or P4, therefore it is announces an election in the stage 1 during the receiving an election-message from P1, processes P2 and P3 send answer-message to P1 and start their own elect-ion, then in the stage 2, P3 sends an answer-message to P2, for P3 has no answer-message authoritative from P4 which is failed process. Consequently, it decides that it is the coordinator moreover, in stage 3 P3 fails too before it can send out the coordinator-message.When the timeout period expires for P1, it deduces the absence of the coordinator-message and begins another election eventually P2 is elected coordinator.Ring AlgorithmAn election which is suitable for a collection of processes based on the use of a ring in the book Distributed Systems Concepts and design 1 chapter12 section 12.3 provides a good reference and explanation of the subject of coordination and agreement.However, the messages are sent clockwise around the ring, any process can begin an election initially, every process is marke d as nonparticipant in an election, it proceeds by making itself as a participant, so when any process notices that the coordinator is not functioning, it builds an election-message placing its identifier in an election message and sending it to its clockwise neighbour, when an election-message is received by a process, it equal the identifier in the message with its own, the message will be beforeed if the arrived identifier is greater than a received process whereas, if the arrived identifier is smaller and the receiver is not a participant, then it substitutes its own identifier in the message and forwards it, but if it is already a participant, it does not forward the message.In addition, if the received identifier is that of the receiver itself, thus this identifier must be the greatest, and it becomes the coordinator. Accordingly, the coordinator makes itself as a non-participant once more and sends an elected message to its neighbours announcing its election and enclosing i ts identity. As well as, if the neighbour process which is received the election message is down, the sender will skip over the neighbour and goes to the next member along the ring, or the one after that until a running process is located.P1Adds 3 (2 ,3)P1CoordinatorP2P4P2P4P2Elected P3Elect P3 message (2,3)P3Elect-P2 message (2)P3Elect-P3 message (2,3)Stage 2Stage 1Coordinator = P3Sends elected P3 (2,3)P1P4P2Elected P3 messageP3 receives the messageP3Stage 3Figure (Ring Algorithm)Supposing P2 detects that coordinator P4 is not responding, thus P2 sets active-list to ( ) and sends elect-P2 message to P3, after P2 sets active-list to (2). However, P3 receives elect-P2 which is the first message has been seen, so P3 sets its active-list to(2,3) then P3 sends elect-P3 towards P4 and sends elect-P2 also respectively, the message will pass P4 and P1 due to their crash and reach P2, the process P2 adds 3 to active-list (2,3), then P2 forward elect-P3 to P3 and receives the elect-P2 messag e which leads to choose P3 from P2 as the highest processes in its-list (2,3) and sends an elected P3 message, finally P3 receives the elected-P3 and P3 choose P3 as the highest process in its-list.This is an example of process which consists of four processes and the presumptuousness is P1 and P4 are crashed.Distributed Database systemsDistributed database technology required to merging of two significant concepts, the integration via the element of database and distribution through the element of networking. Therefore, distributed database management system (DDBMS) provides the powerful tools for managing an integrated collection of shared data, and supply total solution to information processing problems within large organization. Furthermore, the reliability of the data communication facility will be takes into its possibility. However, distributed database require one process to be a unique as coordinator to perform some activities. The 5 provides a reference for using electio n to choose the coordinator as continuing for duty is required when the coordinator process fails.The election algorithm 6 of TEMPO that running on Berkeley gives another use of choosing a unique process to be coordinator. TEMPO is a distributed system program that altered on master and slave techniques running on individual process. The reliable communication services for LAN which TEMPO works in and to be for certain about its continuity, an election is necessary to elect a new master and should have the ability to perform withstand the failure of process when the election begin, deal with network partitions, and collect information about the topology of the system by allowing a time daemon.Chapter 3MethodIntroductionThis chapter describes the design and implementation of the election algorithm. The main point of the design is the aspect which will be used and adapted in order to finish this project therefore various assumptions and decisions are made to develop main algorithm. I n the dissertation proposal report there was assumption idea about the algorithms to be used, but when some design concepts have reviewed and researched the algorithm that based on Bully Algorithm was adapted.All following section covers technical and practical explanation, as well as the process of the design which are made. Finally, testing process to shows the algorithm performanceDesign StageThe Problem Specification DesignAfter finishing the necessary requirement and research, there were many possible idea gathered in order to produce the design, formulate a clear manner of main election algorithm, and how to achieve the efficient solution to the problem.The design of the communication must take into account the topology of the network, which will be (cluster) the algorithms presented here assume a fully connected topology. Furthermore, the assumption that communications are error free is an abstraction and the assumption of finite but arbitrary transit times for messages is co nsistent the algorithm do not to be sensitive to change in the relative speeds of the channel and processors at the nodes, so the correctness will never depend on strong times.For each node there will be a unique identification number, the message passing model is consistent with that provided with PVM (Parallel Virtual Machine). There are two statements for communicationSending and receiving messagesSend (MessageType, Destination , Parameters)Receive (MessageType , Parameters)For example below node 1 sends a message of type request to node 2 with two integer parameters values 13 and 27.integer k= 13send (request, 2, k, 27)integer m, nreceive (request, m, n)node 1 node 2(Node communication)When the message is received at node 2, these values are transferred to the variable m and n declared at the node.The core Algorithm computer architectureDiscuss the algorithm processSend sideReceive sideThe design of the algorithm will using fully connected, and it is extremely efficient in tha t any node can send a message directly to any other nodes, but it is extremely expensive because it needs more communication channel. This design allows process to crush during the election where there are three types of messages an election message is sent to announce an election an answer message is sent in response to an election message and coordinator message is sent to announce the identity of the elected process.The drawing below shows four nodes which containing the data structures, that is A node identity and the number chosen by each nod13elected message1.2.3.4node 1elected message 11,2,3,41,21,2,3,4227node 4node 2elected message1,2elected message1,2,318node 31,2,3Figure (Fully Communication Architecture)The assumption of the election start from node 1 and the message is send to all other nodes and every process marked as nonparticipant in an election, when node 1 initiates/builds the election message placing with it its identifier which is 13 in active list 1 and sends i t to all nodes neighbour, when as election message is received by all nodes, they compare the identifier in the message (13) with their own, consequently node 2 sends reply message to all nodes, because other nodes have lower identifier than it does. On another hand, node 4 does not send any reply message, instead adding all other nodes to its active list also node 3 sends reply to both node 1 and node 4 but not for node 2 node 1 will reply message only to node 4 due to that the identifier number of node 1 is bigger than node 4.When node 2 sends reply message with its identifier which is the highest one to all nodes, its regarded as coordinator election message, and it will wait a period of time, then if it does not receive any reply from the nodes, thus it sends a message to all other nodes declare itself as coordinator.Node status is normal except while the node is in the process of joining a new group. Each node that is not the leader of a group call to checks whether the leader of its group is still alive, by sending a message to the leader and waiting for a reply. If the node does not receive a reply within the timeout period, the node invokes a recovery procedure. Each leader i call a check procedure, which sends message to every other node asking whether that node is a leader.If one or more other nodes reply that it is a leader, node i pauses for a time inversely proportional to its priority (this helps prevent multiple nodes from initiating elections concurrently) and then calls a merge procedure. The merge procedure sends message to all of other leaders, inviting them to join a new group with the inviting node as leader. When the leader i receives an invitation, it forwards the invitation to the other members of its group.A node i that receives an invitation (directly or indirectly), sends an accept message to the proposed leader of the group. If node I receives a reply to its accept message within some time-out period, then node i joins the new group , otherwise, node i calls the recovery procedure.If two nodes are in the same group, then they have the same leader at all times, for all operational node i and j, if status i = normal and status j = normal.Reliable BroadcastTo ensure essentially that all correct processes deliver the same message, and that messages broadcast by correct processes are delivered. Furthermore, it ensures that no different messages with the same identifier are delivered.The consideration that, the reliable broadcast is executed by function broadcast (message) as the followingReliable broadcast1 Validity If a correct process broadcast message M, then some correct processes eventually deliver M.Reliable broadcast2 Agreement If a correct process delivers a message M, then some correct processes eventually deliver M.Reliable broadcast3 Integrity For any identifier ID, every correct process p delivers at most one message M with identifier ID, and if sender (M) is correct then M was previously broadcast by se nder (M).The election message will use the flag, so the flag is used by application to inform which node is alive or dead, and below there is some assumption for thatComments on the core AlgorithmFirst of all, the design in these algorithms have been influenced byBecause the senderIt long words here AmerEvolution on the core AlgorithmSoftwareDevelopmentWhen the choice of the design has made, and finishing the messages passing communication mechanism for the election algorithm. Furthermore, after final manner for the communication topology has chosen and proved , some technical and technology materials are required to reach the goal of this dissertation, like which kind of library and hardware to be used to implement, run and test the algorithm, also which language to be easy for the programming. Thus, the following sections discuss these issues.The C LanguageThe simplicity of C language to learn, understand, and the advantage of its widely spread led me to make the choice to be adap ted it as a programming language for the code of this project. Moreover, it is origin as the language of UNIX operating systems. This also gives more advantage as PVM library written in C, so it specifies a standard library with an extensive set of function that being powerful and efficient language. It is support low level of both applications the distributed and the network one.The Cluster ComputersA computer cluster is a set of connected or linked computers that working close to each other through high speed local area networks to form a single computer. A cluster at least has two computer that called nodes, one master which typically has a job scheduler that arrange the work to slave

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.