Remote Files Traditional Memory Interfaces Process Primary Memory

  • Slides: 17
Download presentation
Remote Files

Remote Files

Traditional Memory Interfaces Process Primary Memory Interface Secondary Memory Interface Virtual Memory File Management

Traditional Memory Interfaces Process Primary Memory Interface Secondary Memory Interface Virtual Memory File Management Device Interface Physical Memory Storage Devices

Multics Segmented Memory Process Primary Memory Interface Secondary Memory Interface Segmented Virtual Memory File

Multics Segmented Memory Process Primary Memory Interface Secondary Memory Interface Segmented Virtual Memory File Management Device Interface Physical Memory Storage Devices Normal data flow Alternative data flow

Explicit File Copying • Need a way for a process on one machine to

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

Remote Secondary Memory Process Secondary Memory Interface File Management Client Interface to Remote Store

Remote Secondary Memory Process Secondary Memory Interface File Management Client Interface to Remote Store Device Interface Storage Devices Comm Network

Refined View Client Machine Process Secondary Memory Interface File Management • Clients & server

Refined View Client Machine Process Secondary Memory Interface File Management • Clients & server jointly implement file manager • Disk storage is at a shared server • Copy file contents to clients as needed Server Machine Remote Secondary Storage Remote Access Storage Devices Comm Network Storage Devices

Remote Disk Server Client Machine file mgr: disk. Request(details); VDD: Pack parameters; (waiting for

Remote Disk Server Client Machine file mgr: disk. Request(details); VDD: Pack parameters; (waiting for a request) VDD: Send request; RDA: Unpack parameters; (wait for response) RDA: Generate local disk request; (waiting) VDD: Receive reply; RDA: Generate reply; VDD: Unpack parameters; RDA: Send reply VDD: Return to file mgr (waiting for a request) General File Management Server Machine Virtual Disk Driver Storage Devices Remote Disk Application Comm Network Storage Devices

Exploiting Remote Disks • • Diskless UNIX workstation X Terminal Network computer (“thin client”)

Exploiting Remote Disks • • Diskless UNIX workstation X Terminal Network computer (“thin client”) Palmtops and PDAs

Performance & Reliability • Became commercially feasible in about 1986 • Biggest concern was

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?

Reliable Command Execution • Using request time-outs – Issue command – Wait for a

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

Crash Recovery • Distributed state – – Client’s view of open files Server’s view

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

Remote File Server • Read/write management • Pack/unpack byte stream • Buffering • .

Remote File Server • Read/write management • Pack/unpack byte stream • Buffering • . . . Client Machine General File Management Server Machine Client Part of Remote File System Storage Devices • Block management • Buffering • Device management • . . . Server Part of Remote File System Comm Network Storage Devices

Block Caching • Widely used in all file systems • In RFS can buffer

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)

Crash Recovery • Client has a file open and server crashes – Distributed state

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

File-Level Caching • Copy an entire file to the client when it is needed

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

Directories -- Pathnames • Need a path through the internet to host in addition

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

Opening a File Machine R / usr bin … Machine S etc zip /

Opening a File Machine R / usr bin … Machine S etc zip / mt_pt usr mount Machine T s_mnt / usr bin … zip s_hop mount etc t_mnt t_file … etc