1/10
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is file sharing semantics ?
It defines how multiple user interact with the same file in distributed system
Its important because files are replicated , cached
What are the types of file sharing sementics ?
Unix Semantics
Session Semantic
Immutable File Semantic
What is Unix Semantics ?
It follows the traditional unix file behaviour
All clients always see the latest changes.
Ex: User A writes x = 10 then B reads immediately x = 10
Adv: Good for systems where latest data matters
Disadv : Slow
What is session semantics ?
In this user sees its own changes first
Other user may see old data until system syncs
Example:
You edit a file on your cloud drive → you see your changes instantly.
Your friend opening the file at the same time may see the older version.
Adv: Fast
Disadv: Not suitable when all client want to see immeidate changes
Immutable File Semantics
In this once file is created it can’t be modified
If we want to update the file then it will create the new file
Consistency is guaranteed
Adv: Very easy to maintain consistency
Disadv: Requires more storage
What is file caching ?
It is when a client keeps a copy of a file or part of a file locally so taht it deosn’t need to fetch from server every time.
This makes the accessing faster
What are the main file caching schemes?
Write Through caching
Write Back caching
Read Only caching
Callback Scheme
What is write through caching ?
Any updates to the file is immediately send to the server
In this local cache and server are always exactly the same
Example : You type in a google docs → It saves instantly online
Every changes goes straight to the server
What is write back caching ?
In this changes first saved locally in cache
Later , Updates are send to server all at once or when file is closed
Example : You edit a dowload file → it only uploads when you click it save
Work locally first and then send changes later
What is read only caching?
In this only read operation are cached
Any write must be done directly to the server , not locally
Example :
You open a PDF from the cloud → Cache locally so next read is fast
Editing the PDF still requires server access
Cache only for reading , write goes straight to server
What is Callback Scheme
It is a method where server keep the track of everyone who has a copy of a file
If anyone changes the file , the server will tell you that your file is outdated , update it
Ex: AFS
It simply tells when someone changes the file and tell that your file is outdated