SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Operating Systems
       CMPSCI 377
 Distributed File Systems
            Emery Berger
University of Massachusetts Amherst




  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science
Distributed File Systems
    Numerous drawbacks of local file systems:


        Inconvenient
    

        Administrative overhead
    

        Single point-of-failure
    




    Solution: distributed file systems


        FS appears to be local, but data is remote
    

        Two major implementations:
    

              Windows
          

              NFS (Sun’s Network File System)
          


        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   2
Complications
    Distributed file systems add complexity


    & many design tradeoffs
        Naming – absolute vs. relative (to server)
    

        Remote access vs. caching
    

        Stateless or stateful server
    

        Single image or replication
    




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   3
Naming & Transparency
    Issues


        How are files named?
    

        Do filenames reveal location?
    

        Do filenames change if file moves?
    

        Do filenames change if user moves?
    




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   4
Location naming
    Location transparency:

    filename does not reveal
    physical storage location
        Normal in Unix
    

        Compare to Windows - C:foobar
    

        Provides location independence:
    
        no change if file’s storage location changes




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   5
Windows: Absolute Names

         lokihomeemery
         machine nameremote pathname
    Advantages:                                       Disadvantages:
                                                 
        Easy to find fully                                  User must know
                                                       
        specified filename                                  complete name –
                                                            local & remote
        Easy to add & delete
    
                                                            different
        new names
                                                            Location dependent
        No global state                                 
    
                                                            (cannot move file)
        Scales easily
    
                                                            Makes sharing harder
                                                        

                                                            Not fault-tolerant
                                                        




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science       6
NFS: Relative Names

         /nfs/sting/users1/emery


    Advantages:                                Disadvantages:
                                          

        Location                                 Admin
    

        transparent                               overhead
        Remote name
    

        can change
        across reboots


        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   7
NFS: Relative Names

                /courses/cs300/cs377

          Implemented via mount points
      

               one level of indirection!
           

               Each host: local names ! remote locations
           

               Mount table (/etc/fstab)
           

                     <remote pathname @ machine, local pathname>
                 

% cat /etc/fstab
elsrv4:/courses                     /courses                      nfs     intr,hard,rw 0 0
elsrv4:/courses/cs100_200           /courses/cs100_200            nfs     intr,hard,rw 0 0
elsrv4:/courses/cs300               /courses/cs300                nfs     intr,hard,rw 0 0



               UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science          8
NFS Example




  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   9
URLs Viewed as File System
    Uniform Resource Locator names


    increasingly standard way to access data

    protocol://machine/path/to/file


    Good? Bad?


    Looks like Windows… same?





      UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   10
Distributed File Systems: Issues
    Naming & transparency


    Remote file access & caching


    Server with state or without


    Replication





      UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   11
Remote File Access & Caching

    Can access files two ways


        Remotely: returns results using RPC
    

        Locally: transfer part of file = caching
    




    Caching issues:


        Performance: Where & when to cache file
    

        blocks?
        Correctness:
    

             When to propagate updates back to remote file?
         

             What happens when multiple clients cache same file?
         



        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   12
Remote File Caching
    Local disk:

        Reduces access time (compared to remote)
    
        Safe if node fails
    
        Difficult to keep copy consistent with remote file
    –
        Requires client to have disk (…)
    –


    Local memory:

        Quick
    
        Works without disks
    
        Difficult to keep copy consistent with remote file
    –
        Smaller cache size
    –
        Not fault-tolerant
    –




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   13
Cache Update Policies
    Write-through: always write to remote disk


        Reliable
    

        Low-performance = remote service for all writes
    –



    Write-back: write only to cache


        Write to disk on evictions, periodic sync
    

        Quick
    

        Reduces network traffic (n writes to same block)
    

        User machine crashes ) data loss
    –




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   14
Cache Consistency
    Client-initiated consistency:

    client contacts server and checks consistency
        every access
    

        at given intervals
    

        only upon opening a file
    



    Server-initiated consistency:

    server detects potential conflicts,
    invalidates caches
        Server needs to know:
    

              which clients have cached which parts of which files, plus
          

              which clients are readers & which are writers
          




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   15
Case Study: Network File System

    NFS: standard for distributed UNIX file access


        Designed to run on LANs
    

    Nodes: both servers & clients


        Servers have no state = no info about clients
    

    Uses mount protocol to make global name local

        /etc/exports
    

              local names server willing to export
          

        /etc/fstab
    

              global names that local nodes import
          

              global name must be in /etc/exports on server
          




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   16
NFS Implementation
Set of RPC operations for remote file access:
           Directory search, reading directory entries
   

           Manipulating links & directories
   

           Accessing file attributes
   

           Reading/writing files
   




       UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   17
NFS Implementation




   UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   18
The End




  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   19
Global Name Space
    Single name space:


        Examples:
    

              AFS (CMU’s Andrew File System)
          

              Sprite (Berkeley)
          


        No matter which node you are on,
    
        filenames remain the same
        Client: gets filename structure from server(s)
    

        When users access files, server sends copies
    
        to workstation, where they are cached



        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   20
Global Name Space: Pros & Cons
    Advantages:


        Naming – consistent
    

        Ensures all files are same regardless of where you
    

        login
        Late binding of names ) moving them is easier
    




    Disadvantages:


        Difficult for OS to keep files consistent (caching)
    

        Global name space may limit flexibility
    

        Performance issues
    




        UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science   21

Mais conteúdo relacionado

Destaque

Dynamic Empowerment Webinar #1--The Power of Goals
Dynamic Empowerment Webinar #1--The Power of GoalsDynamic Empowerment Webinar #1--The Power of Goals
Dynamic Empowerment Webinar #1--The Power of Goals
altonbaird
 

Destaque (14)

BNI 10 Minute Presentation from Supply My School
BNI 10 Minute Presentation from Supply My SchoolBNI 10 Minute Presentation from Supply My School
BNI 10 Minute Presentation from Supply My School
 
O Melhor do Direito:Material de Assimilação - Lei 4.717
O Melhor do Direito:Material de Assimilação - Lei 4.717O Melhor do Direito:Material de Assimilação - Lei 4.717
O Melhor do Direito:Material de Assimilação - Lei 4.717
 
Cascalog workshop
Cascalog workshopCascalog workshop
Cascalog workshop
 
Leccion i persona_y_organizacion
Leccion i persona_y_organizacionLeccion i persona_y_organizacion
Leccion i persona_y_organizacion
 
مراجعة الصف الثانى الاعدادى
مراجعة الصف الثانى الاعدادىمراجعة الصف الثانى الاعدادى
مراجعة الصف الثانى الاعدادى
 
Week 2: Setting up your Account
Week 2: Setting up your AccountWeek 2: Setting up your Account
Week 2: Setting up your Account
 
La auténtica felicidad alicia hp
La  auténtica felicidad alicia hpLa  auténtica felicidad alicia hp
La auténtica felicidad alicia hp
 
Chistesvarios8
Chistesvarios8Chistesvarios8
Chistesvarios8
 
GANGA
GANGAGANGA
GANGA
 
2012 DuPage Environmental Summit
2012 DuPage Environmental Summit2012 DuPage Environmental Summit
2012 DuPage Environmental Summit
 
TUTORIAL DE NETVIBES
TUTORIAL DE NETVIBESTUTORIAL DE NETVIBES
TUTORIAL DE NETVIBES
 
BRI International
BRI InternationalBRI International
BRI International
 
Disueña tu profesión. Disueña tu barrio. Disueña tu vida
Disueña tu profesión. Disueña tu barrio. Disueña tu vidaDisueña tu profesión. Disueña tu barrio. Disueña tu vida
Disueña tu profesión. Disueña tu barrio. Disueña tu vida
 
Dynamic Empowerment Webinar #1--The Power of Goals
Dynamic Empowerment Webinar #1--The Power of GoalsDynamic Empowerment Webinar #1--The Power of Goals
Dynamic Empowerment Webinar #1--The Power of Goals
 

Semelhante a Operating Systems - Advanced File Systems

Distributed Caching Essential Lessons (Ts 1402)
Distributed Caching   Essential Lessons (Ts 1402)Distributed Caching   Essential Lessons (Ts 1402)
Distributed Caching Essential Lessons (Ts 1402)
Yury Kaliaha
 

Semelhante a Operating Systems - Advanced File Systems (20)

Operating Systems - Virtual Memory
Operating Systems - Virtual MemoryOperating Systems - Virtual Memory
Operating Systems - Virtual Memory
 
Operating Systems - Introduction
Operating Systems - IntroductionOperating Systems - Introduction
Operating Systems - Introduction
 
INFLOW-2014-NVM-Compression
INFLOW-2014-NVM-CompressionINFLOW-2014-NVM-Compression
INFLOW-2014-NVM-Compression
 
Docker bdxio
Docker bdxioDocker bdxio
Docker bdxio
 
Operating Systems - Networks
Operating Systems - NetworksOperating Systems - Networks
Operating Systems - Networks
 
Coerced Cache Eviction: Dealing with Misbehaving Disks through Discreet-Mode ...
Coerced Cache Eviction: Dealing with Misbehaving Disks through Discreet-Mode ...Coerced Cache Eviction: Dealing with Misbehaving Disks through Discreet-Mode ...
Coerced Cache Eviction: Dealing with Misbehaving Disks through Discreet-Mode ...
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Chapter-5-DFS.ppt
Chapter-5-DFS.pptChapter-5-DFS.ppt
Chapter-5-DFS.ppt
 
LCFS - Storage Driver for Docker
LCFS - Storage Driver for DockerLCFS - Storage Driver for Docker
LCFS - Storage Driver for Docker
 
Evergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival Skills
 
Digital Nightmares - The Biggest Performance Killers in Your Environment
Digital Nightmares - The Biggest Performance Killers in Your EnvironmentDigital Nightmares - The Biggest Performance Killers in Your Environment
Digital Nightmares - The Biggest Performance Killers in Your Environment
 
Lowest Storage Cost per Desktop with NetApp without any Tradeoffs
Lowest Storage Cost per Desktop with NetApp without any TradeoffsLowest Storage Cost per Desktop with NetApp without any Tradeoffs
Lowest Storage Cost per Desktop with NetApp without any Tradeoffs
 
HDFS Architecture
HDFS ArchitectureHDFS Architecture
HDFS Architecture
 
Hdfs Dhruba
Hdfs DhrubaHdfs Dhruba
Hdfs Dhruba
 
The Syncables Framework
The Syncables FrameworkThe Syncables Framework
The Syncables Framework
 
운영체제론 Ch17
운영체제론 Ch17운영체제론 Ch17
운영체제론 Ch17
 
NVMe over Fabric
NVMe over FabricNVMe over Fabric
NVMe over Fabric
 
Distributed Caching Essential Lessons (Ts 1402)
Distributed Caching   Essential Lessons (Ts 1402)Distributed Caching   Essential Lessons (Ts 1402)
Distributed Caching Essential Lessons (Ts 1402)
 
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
 
Integrating Apple Macs Using Novell Technologies
Integrating Apple Macs Using Novell TechnologiesIntegrating Apple Macs Using Novell Technologies
Integrating Apple Macs Using Novell Technologies
 

Mais de Emery Berger

Dthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic MultithreadingDthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic Multithreading
Emery Berger
 
Programming with People
Programming with PeopleProgramming with People
Programming with People
Emery Berger
 
Stabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance EvaluationStabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance Evaluation
Emery Berger
 
Operating Systems - Queuing Systems
Operating Systems - Queuing SystemsOperating Systems - Queuing Systems
Operating Systems - Queuing Systems
Emery Berger
 
Operating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel ComputingOperating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel Computing
Emery Berger
 
Operating Systems - Concurrency
Operating Systems - ConcurrencyOperating Systems - Concurrency
Operating Systems - Concurrency
Emery Berger
 
Operating Systems - Advanced Synchronization
Operating Systems - Advanced SynchronizationOperating Systems - Advanced Synchronization
Operating Systems - Advanced Synchronization
Emery Berger
 

Mais de Emery Berger (20)

Doppio: Breaking the Browser Language Barrier
Doppio: Breaking the Browser Language BarrierDoppio: Breaking the Browser Language Barrier
Doppio: Breaking the Browser Language Barrier
 
Dthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic MultithreadingDthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic Multithreading
 
Programming with People
Programming with PeopleProgramming with People
Programming with People
 
Stabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance EvaluationStabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance Evaluation
 
DieHarder (CCS 2010, WOOT 2011)
DieHarder (CCS 2010, WOOT 2011)DieHarder (CCS 2010, WOOT 2011)
DieHarder (CCS 2010, WOOT 2011)
 
Operating Systems - Queuing Systems
Operating Systems - Queuing SystemsOperating Systems - Queuing Systems
Operating Systems - Queuing Systems
 
Operating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel ComputingOperating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel Computing
 
Operating Systems - Concurrency
Operating Systems - ConcurrencyOperating Systems - Concurrency
Operating Systems - Concurrency
 
Operating Systems - Advanced Synchronization
Operating Systems - Advanced SynchronizationOperating Systems - Advanced Synchronization
Operating Systems - Advanced Synchronization
 
Operating Systems - Synchronization
Operating Systems - SynchronizationOperating Systems - Synchronization
Operating Systems - Synchronization
 
Processes and Threads
Processes and ThreadsProcesses and Threads
Processes and Threads
 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and Paging
 
MC2: High-Performance Garbage Collection for Memory-Constrained Environments
MC2: High-Performance Garbage Collection for Memory-Constrained EnvironmentsMC2: High-Performance Garbage Collection for Memory-Constrained Environments
MC2: High-Performance Garbage Collection for Memory-Constrained Environments
 
Vam: A Locality-Improving Dynamic Memory Allocator
Vam: A Locality-Improving Dynamic Memory AllocatorVam: A Locality-Improving Dynamic Memory Allocator
Vam: A Locality-Improving Dynamic Memory Allocator
 
Quantifying the Performance of Garbage Collection vs. Explicit Memory Management
Quantifying the Performance of Garbage Collection vs. Explicit Memory ManagementQuantifying the Performance of Garbage Collection vs. Explicit Memory Management
Quantifying the Performance of Garbage Collection vs. Explicit Memory Management
 
Garbage Collection without Paging
Garbage Collection without PagingGarbage Collection without Paging
Garbage Collection without Paging
 
DieHard: Probabilistic Memory Safety for Unsafe Languages
DieHard: Probabilistic Memory Safety for Unsafe LanguagesDieHard: Probabilistic Memory Safety for Unsafe Languages
DieHard: Probabilistic Memory Safety for Unsafe Languages
 
Exterminator: Automatically Correcting Memory Errors with High Probability
Exterminator: Automatically Correcting Memory Errors with High ProbabilityExterminator: Automatically Correcting Memory Errors with High Probability
Exterminator: Automatically Correcting Memory Errors with High Probability
 
Operating Systems - Dynamic Memory Management
Operating Systems - Dynamic Memory ManagementOperating Systems - Dynamic Memory Management
Operating Systems - Dynamic Memory Management
 
Operating Systems - Architecture
Operating Systems - ArchitectureOperating Systems - Architecture
Operating Systems - Architecture
 

Último

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Operating Systems - Advanced File Systems

  • 1. Operating Systems CMPSCI 377 Distributed File Systems Emery Berger University of Massachusetts Amherst UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science
  • 2. Distributed File Systems Numerous drawbacks of local file systems:  Inconvenient  Administrative overhead  Single point-of-failure  Solution: distributed file systems  FS appears to be local, but data is remote  Two major implementations:  Windows  NFS (Sun’s Network File System)  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 2
  • 3. Complications Distributed file systems add complexity  & many design tradeoffs Naming – absolute vs. relative (to server)  Remote access vs. caching  Stateless or stateful server  Single image or replication  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 3
  • 4. Naming & Transparency Issues  How are files named?  Do filenames reveal location?  Do filenames change if file moves?  Do filenames change if user moves?  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 4
  • 5. Location naming Location transparency:  filename does not reveal physical storage location Normal in Unix  Compare to Windows - C:foobar  Provides location independence:  no change if file’s storage location changes UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 5
  • 6. Windows: Absolute Names lokihomeemery machine nameremote pathname Advantages: Disadvantages:   Easy to find fully User must know   specified filename complete name – local & remote Easy to add & delete  different new names Location dependent No global state   (cannot move file) Scales easily  Makes sharing harder  Not fault-tolerant  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 6
  • 7. NFS: Relative Names /nfs/sting/users1/emery Advantages: Disadvantages:   Location  Admin  transparent overhead Remote name  can change across reboots UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 7
  • 8. NFS: Relative Names /courses/cs300/cs377 Implemented via mount points  one level of indirection!  Each host: local names ! remote locations  Mount table (/etc/fstab)  <remote pathname @ machine, local pathname>  % cat /etc/fstab elsrv4:/courses /courses nfs intr,hard,rw 0 0 elsrv4:/courses/cs100_200 /courses/cs100_200 nfs intr,hard,rw 0 0 elsrv4:/courses/cs300 /courses/cs300 nfs intr,hard,rw 0 0 UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 8
  • 9. NFS Example UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 9
  • 10. URLs Viewed as File System Uniform Resource Locator names  increasingly standard way to access data protocol://machine/path/to/file Good? Bad?  Looks like Windows… same?  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 10
  • 11. Distributed File Systems: Issues Naming & transparency  Remote file access & caching  Server with state or without  Replication  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 11
  • 12. Remote File Access & Caching Can access files two ways  Remotely: returns results using RPC  Locally: transfer part of file = caching  Caching issues:  Performance: Where & when to cache file  blocks? Correctness:  When to propagate updates back to remote file?  What happens when multiple clients cache same file?  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 12
  • 13. Remote File Caching Local disk:  Reduces access time (compared to remote)  Safe if node fails  Difficult to keep copy consistent with remote file – Requires client to have disk (…) – Local memory:  Quick  Works without disks  Difficult to keep copy consistent with remote file – Smaller cache size – Not fault-tolerant – UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 13
  • 14. Cache Update Policies Write-through: always write to remote disk  Reliable  Low-performance = remote service for all writes – Write-back: write only to cache  Write to disk on evictions, periodic sync  Quick  Reduces network traffic (n writes to same block)  User machine crashes ) data loss – UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 14
  • 15. Cache Consistency Client-initiated consistency:  client contacts server and checks consistency every access  at given intervals  only upon opening a file  Server-initiated consistency:  server detects potential conflicts, invalidates caches Server needs to know:  which clients have cached which parts of which files, plus  which clients are readers & which are writers  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 15
  • 16. Case Study: Network File System NFS: standard for distributed UNIX file access  Designed to run on LANs  Nodes: both servers & clients  Servers have no state = no info about clients  Uses mount protocol to make global name local  /etc/exports  local names server willing to export  /etc/fstab  global names that local nodes import  global name must be in /etc/exports on server  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 16
  • 17. NFS Implementation Set of RPC operations for remote file access: Directory search, reading directory entries  Manipulating links & directories  Accessing file attributes  Reading/writing files  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 17
  • 18. NFS Implementation UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 18
  • 19. The End UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 19
  • 20. Global Name Space Single name space:  Examples:  AFS (CMU’s Andrew File System)  Sprite (Berkeley)  No matter which node you are on,  filenames remain the same Client: gets filename structure from server(s)  When users access files, server sends copies  to workstation, where they are cached UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 20
  • 21. Global Name Space: Pros & Cons Advantages:  Naming – consistent  Ensures all files are same regardless of where you  login Late binding of names ) moving them is easier  Disadvantages:  Difficult for OS to keep files consistent (caching)  Global name space may limit flexibility  Performance issues  UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science 21