4th year computer science

Computer Science department

Project Presentation

The purpose of the SYNCJ project is to develop a solution to facilitate the learning of synchronization tools for 4th year programming students from INSA Rennes. In order to do that, we have implemented the synchronization counters mechanism in JAVA.

Sample image

Synchronization counters

Synchronization counters are a synchronization mechanism which is less restrictive than mutual exclusion. This mechanism allows an automatic management of alarms and an automatic update of the synchronization variables.

Synchronizations relate to the state of the counters which account for and control access to methods.

When invoking a method, the counters are updated automatically.

Code written by the pogrammer


These synchronization counters are used through conditions to manage the synchronization of the program.

Example of the reader/writer :

We impose a condition on the reading: no writing should be ongoing.
We also impose a condition on the writing: no writing and no reading should be ongoing.

Sample image

The Compiler

From the user’s declared conditions, we manage the declaration of the synchronization counters and the testing methods.
Then, we automatically generate the counters’ updates and the Java synchronization primitive calling, depending on the method’s name.

Final code generated Sample image

Finally, the reader/writer’s code written by the user above is translated as follows:

We can note here the generation of the synchronization counters and the testing methods.

Sample image

The reading method.

Sample image

The writing method.

Copyright © 2015 INSA Rennes. Liantsoa, Nour, Mathilde, Ibrahim, Ohtmane.