Вы находитесь на странице: 1из 2

Running head: M6A1 1

M6A1: Fix a Distributed File System’s Race Condition

THOMAS GRAPENTINE

Excelsior College
M6A1 2

Consider the following rules for a shared-resource system:


 There are n shared data resources and m clients where n and m are positive integers.
 The resources are accessed via a network connection.
 The clients may read and write to the shared resources and may only execute one
operation at a time.
 Clients’ read and write requests are served sequentially as they are received.
Propose rule changes and possible additional operations on resources besides read or write
that would ensure the following:
 No client’s modifications can be overwritten by another client’s out-of-date revisions.

The following rules should be followed for the shared resource system.
1. When a process has requested for the reading operation, then it should perform only read
the only operation such as the file is opened for reading the only purpose.
2. To perform read and write operations, they should be considered as a part of critical
section operations.
3. The main advantage of reading the only operation when required is that no problem will
arise. A large number of processes can read a single instance of a file.
4. In order to perform write operations, all the operations inside the critical section should
come out first. During the writing process, no other process should be allowed to enter
into the critical section. All the other processes should wait for completing the current
operation.
5. A read or write operation should wait for all the current operations already present inside
the critical section.
6. Based on the arrival sequence, any number of reading or write operations are allowed to
enter the critical section after the finishing of the current operation.
7. The queue of waiting processes should be maintained in order to analyze or monitor the
arrival sequence.
8. The current algorithm should be updated in order to meet the requirement of the rules of
Process Synchronization.
9. For incoming clients requests, a buffer should be created. The main purpose of this is that
they can enter the CS sequentially after getting access.
10. A queue should be updated so that a new client process can be enqueued
11. For resource allocation, the safe state algorithm should be used to check the status of the
system whether it is in a safe state or not. The allocation will be rejected if it is not in a
safe state.

Вам также может понравиться