You are on page 1of 11

FILE-SHARING

SEMANTICS
File Sharing
A shared file may be
simultaneously accessed by
multiple user.
File Sharing semantics
A document that describes the
modification of data made by a
user that can be shared to
another user.
TYPES OF FILE SHARING
SEMANTICS

1. UNIX Semantics
2. Session Semantics
3. Immutable shared-file
Semantics
4. Transaction-like
1.UNIX semantics

• This semantics enforces an absolute time ordering on


all operations and ensures that every read operation
on a file sees the effects of all previous write operation
performed on that file
• The UNIX semantics is commonly
implemented in file systems for single processor
system because it is the most desirable semantics and
also because it is easy to serialize all read/write
requests. However implementing UNIX semantics in a
distributed file system is not an easy task.
2. Session semantics:
• Session is when a client performs a read/write operations
on a file.

• In session semantics, a client opens a file, all changes


made to a file during a session are initially visible only to the
client process (those process that are on the client node).

• When opening the session and are invisible to other remote


processes who have the same file open simultaneously.

• Once the session is closed after modification, the changes


made to the files are made visible to all processes only in later
session.
3.Immutable Shared-files semantics:
• This semantics is based on the use of the
immutable file model. Recall that an immutable file
cannot be modified once it has been created.

• According to this semantics, once the creator of a


file declares it to be sharable, then the file is
treated as immutable ,so that it cannot be
modified any more.

• Changes to the file are Handled by creating a new


update version of the file. (Suppose if you want
to modified the immutable file, the additional
information are added to the new created file .)
4.Transaction –like Semantics
• This semantics is based on the transaction mechanism,
which is high-level mechanism for controlling concurrent
access to shared ,Mutable data.

• The transaction mechanism ensures that the partial


modifications made to the shared data by a transaction
will not be visible to other concurrently executing
transaction until the transactions ends.

• Therefore, in multiple concurrent transactions operating on


a file, the final content will be the same as if all the
transactions were run in some sequential order.
THANK YOU

You might also like