Konkurentno programiranje u Javi i Eiffelu

SAŽETAK

U radu se prikazuju neke “stare” tehnike konkurentnog programiranja u Javi verzije 1 do 4, te neke novije tehnike, koje je omogućila verzija 5, a u verzijama 6 i 7 su još poboljšane. Nažalost, konkurentno programiranje teže je od uobičajenog sekvencijalnog programiranja, ali sa razvojem višejezgrenih procesora konkurentno programiranje postaje nužnost u svakodnevnom radu.

Postoje pokušaji (vrijeme će pokazati da li su uspješni) da se konkurentno programiranje učini jednostavnijim. Jedan drugačiji pristup u odnosu na onaj u Javi (a slično Javi ima i C#, pa i C++), koji bi trebao olakšati konkurentno programiranje, je Simple Concurrent Object Oriented Programming (SCOOP), model koji je realiziran u OOPL jeziku Eiffel, ali postoji šansa da se raširi i na druge OOPL jezike (npr. postoje i testne realizacije u Javi).

ABSTRACT

The paper presents some “old” concurrent programming techniques in Java, versions 1 to 4, and some newer techniques made possible by version 5, and further improved in versions 6 and 7. Unfortunately, concurrent programming is more difficult than usual sequential programming, but with the development of multi-core processors concurrent programming is becoming a necessity in daily work.

There are some attempts (time will show if they are successful) to make concurrent programming easier. A different approach in comparison to that in Java (and similar to Java are C# and even C++), which should facilitate concurrent programming, is the Simple Concurrent Object Oriented Programming (SCOOP), a model that has been implemented in OOPL Eiffel language, but there is a chance it could spread to other OOPL languages (e.g. there are some test implementations in Java.)