CS162 Operating Systems and Systems Programming Lecture 20. Reliability, Transactions Distributed Systems. Recall: File System Caching

Similar documents
November 9 th, 2015 Prof. John Kubiatowicz

Lecture 18: Reliable Storage

Main Points. File System Reliability (part 2) Last Time: File System Reliability. Reliability Approach #1: Careful Ordering 11/26/12

Topics. File Buffer Cache for Performance. What to Cache? COS 318: Operating Systems. File Performance and Reliability

CS162 Operating Systems and Systems Programming Lecture 20. Reliability and Access Control / Distributed Systems

Page 1. CS162 Operating Systems and Systems Programming Lecture 20. Reliability and Access Control / Distributed Systems.

File System Consistency. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Crash Consistency: FSCK and Journaling. Dongkun Shin, SKKU

Concurrency Control & Recovery

CS5460: Operating Systems Lecture 20: File System Reliability

File System Consistency

File Systems: Consistency Issues

JOURNALING FILE SYSTEMS. CS124 Operating Systems Winter , Lecture 26

Transaction Management & Concurrency Control. CS 377: Database Systems

Journaling. CS 161: Lecture 14 4/4/17

EECS 482 Introduction to Operating Systems

Operating Systems. File Systems. Thomas Ropars.

Announcements. Persistence: Crash Consistency

CS162 Operating Systems and Systems Programming Lecture 19. File Systems (Con t), MMAP, Transactions, COW

Chapter 11: File System Implementation. Objectives

Announcements. Persistence: Log-Structured FS (LFS)

Ext3/4 file systems. Don Porter CSE 506

T ransaction Management 4/23/2018 1

Operating Systems. Operating Systems Professor Sina Meraji U of T

Operating Systems. Lecture File system implementation. Master of Computer Science PUF - Hồ Chí Minh 2016/2017

W4118 Operating Systems. Instructor: Junfeng Yang

CS162 Operating Systems and Systems Programming Lecture 20. Reliability and Access Control / Distributed Systems

File Systems II. COMS W4118 Prof. Kaustubh R. Joshi hdp://

CS5412: TRANSACTIONS (I)

CS 318 Principles of Operating Systems

FS Consistency & Journaling

Overview of Transaction Management

Lecture 21: Reliable, High Performance Storage. CSC 469H1F Fall 2006 Angela Demke Brown

ò Very reliable, best-of-breed traditional file system design ò Much like the JOS file system you are building now

Problems Caused by Failures

Concurrency Control & Recovery

Transaction Management Overview

Lectures 8 & 9. Lectures 7 & 8: Transactions

Caching and consistency. Example: a tiny ext2. Example: a tiny ext2. Example: a tiny ext2. 6 blocks, 6 inodes

Intro to Transactions

Chapter 17: Recovery System

Transaction Management. Pearson Education Limited 1995, 2005

Lecture X: Transactions

Last Class Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications

Transactions. 1. Transactions. Goals for this lecture. Today s Lecture

Page 1. CS194-3/CS16x Introduction to Systems. Lecture 8. Database concurrency control, Serializability, conflict serializability, 2PL and strict 2PL

22 File Structure, Disk Scheduling

Transaction Management Overview. Transactions. Concurrency in a DBMS. Chapter 16

System Malfunctions. Implementing Atomicity and Durability. Failures: Crash. Failures: Abort. Log. Failures: Media

Lecture 21: Logging Schemes /645 Database Systems (Fall 2017) Carnegie Mellon University Prof. Andy Pavlo

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

Introduction. Storage Failure Recovery Logging Undo Logging Redo Logging ARIES

CS 537 Fall 2017 Review Session

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

PERSISTENCE: FSCK, JOURNALING. Shivaram Venkataraman CS 537, Spring 2019

FILE SYSTEMS, PART 2. CS124 Operating Systems Fall , Lecture 24

DATABASE TRANSACTIONS. CS121: Relational Databases Fall 2017 Lecture 25

Current Topics in OS Research. So, what s hot?

Page 1. Quiz 18.1: Flow-Control" Goals for Today" Quiz 18.1: Flow-Control" CS162 Operating Systems and Systems Programming Lecture 18 Transactions"

The transaction. Defining properties of transactions. Failures in complex systems propagate. Concurrency Control, Locking, and Recovery

File Systems. Chapter 11, 13 OSPP

What are Transactions? Transaction Management: Introduction (Chap. 16) Major Example: the web app. Concurrent Execution. Web app in execution (CS636)

[537] Journaling. Tyler Harter

CSE 153 Design of Operating Systems

Chapter 17: Recovery System

Failure Classification. Chapter 17: Recovery System. Recovery Algorithms. Storage Structure

Transaction Management: Introduction (Chap. 16)

CSE 451: Operating Systems Winter Module 17 Journaling File Systems

CS 167 Final Exam Solutions

Introduction to Data Management. Lecture #18 (Transactions)

2. PICTURE: Cut and paste from paper

Page 1. Goals for Today" What is a Database " Key Concept: Structured Data" CS162 Operating Systems and Systems Programming Lecture 13.

User Perspective. Module III: System Perspective. Module III: Topics Covered. Module III Overview of Storage Structures, QP, and TM

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Last Class. Today s Class. Faloutsos/Pavlo CMU /615

Lecture 12. Lecture 12: The IO Model & External Sorting

COURSE 1. Database Management Systems

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

DB2 Lecture 10 Concurrency Control

CS 111. Operating Systems Peter Reiher

Lecture S5: Transactions and reliability

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #19: Logging and Recovery 1

COS 318: Operating Systems. Journaling, NFS and WAFL

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Last Class. Faloutsos/Pavlo CMU /615

Advanced file systems: LFS and Soft Updates. Ken Birman (based on slides by Ben Atkin)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

CS122 Lecture 15 Winter Term,

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

What is a file system

Distributed Systems COMP 212. Revision 2 Othon Michail

CS 4284 Systems Capstone

Tricky issues in file systems

Outline. Failure Types

Caching and reliability

Section 11: File Systems and Reliability, Two Phase Commit

CSC 261/461 Database Systems Lecture 20. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101

Consistency and Scalability

XI. Transactions CS Computer App in Business: Databases. Lecture Topics

FILE SYSTEMS, PART 2. CS124 Operating Systems Winter , Lecture 24

Page 1. Goals of Today s Lecture. The ACID properties of Transactions. Transactions

Transcription:

CS162 Operating Systems and Systems Programming Lecture 20 Reliability, Transactions Distributed Systems April 13 th, 2015 Prof. John Kubiatowicz http://cs162.eecs.berkeley.edu Recall: File System Caching Buffer Cache: Memory used to cache kernel resources, including disk blocks and name translations Can contain dirty blocks (blocks yet on disk) Read Ahead Prefetching: fetch sequential blocks early Exploit fact that most common file access is sequential Elevator algorithm can efficiently interleave prefetches from different apps How much to prefetch? It s a balance! Delayed Writes: Writes not immediately sent to disk write() copies data from user space buffer to kernel buffer» Other applications read data from cache instead of disk Flushed to disk periodically (e.g. in UNIX, every 30 sec) Advantages:» Disk scheduler can efficiently order lots of requests» Disk allocation algorithm can be run with correct size value for a file» Some files need never get written to disk! (e..g temporary scratch files written /tmp often don t exist for 30 sec) Disadvantages» What if system crashes before file has been written out?» Worse yet, what if system crashes before a directory file has been written out? (lose pointer to inode!) Lec 20.2 Recall: Important ilities Availability: the probability that the system can accept and process requests Often measured in nines of probability. So, a 99.9% probability is considered 3-nines of availability Key idea here is independence of failures Durability: the ability of a system to recover data despite faults This idea is fault tolerance applied to data Doesn t necessarily imply availability: information on pyramids was very durable, but could not be accessed until discovery of Rosetta Stone Reliability: the ability of a system or component to perform its required functions under stated conditions for a specified period of time (IEEE definition) Usually stronger than simply availability: means that the system is not only up, but also working correctly Includes availability, security, fault tolerance/durability Must make sure data survives system crashes, disk crashes, other problems Lec 20.3 Recall: RAID 5+: High I/O Rate Parity Data stripped across multiple disks Successive blocks stored on successive (non-parity) disks Increased bandwidth D0 D4 D1 D5 D2 D6 D3 P1 P0 D7 over single disk D8 D9 P2 D10 D11 Parity block (in green) constructed by XORing D12 P3 D13 D14 D15 data bocks in stripe P0=D0 D1 D2 D3 P4 D16 D17 D18 D19 Can destroy any one disk and still reconstruct data D20 D21 D22 D23 P5 Suppose D3 fails, then can reconstruct: D3=D0 D1 D2 P0 Disk 1 Disk 2 Disk 3 Disk 4 Disk 5 Raid 6: More powerful code can lose 2 disks of stripe Stripe Unit Increasing Logical Disk Addresses Lec 20.4

File System Reliability What can happen if disk loses power or machine software crashes? Some operations in progress may complete Some operations in progress may be lost Overwrite of a block may only partially complete Having RAID doesn t necessarily protect against all such failures Bit-for-bit protection of bad state? What if one disk of RAID group not written? File system wants durability (as a minimum!) Data previously stored can be retrieved (maybe after some recovery step), regardless of failure Storage Reliability Problem Single logical file operation can involve updates to multiple physical disk blocks inode, indirect block, data block, bitmap, With remapping, single update to physical disk block can require multiple (even lower level) updates At a physical level, operations complete one at a time Want concurrent operations for performance How do we guarantee consistency regardless of when crash occurs? Lec 20.5 Lec 20.6 Threats to Reliability Fast AND Right??? Interrupted Operation Crash or power failure in the middle of a series of related updates may leave stored data in an inconsistent state. e.g.: transfer funds from BofA to Schwab. What if transfer is interrupted after withdrawal and before deposit Loss of stored data Failure of non-volatile storage media may cause previously stored data to disappear or be corrupted The concepts related to transactions appear in many aspects of systems File Systems Data Base systems Reliability Concurrent Programming Example of a powerful, elegant concept simplifying implementation AND achieving better performance. The key is to recognize that the system behavior is viewed from a particular perspective. Properties are met from that perspective Performa e Lec 20.7 Lec 20.8

Reliability Approach #1: Careful Ordering FFS: Create a File Sequence operations in a specific order Careful design to allow sequence to be interrupted safely Post-crash recovery Read data structures to see if there were any operations in progress Clean up/finish as needed Approach taken in FAT, FFS (fsck), and many app-level recovery schemes (e.g., Word) Normal operation: Allocate data block Write data block Allocate inode Write inode block Update bitmap of free blocks Update directory with file name -> file number Update modify time for directory Recovery: Scan inode table If any unlinked files (not in any directory), delete Compare free block bitmap against inode trees Scan directories for missing update/access times Time proportional to size of disk Lec 20.9 Lec 20.10 Normal operation: Write name of each open file to app folder Write changes to backup file Rename backup file to be file (atomic operation provided by file system) Delete list in app folder on clean shutdown Application Level Recovery: On startup, see if any files were left open If so, look for backup file If so, ask user to compare versions Reliability Approach #2: Copy on Write File Layout To update file system, write a new version of the file system containing the update Never update in place Reuse existing unchanged disk blocks Seems expensive! But Updates can be batched Almost all disk writes can occur in parallel Approach taken in network file server appliances (WAFL, ZFS) Lec 20.11 Lec 20.12

Emulating COW @ user level COW integrated with file system Transform file foo to a new version Open/Create a new file foo.v where v is the version # Do all the updates based on the old foo Reading from foo and writing to foo.v Including copying over any unchanged parts Update the link ln f foo foo.v old version new version Does it work? What if multiple updaters at same time? How to keep track of every version of file? Would we want to do that? Write If file represented as a tree of blocks, just need to update the leading fringe Lec 20.13 Lec 20.14 COW with smaller-radix blocks ZFS old version new version Write If file represented as a tree of blocks, just need to update the leading fringe Variable sized blocks: 512 B 128 KB Symmetric tree Know if it is large or small when we make the copy Store version number with pointers Can create new version by adding blocks and new pointers Buffers a collection of writes before creating a new version with them Free space represented as tree of extents in each block group Delay updates to freespace (in log) and do them all when block group is activated Lec 20.15 Lec 20.16

More General Solutions Transactions for Atomic Updates Ensure that multiple related updates are performed atomically i.e., if a crash occurs in the middle, the state of the systems reflects either all or none of the updates Most modern file systems use transactions internally to update the many pieces Many applications implement their own transactions Redundancy for media failures Redundant representation (error correcting codes) Replication E.g., RAID disks Transactions Closely related to critical sections in manipulating shared data structures Extend concept of atomic update from memory to stable storage Atomically update multiple persistent data structures Like flags for threads, many ad hoc approaches FFS carefully ordered the sequence of updates so that if a crash occurred while manipulating directory or inodes the disk scan on reboot would detect and recover the error, -- fsck Applications use temporary files and rename Lec 20.17 Lec 20.18 Key concept: Transaction Typical Structure An atomic sequence of actions (reads/writes) on a storage system (or database) That takes it from one consistent state to another Begin a transaction get transaction id Do a bunch of updates If any fail along the way, roll-back Or, if any conflicts with other transactions, roll-back Commit the transaction transaction consistent state 1 consistent state 2 Lec 20.19 Lec 20.20

Classic Example: Transaction BEGIN; --BEGIN TRANSACTION UPDATE accounts SET balance = balance - 100.00 WHERE name = 'Alice'; UPDATE branches SET balance = balance - 100.00 WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Alice'); UPDATE accounts SET balance = balance + 100.00 WHERE name = 'Bob'; UPDATE branches SET balance = balance + 100.00 WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Bob'); COMMIT; --COMMIT WORK The ACID properties of Transactions Atomicity: all actions in the transaction happen, or none happen Consistency: transactions maintain data integrity, e.g., Balance cannot be negative Cannot reschedule meeting on February 30 Isolation: execution of one transaction is isolated from that of all others; no problems from concurrency Durability: if a transaction commits, its effects persist despite crashes Transfer $100 from Alice s account to Bob s account Lec 20.21 Lec 20.22 Transactional File Systems Better reliability through use of log All changes are treated as transactions A transaction is committed once it is written to the log» Data forced to disk for reliability» Process can be accelerated with NVRAM Although File system may not be updated immediately, data preserved in the log Difference between Log Structured and Journaled In a Log Structured filesystem, data stays in log form In a Journaled filesystem, Log used for recovery Journaling File System Applies updates to system metadata using transactions (using logs, etc.) Updates to non-directory files (i.e., user stuff) can be done in place (without logs), full logging optional Ex: NTFS, Apple HFS+, Linux XFS, JFS, ext3, ext4 Full Logging File System All updates to disk are done in transactions Lec 20.23 Logging File Systems Instead of modifying data structures on disk directly, write changes to a journal/log Intention list: set of changes we intend to make Log/Journal is append-only Single commit record commits transaction Once changes are in the log, it is safe to apply changes to data structures on disk Recovery can read log to see what changes were intended Can take our time making the changes» As long as new requests consult the log first Once changes are copied, safe to remove log But, If the last atomic action is not done poof all gone Basic assumption: Updates to sectors are atomic and ordered Not necessarily true unless very careful, but key assumption Lec 20.24

Redo Logging Example: Creating a file Prepare Write all changes (in transaction) to log Commit Single disk write to make transaction durable Redo Copy changes to disk Garbage collection Reclaim space in log Recovery Read log Redo any operations for committed transactions Garbage collect log Find free data block(s) Find free inode entry Find dirent insertion point -------------------------- Write map (i.e., mark used) Write inode entry to point to block(s) Write dirent to point to inode Free Space map Data blocks Inode table Directory entries Lec 20.25 Lec 20.26 Ex: Creating a file (as a transaction) ReDo log Find free data block(s) Find free inode entry Find dirent insertion point -------------------------- Write map (used) Write inode entry to point to block(s) Write dirent to point to inode Free Space map Data blocks Inode table Directory entries After Commit All access to file system first looks in log Eventually copy changes to disk Free Space map Data blocks Inode table Directory entries tail head tail tail tail tail tail head done pending start Log in non-volatile storage (Flash or on Disk) commit done start Log in non-volatile storage (Flash) pending commit Lec 20.27 Lec 20.28

Crash during logging - Recover Recovery After Commit Upon recovery scan the long Detect transaction start with no commit Discard log entries Disk remains unchanged Free Space map Data blocks Scan log, find start Find matching commit Redo it as usual Or just let it happen later Free Space map Data blocks Inode table Inode table tail head Directory entries tail Directory entries head done pending start Log in non-volatile storage (Flash or on Disk) done pending start Log in non-volatile storage (Flash or on Disk) commit Lec 20.29 Lec 20.30 What if had already started writing back the transaction? Idempotent the result does not change if the operation is repeat several times. Just write them again during recovery What if the uncommitted transaction was discarded on recovery? Do it again from scratch Nothing on disk was changed Lec 20.31 Lec 20.32

What if we crash again during recovery? Redo Logging Idempotent Just redo whatever part of the log hasn t been garbage collected Prepare Write all changes (in transaction) to log Commit Single disk write to make transaction durable Redo Copy changes to disk Garbage collection Reclaim space in log Recovery Read log Redo any operations for committed transactions Ignore uncommitted ones Garbage collect log Lec 20.33 Lec 20.34 Can we interleave transactions in the log? Back of the Envelope tail pending start head This is a very subtle question The answer is if they are serializable i.e., would be possible to reorder them in series without violating any dependences Deep theory around consistency, serializability, and memory models in the OS, Database, and Architecture fields, respectively A bit more later --- and in the graduate course commit start commit Assume 5 ms average seek+rotation And 100 MB/s transfer 4 KB block =>.04 ms 100 random small create & write Reliabili ty 4 blocks each (free, inode, dirent + data) NO DISK HEAD OPTIMIZATION! = FIFO Must do them in order 100 x 4 x 5 ms = 2 sec Log writes: 5 ms + 400 x 0.04 ms = 6.6 ms Get to respond to the user almost immediately Get to optimize write-backs in the background Group them for sequential, seek optimization What if the data blocks were huge? Perform ance Lec 20.35 Lec 20.36

Performance Log written sequentially Often kept in flash storage Asynchronous write back Any order as long as all changes are logged before commit, and all write backs occur after commit Can process multiple transactions Transaction ID in each log entry Transaction completed its commit record is in log Log head pointer Log head pointer Log: Redo Log Implementation Volatile Memory Pending write backs Persistent Storage Log tail pointer Mixed:... Free Writeback WB Complete Complete Committed Free... Uncommitted older Garbage Collected Eligible for GC In Use Available for New Records newer Lec 20.37 Lec 20.38 Isolation What do we use to prevent interleaving? Process A: move foo from dir x to dir y mv x/foo y/ Process B: grep across a and b grep 162 a/* b/* > log Assuming 162 appears only in foo, what are the possible outcomes of B without transactions? What if x, y and a,b are disjoint? What if x == a and y == b? Must prevent interleaving so as to provide clean semantics. Locks! But here we need to acquire multiple locks We didn t cover it specifically, but wherever we are acquiring multiple locks there is the possibility of deadlock! More on how to avoid that later Lec 20.39 Lec 20.40

Locks in a new form Locks to control access to data Two types of locks: shared (S) lock multiple concurrent transactions allowed to operate on data exclusive (X) lock only one transaction can operate on data at a time Lock Compatibility Matrix S X S X Two-Phase Locking (2PL) 1) Each transaction must obtain: S (shared) or X (exclusive) lock on data before reading, X (exclusive) lock on data before writing 2) A transaction can not request additional locks once it releases any locks Thus, each transaction has a growing phase followed by a shrinking phase Lock Point! Avoid deadlock by acquiring locks in some lexicographic order # Locks Held 4 3 2 1 0 Growing Phase Shrinking Phase 1 3 5 7 9 11 13 15 17 19 Time Lec 20.41 Lec 20.42 Two-Phase Locking (2PL) Transaction Isolation 2PL guarantees that the dependency graph of a schedule is acyclic. For every pair of transactions with a conflicting lock, one acquires it first ordering of those two total ordering. Therefore 2PL-compatible schedules are conflict serializable Note: 2PL can still lead to deadlocks since locks are acquired incrementally. An important variant of 2PL is strict 2PL, where all locks are released at the end of the transaction Prevents a process from seeing results of another transaction that might not commit Easier to recover from aborts Process A: LOCK x, y move foo from dir x to dir y mv x/foo y/ Commit and Release x, y Process B: LOCK x, y and log grep across x and y grep 162 x/* y/* > log Commit and Release x, y, log grep appears either before or after move Need log/recover AND 2PL to get ACID Lec 20.43 Lec 20.44

Serializability With two phase locking and redo logging, transactions appear to occur in a sequential order (serializability) Either: grep then move or move then grep If the operations from different transactions get interleaved in the log, it is because it is OK» 2PL prevents it if serializability would be violated» Typically, because they were independent Other implementations can also provide serializability Optimistic concurrency control: abort any transaction that would conflict with serializability Caveat Most file systems implement a transactional model internally Copy on write Redo logging Most file systems provide a transactional model for individual system calls File rename, move, Most file systems do NOT provide a transactional model for user data Historical artifact? - quite likely Unfamiliar model (other than within OS s and DB s)?» perhaps Lec 20.45 Lec 20.46 Review: Atomicity A transaction might commit after completing all its operations, or it could abort (or be aborted) after executing some operations Atomic Transactions: a user can think of a transaction as always either executing all its operations, or not executing any operations at all Database/storage system logs all actions so that it can undo the actions of aborted transactions 4/13/15 10/27/14 Kubiatowicz cs162 fa14 CS162 L25 UCB Spring 2015 47 Lec 20.47 Lec 20.48

Review: Consistency Data follows integrity constraints (ICs) If database/storage system is consistent before transaction, it will be after System checks ICs and if they fail, the transaction rolls back (i.e., is aborted) A database enforces some ICs, depending on the ICs declared when the data has been created Beyond this, database does not understand the semantics of the data (e.g., it does not understand how the interest on a bank account is computed) Review: Isolation Each transaction executes as if it was running by itself It cannot see the partial results of another transaction Techniques: Pessimistic don t let problems arise in the first place Optimistic assume conflicts are rare, deal with them after they happen Lec 20.49 Lec 20.50 Review: Durability Centralized vs Distributed Systems Data should survive in the presence of System crash Disk crash need backups Server All committed updates and only those updates are reflected in the file system or database Some care must be taken to handle the case of a crash occurring during the recovery process! Lec 20.51 Client/Server Model Peer-to-Peer Model Centralized System: System in which major functions are performed by a single physical computer Originally, everything on single computer Later: client/server model Distributed System: physically separate computers working together on some task Early model: multiple servers working together» Probably in the same room or building» Often called a cluster Later models: peer-to-peer/wide-spread collaboration Lec 20.52

Distributed Systems: Motivation/Issues Why do we want distributed systems? Cheaper and easier to build lots of simple computers Easier to add power incrementally Users can have complete control over some components Collaboration: Much easier for users to collaborate through network resources (such as network file systems) The promise of distributed systems: Higher availability: one machine goes down, use another Better durability: store data in multiple locations More security: each piece easier to make secure Reality has been disappointing Worse availability: depend on every machine being up» Lamport: a distributed system is one where I can t do work because some machine I ve never heard of isn t working! Worse reliability: can lose data if any machine crashes Worse security: anyone in world can break into system Coordination is more difficult Must coordinate multiple copies of shared state information (using only a network) What would be easy in a centralized system becomes a lot more difficult Distributed Systems: Goals/Requirements Transparency: the ability of the system to mask its complexity behind a simple interface Possible transparencies: Location: Can t tell where resources are located Migration: Resources may move without the user knowing Replication: Can t tell how many copies of resource exist Concurrency: Can t tell how many users there are Parallelism: System may speed up large jobs by spliting them into smaller pieces Fault Tolerance: System may hide varoius things that go wrong in the system Transparency and collaboration require some way for different processors to communicate with one another Lec 20.53 Lec 20.54 Networking Definitions Network: physical connection that allows two computers to communicate Packet: unit of transfer, sequence of bits carried over the network Network carries packets from one CPU to another Destination gets interrupt when packet arrives Protocol: agreement between two parties as to how information is to be transmitted Summary Important system properties Availability: how often is the resource available? Durability: how well is data preserved against faults? Reliability: how often is resource performing correctly? RAID: Redundant Arrays of Inexpensive Disks RAID1: mirroring, RAID5: Parity block Use of Log to improve Reliability Journaled file systems such as ext3, NTFS Transactions: ACID semantics Atomicity Consistency Isolation Durability 2-phase Locking First Phase: acquire all locks Second Phase: release locks in opposite order Lec 20.55 Lec 20.56