Open In App

Consistency Semantics for file sharing

Consistency Semantics is concept which is used by users to check file systems which are supporting file sharing in their systems. Basically, it is specification to check that how in a single system multiple users are getting access to same file and at same time. They are used to check various things in files, like when will modification by some user in some file is noticeable to others. 

Consistency Semantics is concept which is in a direct relation with concept named process synchronization algorithms. But process synchronization algorithms are not used in case of file I/O because of several issues like great latency, slower rate of transfer of disk and network. 



Example : When an atomic transaction to remote disk is performed by user, it involves network communications, disks read and write or both. System which is completing their task with full set of functionalities, had a poor performance. In Andrew file system, successful implementation of sharing semantics is found. 

To access same file by user process is always enclosed between open() and close() operations. When there are series of access take place for same file, then it makes up a file session. 1. UNIX Semantics : 



The file systems in UNIX uses following consistency semantics –

In this, a file which is shared is associated with a single physical image that is accessed as an exclusive resources. This single image causes delays in user processes. 

2. Session Semantics : 

The file system in Andrew uses following consistency semantics.

In this, a file which is shared is associated with a several images and there is no delay in this because it allows multiple users to perform both read and write accesses concurrently on their images. 

3. Immutable-Shared-Files Semantics : 

There seems a unique approach immutable shared files. In this, user are not allowed to modify file, which is declared as shared by its creator. An Immutable file has two properties which are as follows –

In this file system, content of file are fixed. The implementation of semantics in a distributed system is simple, because sharing is disciplined.

Article Tags :