<body onLoad="window.defaultStatus='Welcome!. You are in my weblog.';return true"><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar/9550158?origin\x3dhttps://www.txemaromero.com', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tuesday, June 09, 2009

Cristian's algorithm implementation in C

Cristian's algorithm is a method for clock synchronisation which can be used in many fields of distributive computer science but is primarily used in low-latency intranets.

More information at:
https://en.wikipedia.org/wiki/Cristian%27s_algorithm

An example is implemented in C language using Knoppix GNU/Linux as operating system. It is based on TCP/IP. TCP/IP refers to two protocols that work together to deliver data: the Transmission Control Protocol (TCP) and the Internet Protocol (IP).



[Download source code: server.c and client.c files]. Also available at GitHub: http://github.com/txemaromero/cristian

Review some slides to understand the code: https://www.csd.uoc.gr/~hy556/material/tutorials/cs556-3rd-tutorial.pdf