![]() Readers And Writers On WWW pages |
![]() |
Authors: Michał Kaczmarczyk Jakub Kocyk Paweł Żołnierczyk
After viewing vote to us! |
||||||||
Introduction |
The problem of readers and writers is a problem with access to a resource. Writers are processes which use the resource individually. Readers may use it simultanously. The problem solution without starving any of these two groups is based on following rules. The last reader leaving the reading room gives access to the first waiting writer (if there is any). The leaving writer lets all the waiting readers in. The new readers may also enter later only if there is no waiting writer. |
|||||||||
Program |
In our project the rading room is a resource controlled by a program called server. If the computer on which it is running has been shut down, you must run the program again. The simulation may by performed only if the server is running. Then readers and writers may be sent to the system. All of these, as well as watching the reading room state may be done using a WWW browser. The simulation may be also performed in text mode on a Unix system; you can then view all the changes in the system immediately. When watching with a WWW browser there is always a delay depending on the connection with server. |
|||||||||
Symbols |
The following symbols mean appropriately:
|
|||||||||
Specification |
The reader, writer, and reading room programs are written in C taking advantage of message queues. The CGI (Common Gateway Interface) scripts creating interactive WWW pages (browsing the reading room, sending reader and writer) - in Perl (Practical Extraction & Report Language). The animated pictures are made with the GIF Construction Set program. The sources of this project may be downloaded here. |
|||||||||
Links |
Links to others pages related with this one may be found here.
[Run server]
[Add reader]
[Add writer]
[Browse reading room]
[Sources]
[Links]
|
|||||||||
Competition |
This page takes part in the competition "Notatki w Internecie" (Notes in Internet). If you liked it, you may vote to it. Just click the link below. The information about this competition may be found on the page http://galaxy.uci.agh.edu.pl/~konkurs/regulamin.html. We suggest you to vote when leaving the page. The later you vote the more points we get! |