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 –

  • The file which user is going to be write will be visible to all users who are sharing that file at that time.
  • Their is one mode in UNIX semantics to share file is via sharing pointer of current location. But it will affect all other sharing users.

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.

  • The file which user is going to be write will not visible to all users who are sharing that file at that time.
  • After closing file, changes done to that file by user are only visible only in sessions starting later. If changes file is already open by other user, then changes will not be visible to that user.

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 –

  • Its name may not be reused.
  • Its content may not be altered.

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

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Recommended Posts:


    Check out this Author's contributed articles.

    If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

    Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


    Article Tags :
    Practice Tags :


    Be the First to upvote.


    Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.