1 / 24

Remote Files

Remote Files. 16. Traditional Memory Interfaces. Process. Primary Memory Interface. File System Interface. Virtual Memory. Privileged Use Only. File Management. Device Interface. Physical Memory. Storage Devices. Y. Y. Network. Network. Remote Memory. Y. Remote Primary

flint
Download Presentation

Remote Files

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Operating Systems: A Modern Perspective, Chapter 16

  2. Remote Files 16 Operating Systems: A Modern Perspective, Chapter 16

  3. Traditional Memory Interfaces Process Primary Memory Interface File System Interface Virtual Memory Privileged Use Only File Management Device Interface Physical Memory Storage Devices Operating Systems: A Modern Perspective, Chapter 16

  4. Y Y Network Network Remote Memory Y Remote Primary Memory Remote Secondary Memory von Neumann Architecture Operating Systems: A Modern Perspective, Chapter 16

  5. Explicit File Copying • Need a way for a process on one machine to pass info to a process on another machine • Technique • Sender writes a file • User manually copies file to a remote machine • Receiver opens the file and reads it • Very coarse grained • Very high latency Operating Systems: A Modern Perspective, Chapter 16

  6. f1 = open(toPart2, …); while(…){ write(f1. …); } close(f1); f2 = open(toPart2, …); while(…){ read(f1, …); } close(f1); … f2 = open(toPart1, …); while(…){ write(f2. …); } close(f2); f2 = open(toPart1, …); while(…){ read(f2, …); } close(f2); Distributed Computation Using Files Part 1 Part 2 Operating Systems: A Modern Perspective, Chapter 16

  7. Client-Server Manual File Copy 1 get FILE_A Client Process Server Process Copy FILE_A to the client 2 FILE_A Data flow Control flow Operating Systems: A Modern Perspective, Chapter 16

  8. Client Interface to Remote Store Comm Network Using the Secondary Memory Interface for Remote Secondary Memory Process Secondary Memory Interface File Management Device Interface Storage Devices Operating Systems: A Modern Perspective, Chapter 16

  9. VFS-based File Manager Exports OS-specific API File System Independent Part of File Manager Virtual File System Switch Dependent Part of File System A … … Dependent Part of Remote File System Operating Systems: A Modern Perspective, Chapter 16

  10. The Remote File Client and Server Client Machine Process File System Interface File System Dependent Part for Remote Disk/File System File Independent Functions Server Machine File System Dependent Remote File Client Remote File Server Storage Devices Comm Network Storage Devices Operating Systems: A Modern Perspective, Chapter 16

  11. A Shared Remote Disk Server • File descriptor mgmt. • Marshall/unmarshall • Buffering • Block management • … Client Machine File Independent Functions Server Machine Remote File System Dependent Part File System Dependent Part Remote Disk Application Virtual Disk Driver Storage Devices Comm Network Storage Devices Operating Systems: A Modern Perspective, Chapter 16

  12. Remote Disk Server file mgr: diskRequest(details); VDD: Pack parameters; VDD: Send request; (wait for response) (waiting for a request) RDA: Unpack parameters; RDA: Generate local disk request; (waiting) RDA: Generate reply; RDA: Send reply (waiting for a request) VDD: Receive reply; VDD: Unpack parameters; VDD: Return to file mgr Client Machine General File Management Server Machine Virtual Disk Driver Remote Disk Application Storage Devices Comm Network Storage Devices Operating Systems: A Modern Perspective, Chapter 16

  13. Exploiting Remote Disks • Diskless UNIX workstation • X Terminal • Network computer (“thin client”) • WebTV • Palmtops, tablets, PDAs, cell phones, … Operating Systems: A Modern Perspective, Chapter 16

  14. Performance & Reliability • Became commercially feasible in about 1986 • Biggest concern was reliability • Use datagrams for performance • How can the system assure that commands get executed? • If the server crashes: • How can we prevent “incomplete transactions”? • How can the client resume its operation? Operating Systems: A Modern Perspective, Chapter 16

  15. Reliable Command Execution • Using request time-outs • Issue command • Wait for a fixed t • Re-issue the command • Failed command send operation • Re-issue is appropriate • Failed command ACK operation • Is re-issued command appropriate? • Idempotent operations Operating Systems: A Modern Perspective, Chapter 16

  16. Crash Recovery • Distributed state • Client’s view of open files • Server’s view of open files • Distribution  less network traffic • Distribution  recovering state is difficult • Server must have stable memory • Can be built without special hardware, but expensive • Stateless servers • All state is kept at the client • All operations are idempotent • Stateless server  more network traffic • Stateless server  no server-side state recovery Operating Systems: A Modern Perspective, Chapter 16

  17. Another Partition of the File Manager Functionality Client Machine File Independent Functions Server Machine • Remote File Server • Device Management • Buffering • Block management • Remote File Client • Marshall/unmarshall • Buffering File System Dependent Part Storage Devices Comm Network Storage Devices Operating Systems: A Modern Perspective, Chapter 16

  18. Block Caching • Widely used in all file systems • In RFS can buffer at: • Server • Doesn’t avoid network latency • Client • Consistency • Sometimes use sequential write consistency (no sharing if there are multiple writers) Operating Systems: A Modern Perspective, Chapter 16

  19. Crash Recovery • Client has a file open and server crashes • Distributed state makes recovery difficult • Can counteract with a stateless server • But it requires that state be transmitted with every service request • Recovery-oriented file service, e.g., Sun NFS • Performance-oriented file service Operating Systems: A Modern Perspective, Chapter 16

  20. Buffering in a Remote File System Client Part of File Service Server Part of File Service Disk Block Disk Block Disk Block Disk Block Read Write Read Write Operating Systems: A Modern Perspective, Chapter 16

  21. File-Level Caching • Copy an entire file to the client when it is needed • Requires enough client storage to hold any file • Widely-used in contemporary palmtops • File Consistency • Synchronization on any file write operation • Immutable files Operating Systems: A Modern Perspective, Chapter 16

  22. Directories -- Pathnames • Need a path through the internet to host in addition to path from root at the host • goober:/usr/bernie/good/stuff • /../goober/usr/bernie/good/stuff • Remote mounting • Mount a file system on a remote host (use a superpathname to reference server) • Use normal path names Operating Systems: A Modern Perspective, Chapter 16

  23. A Remotely Mounted File System Machine R / Machine S … usr bin etc / zip mt_pt … usr bin etc mount s_mnt s_hop Operating Systems: A Modern Perspective, Chapter 16

  24. Opening a File Machine R / Machine S … usr bin etc / zip mt_pt … usr bin etc Machine T mount s_mnt / s_hop mount … usr bin etc zip t_mnt t_file Operating Systems: A Modern Perspective, Chapter 16

More Related