def startDistributedReadWrite(algorithm_code): global algorithm #cme.master_node = masterNode if algorithm_code == 0: algorithm = "CME" cme.start([ip, port, myID], nodes)
def startDistributedReadWrite(algorithm_code): global algorithm if algorithm_code == 0: algorithm = "CME" cme.start([ip, port, myID], nodes)
def centralizedMutualExclusion(): #cme.master_node = masterNode for node in nodes: proxyServer = cme.get_proxy_server(node) proxyServer.receiver.startDistributedReadWrite(0) cme.start([ip, port, myID], nodes)
def centralizedMutualExclusion(): for node in nodes: proxyServer = cme.get_proxy_server(node) proxyServer.receiver.startDistributedReadWrite(0) cme.start([ip, port, myID], nodes)