Program passion

Program passionAt the recent WoTUG conference, held at the University of Kent, Professor Peter Welch outlined the advantages CSP, a 20 year-old technique, could bring to the Java language. Stephen Maudsley reports On its Web site, Sun recently urged: “extreme caution” in the use of multi-threading with Java, despite the natural attraction of threads for modelling the way the world works. It is not that Java cannot handle multi-threading, it is just that there are times with multi-threaded Java when, according to the site: “debugging, testing, and maintenance are vastly more difficult and sometimes impossible.” “I don’t want to criticise Java, it is truly magnificent and a breath of fresh air,” said Professor Peter Welch, a computer scientist at the University of Kent. “It is just that it takes an expert, with a few friends, to use its multi-treading capability properly.” Welch, and colleagues at WoTUG (see box) are advocating the use of a technique called communicating sequential processes, or CSP, to simplify multi-threading in Java. CSP is a mathematical theory that allows the rigorous specification of the way in which processes interact with each other and their environment. It also enables verified implementation of such specifications, using a variety of programming languages. CSP was one of the principles underlying the Occam multi-processor programming language. “It makes multi-threading truly simple, amenable to mortals,” said Welch. He went on to explain the advantages that CSP bestows on Java: “Java active processes can now communicate and synchronise through CSP primitives, allowing 20 years of theory and associated tools to be deployed for the elimination of scheduling dependent race hazards, deadlock, livelock and process starvation. For the variety of platforms through which typical Java applications migrate, the thread-safe guarantees automatically provided by CSP design patterns have arrived – just in time.” Anyone, claims Welch, can use them as no knowledge of the underlying mathematics is required. “That maths is built into the implementation of the libraries and the user automatically gets the benefit,” said Welch. Making its debut at the conference, a new model of CSP is claimed to have simplified semantics and extended its area of application to deal with priorities and real hardware. A powerful new technique for verifying the correctness of implementation against specification was also introduced. Applying CSP in its new form could allow general purpose processors to effectively tackle tasks more usually suited to processors designed for multi-processing, like the Transputer. “The problems of building efficient high performance computing engines out of commodity processors and interconnect are near to being sorted, which is crucial with so many of the specialist solutions no longer with us,” said Welch. At the recent University of Kent WoTUG conference, the original CSP language, Occam, was shown off on its shiny new platforms: SPARC, Pentium, Alpha, PowerPC and Sharc, optimised and extended for desktops. It still retains a level of security unmatched by traditional languages, and with a multi-threading context-switch time heading for the 100ns barrier. All this good news proved so much that some of the attendees’ late night discussions ran through to five in the morning. Who says there is no enthusiasm left in programming? WoTUG – what’s in a name? WoTUG is a bit bashful about the origin of its name. “It stands for ‘World Transputer Users Group’, but SGS-Thompson has now dropped the Transputer and it has left us looking a bit out-of-date,”said spokesman Stephen Maudsley. The Transputer was a processor core with four directly coupled high-speed serial links for data transfer. It was conceived specifically to be assembled into multi-dimensional array multi-processor computers. WoTUG, a group of academics and companies, was founded around the idea that communication should be fundamental to a processor, and this idea is returning to vogue. “There are quite a number of US reports that say mainstream microprocessor development is coming back to the concept of a communications engine closely coupled to the processor core,” said Maudsley, “Analog Devices’ Sharc is an example of this tendency.” Maudsley also sees WoTUG as an intellectual repository for future Internet technology: “Many group members developed techniques for sharing data processing tasks over communication networks which are very relevant to multi-processor activity over the Internet.”


Leave a Reply

Your email address will not be published. Required fields are marked *

*