CS 417 Exam info

The final exam will be held in our regular classroom on Monday, December 17, 2018 from 8:00-10:00pm.

Please be sure to arrive on time and bring your ID! The exam is cumulative. Expect it to be similar to the mid-semester exams: mostly multiple choice questions, although there may be a few short-answer questions added. The length will be comparable to the mid-semester exams as well.

Remember that the final is optional and will only serve to displace a lower normalized grade on one of the three exams. It will not make up for poor performance on quizzes or assignments. If you have missed a mid-semester exam, you must take the final in order to pass the course..

Exam rules

Be sure to arrive on time. If you arrive after the exam starts, you will not be allowed to take it.

This will be a closed book, closed notes exam. Calculators, phones, augmented reality glasses, laptops, and tablets are neither needed nor permitted. If you have these devices, you must turn them off, put them out of sight, and not access them for the duration of the exam.

No other electronic devices are permitted except for hearing aids, pacemakers, electronic nerve stimulators, other implanted medical devices, or electronic watches that function only as timekeeping devices or chronographs.

Bring a couple of pens or pencils with you. The exam will be scanned, so use a pen only if you are supremely confident in not changing your mind. An extra pencil is affordable fault tolerance. If you want to splurge, the Palomino Blackwing 602 is considered by many to be one of the finest pencils available. The company advertises its key virtue as "half the pressure, twice the speed." If that claim is really true, using this product might help you complete the exam quicker. If you do not choose bring several extra pencils, you may want to bring a pencil sharpener. Palamino makes a companion Blackwing Long Point Sharpener. This, too, is pricey at $11.00. For a bit less money, you can get what looks like a clone: the Alvin Kum Long Point Pencil Sharpener. Both of these feature two-step sharpening: one for the wood case and another for the graphite core of the pencil. A truly beautiful sharpener is the El Casco Pencil Sharpener, but bringing this to class is really overkill, as is spending over $300 on a pencil sharpener. If you would like to learn the craft of pencil sharpening, there are several books available. The best of these may be How to Sharpen Pencils: A Practical & Theoretical Treatise on the Artisanal Craft of Pencil Sharpening for Writers, Artists, Contractors, Flange Turners, Anglesmiths, & Civil Servants by David Rees. Do not be intimidated by the omission of "students" in the title. You can read more about it at artisinalpencilsharpening.com. A video by David Rees is here. You are welcome to bring a full pencil sharpening travel kit to the exam but be aware that a proper sharpening routine may consume too much time during the exam and may be messy.

Past exams

You can use my recent exams as a guide to what this exam may look like. The questions should be similar to any of those from past mid-semester exams.

Get past 417 exams here.

Study guide

You are responsible for all the material since the start of the semester.

The a study guide is a concatenation of the previous three study guides and attempts to cover most of the material you should know. It is not a substitute for the lectures, lecture material, and other reading matter. My goal is to put most of the information you need to know in as concise a form as possible.

Topics

Topics that you should know and may be on the exam include:

Introductory material

  • Moore's law
  • Metcalfe's law
  • Distributed system
  • Single system image
  • Classification: Flynn's and beyond
    • Flynn's taxonomy: SISD, SIMD, MIMD
    • Multiprocessors vs. multicomputers (networks of computers)
  • Fault tolerance
    • Partial failure
    • Fault tolerance definition
    • Redundancy
    • Recoverability
    • Availability
    • Reliability
    • Types of faults
      • Fail-stop faults
      • Fail-restart faults
      • Omission faults
      • Timing faults
      • Partition faults
      • Byzantine failure
    • Single point of failure
  • Latency: synchronous, asynchronous, and partially synchronous transmission modes
  • State, replicas, caches
  • Transparency goals (very high-level understanding)
    • Location
    • Migration
    • Replication
    • Concurrency
  • Service models
    • Centralized
    • Client-server
    • Multi-tier (how does it compare with layered architectures?)
    • Peer-to-peer
    • Hybrid

Networking

  • Infrastructure sharing
    • Multiple access problem
    • Circuit switching vs. packet switching
  • Data Link Layer
    • Local Area Network (LAN)
    • Ethernet - service guarantees
    • Advantages of a switch over a hub
  • Network Layer
    • Internet Protocol (IP)
    • connectionless service
    • IP principles: survivable, decentralized design, routing
    • delivery guarantees
  • Transport Layer: TCP & UDP
    • TCP
      • Understand connection-oriented service, full-duplex connections, reliable & in-order data delivery, flow control, and congestion control
      • Benefits of pipelining, piggybacked acknowledgements, cumulative acknowledgements
    • UDP
      • Understand connectionless service and UDP's delivery guarantees
      • What are advantages of using UDP?
  • Reliable delivery
    • Understand the optimizationso of piggybacked and cumulative acknowledgements
  • Understand the concept of protocols and layering
  • I will not ask you to enumerate the OSI protocol stack but you should understand the functions of the data link, network, transport, and application layers.
  • Clients and servers and services
  • Transport endpoints (ports) vs. network endpoints (addresses)
  • Data link addressing vs. network addressing: MAC address vs IP address
  • Protocol encapsulation concept
    • Ethernet device driver: encapsulate IP within an ethernet packet
    • IP: encapsulates UDP or TCP packets within an IP packet
    • TCP/UDP: encapsulates user data within a TCP or UDP packet
  • Sockets
    • Concept
    • Operations: create, bind, connect, listen, shutdown, communication (know what they do, not what the parameters are)

Remote procedure calls

  • Concept of a remote procedure call (RPC)
  • Language vs. OS construct
  • Stub functions
  • Marshalling
    • Data representation, endianess
    • Pointerless representation
    • Serialization
    • Pass by reference
    • Explicit versus implicit typing
  • Semantics of remote procedure calls
    • Failure of RPCs
    • at most once and at least once semantics
  • Interface definition language (or notation) – purpose
  • Purpose of an RPC compiler
  • Purpose of an RPC name service

Remote procedure calls: case studies

  • Sun (ONC) RPC
    • Service registration and discovery (portmapper)
    • Need for Interface definition language, IDL
    • Need for RPC compiler, rpcgen
    • Need for versioning
  • DCE RPC (improvements over SUN RPC)
    • Cells and cell directory server
    • Unique universal ID: UUID
    • DCE Network Data Representation: multi-canonical data representation
  • Microsoft COM+/DCOM/ORPC: high-level concepts
    • Object RPC (ORPC): add interface pointer identifier to DCE RPC
    • Build local COM object that uses ORPC to talk to server
    • Surrogate process (loads objects at server)
    • Marshaling: DCE Network Data Representation
    • garbage collection: remote reference counting and pinging
  • Java RMI (general concepts, service registration and lookup, serialiazable class, remote class)
    • rmiregistry
    • Remote interface (for remote references)
    • Serializable interface (for parameters)
    • Garbage collection in RMI: leasing (dirty/clean)
  • Web services (general concepts)
    • Documents and document exchange
    • What is a Service Oriented Architecture
    • XML-RPC and SOAP (very general concepts)
    • SOAP & WSDL: what is the role of WSDL?
    • I will not ask about the Windows Communication Framework
    • REST (general concepts)
    • Marshaling only: Google Protocol Buffers and JSON

Clock synchronization

  • What is UTC?
  • Clock drift, offset, and jitter
  • Linear compensation function
  • What's a time server?
  • Cristian's algorithm
    • Understand the goal and formula for Cristian's algorithm
    • Error bounds. Remember that errors are cumulative (additive).
  • Berkeley algorithm
    • Understand the goal and formula for the Berkeley algorithm
    • Role of master and server
    • Fault tolerant average
  • NTP
    • NTP synchronization subnet
    • NTP strata
    • Offset
    • Message delay
    • Jitter
    • You don't need to memorize the NTP(SNTP) formula but be sure to understand how it gives you the same result as Cristian's
    • You don't need to know the symmetric mode NTP algorithms
    • You don't need to know how dispersion and jitter are calculated
    • You don't need to know the NTP message structure or validation tests
  • PTP
    • Goal vs. NTP
    • Role of master
    • What is a best master clock?
    • Don't memorize the formula but understand the reason that there are three messages

Logical clocks

  • Causal vs. concurrent events
  • Lamport's algorithm
    • Goals
    • Happened-before relationship
    • Partial ordering
    • Algorithm
    • Deficiencies
    • Remedy for generating total ordered (unique) timestamps from Lamport timestamps
  • Vector clocks
    • Goals
    • Algorithm
    • Know how to identify concurrent events by comparing timestamps

Group communication

  • I won't ask about anycast
  • Closed vs. open groups; hierarchical groups
  • Don't memorize the list but understand each of these failure modes:
    • Crash failure
    • Omission failure
    • Byzantine failure
    • Partition failure
  • Use of a coordinator
  • Reliability
    • atomic: understand the fault-tolerant nature and the possible need for a persistant log. I will not ask about implementation
    • reliable: understand what it does
      • Positive vs. negative acknowledgements and feedback implosion
    • unreliable
  • Ordering
    • Good vs. bad ordering
    • Sending versus receiving versus delivering messages, hold-back queue
    • Global-time ordered: understand what this means
    • total ordered: understand how to achieve this
    • causal ordered
      • understand what this is
      • precedence vector: understand how to use it
      • understand when to hold back
    • sync ordered: understand what this means
    • Single Source FIFO (SSF): understand how to achieve this
    • unordered multicasts
  • IP multicasting
    • IP class D address – what is its purpose?
    • You don't need to know about ethernet multicast or the mapping between Ethernet and IP addresses
    • Internet Group Management Protocol (IGMP)
      • Purpose (host to edge router)
      • Multicast-aware router
      • Understand the basic protocol
      • You don't need to memorize the distinctions between v1, v2, and v3 of IGMP but know that v2 added a leave message and v3 added the ability to specify the source of a multicast
      • Commands: membership query, membership report, leave group
    • Protocol Independent Multicast (PIM)
      • IGMP vs. PIM
      • PIM Dense Mode multicast: flooding
      • PIM Sparse Mode multicast
      • PIM Dense Mode
        • Flooding
        • Source initiated
        • What is pruning?
      • PIM Sparse Mode
        • Destination initiated
        • Reverse path forwarding
        • What is a rendezvous point?

Virtual Synchrony

  • Faults
    • Fail silent: fail-stop vs. fail-recover
    • Byzantine failures
    • Synchronous vs. asynchronous systems
    • Two-army problem: impossibility of consensus in asynchronous systems
  • How does redundancy help achieve scalability and availability?
  • State machine replication
  • Process group
  • Virtual synchrony
    • Group view
    • View change
    • Group Membership Service
    • State transfer
    • stable vs unstable message
    • flushing messages on a view change

Mutual exclusion

  • Understand properties: safety, liveness, fairness
  • Types: centralized, token-based, contention-based
  • central-server algorithm
  • distributed mutual exclusion algorithms:
    • Token ring
    • Lamport
    • Ricart & Agrawala
    • Understand pros and cons of each

Election algorithms

  • Bully algorithm
  • Ring algorithm
  • Chang and Roberts ring algorithm optimizations (I won't ask you to recite the algorithm but understand what it does)
  • network partitioning problem (split-brain/segmentation)

Consensus

  • Understand consensus requirements
    • Validity
    • Uniform agreement
    • Integrity
    • Termination (= progress)
  • Paxos
    • Goal: fault tolerant consensus algorithm
    • Abortable consensus
    • Quorum
    • Roles: proposer, acceptor, learner
    • Why does electing a leader simplify the role of proposers?
  • Raft (see homework)
    • Leader election: candidate, follower, leader, random timeouts
    • Terms
    • Committing log entries
  • Leasing vs. locking
  • Hierarchical leases

Distributed transactions

  • properties of transactions (ACID)
  • nested transactions: private work spaces, write-ahead logs
  • two-phase commit protocol
    • understand the need for a log
    • what happens in each of the phases?
    • problems if coordinator or participants die
  • three-phase commit protocol
    • precommit
    • coordinator recovery
    • understand the conditions of what happens to the protocol when the coordinator crashes (slide 33)
    • problems with 3PC
  • I will not ask you about Paxos commit
  • Scaling via replication and Brewer's CAP Theorem
    • Consistency
    • Availability
    • Fault tolerance
  • Eventual consistency: BASE approach vs. ACID

Concurrency control

  • Schedules, serial schedule
  • Lock manager
  • Two-phase locking (2PL)
    • What is the purpose? Preserves serializability ("Isolated" in ACID)
    • cascading aborts
  • Strong strict two-phase locking (SS2PL)
  • Separating read and write locks
    • read locks (shared locks), write locks (exclusive locks), commit locks
    • two-version-based concurrency control
    • timestamp ordering
    • Optimistic concurrency control: just the concepts
      • validation phase
      • update phase
      • use of timestamp ordering
      • multiversion concurrency control
        • snapshot isolation
        • use of timestamps

    Distributed deadlock

    • Conditions for deadlock, deadlock resolution
    • Centralized detection
      • Wait-for graph, Global wait-for graph
      • Phantom deadlock (what's meant by this?)
    • Detection: Chandy-Misra-Haas edge chasing algorithm
      • Just the high level: a probe message circulates back to the originator
    • Prevention: wait-die, wound-wait
      • Just the high level: cyclies are prevented because transactions can only wait on older (or younger) resources. I will not ask you to remember which is wait-die (old can only wait on young) or which is wound-wait (young can only wait on old)

    Network Attached Storage

    • File service, file server
    • Service models: remote access vs. upload/downloa
    • Consistency: sequential semantics, session semantics, ambiguous semantics
    • Stateful vs. stateless design
    • Caching considerations
    • Case studies
      • NFS
        • Goals
        • Mounting filesystems, goals of automounter
        • UDP vs TCP transport
        • Directory and file access protocol (don't memorize the list of RPC calls but understand why they exist, what lookup does, why there's no open)
        • Caching
        • Inconsistencies because of caching & validation
        • Know that a user-level lock manager was added to NFS but otherwise don't bother with features of successive versions.
        • Don't memorize features of NFS v4 but know:
          • the protocol is now stateful
          • supports better caching (similar to oplocks)
          • compound RPC support added
      • AFS (versions 1,2)
        • Goals
        • Caching
        • Service model, semantics
        • Cache coherence (callbacks)
      • Coda
        • Goals
        • Replicated volumes
        • Accessible Volume Storage Group
        • Client modification log
        • Resolution
        • Disconnected operation
        • Reintegration
      • DFS (AFS v.3)
        • Goals
        • Token mechanism: don't memorize tokens but understand the goals
      • SMB/CIFS
        • Goals
        • High-level protocol (RPC-like)
        • Caching model: oplocks (don't memorize oplocks but know what their purpose is)
        • Microsoft Dfs: just know that it adds consisten naming, similar to AFS
        • SMB2 – just understand a few concepts that improved performance
          • pipelining
          • credit-based flow control
          • compounding

    Distributed file systems

    • Chubby
      • Purpose: lock manager, name server, and simple file system
      • Architecture of a Chubby cell: master and replicas
      • Named locks
      • Event notification
      • Whole file reads and writes
      • Don't try to memorize the API
      • Client cache consistency
      • Use of Paxos
    • Dropbox
      • Goal
      • How does server traffic load differ from mosts other sites that store data (facebook, twitter, ...)?
      • What's a metadata server (metaserver)?
      • Why was a notification server added? Polling vs. notifications
    • What is a parallel file system?
    • GFS
      • Goal
      • chunkservers - what do they do?
      • master - what does it do?
      • Google cluster environment: colocate computation and data on same set of machines
      • chunk handle
      • operation log
      • why large chunks?
      • replication: data flow vs. control flow
    • HDFS
      • HDFS is practically a clone of GFS. Focus on GFS terminology. If I use any HDFS terminoloyg, I will identify the GFS equivalent
      • NameNode = Master
      • DataNode = Chunkserver
      • blocks = chunks
      • Transaction log = Operation log
      • You do not have to know any of the differences between GFS and HDFS (they're minor)
      • Rack-aware distribution - client tries to read from the closest replica

    Distributed Lookup (Distributed Hash Tables)

    • Purpose: distributed, highly available key-value store
    • Central coordinator
    • Flooding
    • What is an overlay network?
    • Back propagation, time to live
    • Distributed hash table (DHT)
    • What is consistent hashing?
    • Content-Addressable Network
      • Multi-dimensional hashes, zone, node insertion
    • Chord
      • Ring, successor nodes
      • How do finger tables make query routing more efficient?
    • Amazon Dynamo
      • Understand the goal: distributed, highly available key-value store
      • Functional interface: get, put
      • Consistency model for replication (eventually consistent)
      • Goals: incremental scalability, symmetry, decentralization, heterogenous systems
      • Conflict resolution
        • Who does it?
        • Use of vector timestamps for conflict detection
      • Partitioning among multiple nodes
      • What is a virtual node and why are they a good idea?

    Google Cluster Architecture

    • System design goals
    • Colocation of computation and data on same set of machines
    • Areas of scalability: DNS load balancing, web load balancing, index & content partitioning (shards), replication of shards

    MapReduce

    • Master vs. Worker
    • shards
    • Map worker
      • Map function
      • Role of key
      • Intermediate file
      • Partition operation
    • Reduce worker
      • Shuffle and Sort operation
      • Reduce operation
    • How is fault tolerance handled?

    Bigtable

    • Tablets, column families, columns, column family versions
    • Table splitting,
    • master server, tablet servers
    • metadata tablets
    • Memtable, SSTable
    • role of chubby
    • eventual consistency

    Google Spanner

    • Goals of Spanner
    • External consistency
    • Techniques used: two-phase commit, strict two-phase locking, multiversion concurrency control
    • Snapshots
    • TrueTime - why do we need it?
    • Time masters
    • Commit wait
    • Lock-free reading of snapshots

    Bulk Synchronous Parallel & Pregel

    • Bulk Synchronous Parallel (BSP) framework: what is it?
    • What is a superstep?
    • What is a barrier? How does communication work in BSP?
    • What is the purpose of Pregel?
    • Understand that computing is done from the point of view of each vertex
    • What does vote to halt mean?
    • What is a combiner? How does it make messaging more efficient?
    • What is an aggregator? Global state
    • What does it mean to modify the topology of a graph?
    • What does a Pregel master do?
    • What is checkpointing? What happens after the failure of a worker?

    Spark

    • Goal
    • What are Resilient Distributed Data (RDD) sets?
    • Transformations and Actions (you don't need to remember any of them; just know what they are)
    • Cluster manager, Executor, Jobs and Tasks: only understand what they do at a really high level
    • Fault tolerance via recomputation and lazy evaluation

    Content Delivery Networks

    • Flash crowd problem
    • Load balancing, multihoming, mirroring, caching proxies
    • Goals: nearest, available, likely
    • Use and advantages of an caching overlay network in a CDN
    • Mapping system, transport system
    • Mapping system and transport system
    • Use of dynamic DNS for mapping
    • Load shedding
    • CDN benefits: caching, routing, security
    • I will not ask you about Amazon Cloudfront or Limelight

    Clusters

    • Definition, single system image
    • Clustering types: high performance, high availability, load balancing. storage (just the goals)
    • Cluster membership and quorum
    • Cluster interconnect: understand there's an overhead to leaving the rack and to leaving the datacenter
    • System Area Network vs. a Local Area Network
    • Storage in a clustered system: distributed (network) file systems vs. clustered file systems
    • Shared disk, shared nothing, distributed lock manager
    • What is a heartbeat network?
    • Active/active vs. active/passive
    • Failover types: cold, warm, hot; multidirectional, cascading
    • What is a cluster file system? How does it differ from a network (or distributed) file system?
    • What is a storage area network?
    • What is fencing?
    • What are some of the uses of a load balancer?

    Cryptographic systems (just what we covered in class)

    • Types of ciphers:
      • Public key cryptography: use of two keys
      • Symmetric cryptography
        • Purpose of a secret key
        • Impact of key length
      • Difference between public key and symmetric cryptography
    • Key exchange (using third party, Diffie-Hellman, and public keys)
      • Use of public key cryptography for key exchange
      • Diffie-Hellman (know what it is used for and that it relies on a one-way function)
      • What is a Diffie-Hellman common key
      • Know that Diffie-Hellman public and private "keys" are not encryption keys
    • Public key cryptography (how do you use it?)
      • How do you use it for encryption, signatures, and key exchange?
      • Do not memorize any algorithms
    • Hybrid cryptosystem (understand the advantage and how key exchange works)
    • One-way functions (what are they good for?)
    • Hash functions (what are they good for?)
    • Message integrity
      • Message authentication codes versus digital signatures
    • Secure communciation
      • With symmetric cryptography
      • With public key cryptography
      • With a hybrid cryptosystem
        • What is a session key?

    Authentication

    • Multi-factor authentication
      • What are the three factors?
    • Reusable passwords (PAP, password authentication protocol)
      • Hashed passwords, salt
      • Dictionary attacks
    • Challenge handshake authentication protocol (CHAP)
      • Use of a nonce for authentication
      • Shared secret
    • Time-based One-Time Password (TOTP) algorithm
      • Basic concept: password is a function of a shared secret and time of day
    • Public key authentication
      • How does it work? Understand the use of the nonce
      • Digital certificates (don't memorize fields but understand the purpose and how a certificate works)
      • Role of a certification authority (CA)
    • Understand the principles of SSL - it's just a hybrid cryptosystem

    OAuth & OpenID Connect

    • OAuth
      • Purpose of OAuth vs. OpenID Connect
      • Role of service provider and consumer
      • Role of access tokens: an authorization code is sent back via a browser redirect. Since the browser may not be fully trusted, the server uses the code to contact the service provider to get look up the real permission grant and get the access token.
    • OpenID Connect
      • Role of an identity provider
      • Use of HTTP redirection
      • Interaction with OAuth
      • I will not ask you about the protocol