ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU-(2020-2021)-1 > student homework > 2018329621213_黄冰慧 >
homework05_2018329621213 Version 0
👤 Author: by 454234624qqcom 2020-11-02 13:49:54
There are two groups of concurrent processes, readers and writers, sharing a file. When two or more reader processes access the shared data at the same time, no side effects will occur, but if a writer process and other processes (reading process or writing process) Access to shared data at the same time may cause data inconsistency errors.

Therefore the requirements are:

  1. Allow multiple readers to read files at the same time;

  2. Only one writer is allowed to write information in the file;

  3. Any writer does not allow other readers or writers to work before completing the writing operation;

  4. Before the writer performs the writing operation, all existing readers and writers should be allowed to exit.


Code:

Please login to reply. Login

Reversion History

Loading...
No reversions found.