Q: From which two properties can a distributed system be distinguished?
A: LATENCY and the BANDWIDTH of Interprocessor Communication Medium.

Q: Which distributed system has the tightest coupling?
A: Shared Memory Multiprocessor

Q: Why is fault tolerance especially important in distributed systems?
A: 1. Distributed systems have more parts; it is more likely that at least one part has a fault.
A: 2. Penalty for downtime is greater; non-failed processors must continue working even in the presence of faults on other machines.

Q: Which distributed system has got the loosest coupling?
A: Wide Area Network (WAN)

Q: Why are network failures harder to handle than machine crashes?
A: Because they can lead each processor to believe that all other processors have failed.

Q: In a shared memory multiprocessor, what hardware component is the interconnect?
A: Usually a bus.

Q: In an asymmetric multiprocessor, what does the ONE processor do?
A: 1. Fields all interrupts.
A: 2. Handles all system calls.

Q: In terms of context switch rates and system call service, how does the single asymmetric processor perform?
A: 1. Context switch rates are very high.
A: 2. Master becomes the bottleneck for system call service.

Q: What is the difference between a symmetric multiprocessor and an asymmetric multiprocessor?
A: In a symmetric multiprocessor, each processor is as good as any other, whereas asymmetric multiprocessor uses the one MASTER processor.

Q: How does the symmetric multiprocessor perform in terms of system call servicing and context switch rates?
A: Eliminates the system call service bottleneck.
A: Reduced context switch rate.

Q: Why do symmetric multiprocessors reduce context switch rates and system call bottlenecks?
A: Because each processor can field interrupts, and handle system calls.

Q: In shared memory multiprocessors, how is the kernel handled?
A: The processors can share one copy of the kernel.

Q: In shared memory multiprocessors, what does the scheduler need to do?
A: 1. Keep track of multiple running processes.
A: 2. Know which processes to schedule to run together.

Q: In shared memory multiprocessors, how should kernel access to internal data structures be handled?
Q: Which type of SMM does this apply to?
A: They need to be interlocked even when interrupts are off on that processor.
A: This applies to symmetric multiprocessors only.

Q: In distributed memory systems, is the interconnect a bus?
A: Never.

Q: Why would a distributed memory multiprocessor be designed?
A: When the interconnect requires more bandwidth than a bus can supply.

Q: In DMM, what must all processors provide?
A: An Interprocess Communication Mechanism.

Q: In DMM, how should the processors provide operating system services?
A: Either by themselves or through other processors.

Q: In DMM systems, what is the role of the scheduler on each processor?
A: Keep track of only ONE running process

Q: In DMM systems, what must the kernel do for running processes?
A: Optimize the location of each process.
A: i.e. Processes communicating frequently with each other should be located on the same processor or on adjacent processors. May require support for process migration.

Q: What is process migration?
A: When a process is switched from one processor to another in a DMM system.

Q: What does XDR stand for?
A: External Data Representation.

Q: What is XDR?
A: It is a standard way of representing data:
A: It accounts for:
A: 1. word lengths
A: 2. byte ordering
A: 3. floating-point formats etc.

Q: How should the standard (way of representing data) be chosen for LAN?
A: So that most of the conversions are null operations.

Q: Give a brief description as to how a message would be sent on a heterogeneous LAN.
A: 1. Before sending, message is converted to standard format (XDR)
A: 2. Message is sent
A: 3. Receiver converts message to its own format.

Q: What does RPC stand for?
A: Remote Procedure Call

Q: What is RPC?
A: It is a communication mechanism.

Q: What is the purpose of an RPC compiler?
A: 1. Takes a program and a list of procedures.
A: 2. Replaces bodies of procedures with code that translates the argument data structures into XDR
A: 3. Sends them over network.
A: Resulting stubs are for the client.

Q: Where do functions created by the RPC compiler take their arguments?
A: From the network instead of the stack.

Q: What is a workstation?
A: A relatively powerful computer with a multiprogramming operating system.
A: Supports a single individual.
A: [May or may not have its own disk].

Q: What kind of operating system should a workstation have?
A: A multiprogramming operating system.

Q: Does a workstation come with a disk?
A: May or May not come with a disk.

Q: What is a server?
A: A larger machine with disks.
A: Provides services to workstations and other servers through a LAN.
A: Often a workstation without a screen, with more peripheral devices.

Q: What are the three types of workstations? [Just the names]
A: 1. Diskless
A: 2. Dataless
A: 3. Diskful

Q: What is a diskless workstation?
A: Relies on server for all its storage.

Q: What is a dataless workstation?
A: Has a disk, but no user files. Disk holds swap space and the filesystem containing the OS and the utilities.

Q: What is a diskful workstation?
A: Has a disk, part of which stores user files.

Q: Why would workstations without user files be used?
A: Because they are easier to administer.

Q: What is the pitfall of systems with no disk?
A: They require more network bandwidth and server capacity.

Q: What is the aim of a network file system software?
A: To hide physical locations of files, application programs should be able to access remote files the same way as local disk files.

Q: How does the Unix network file system usually work?
A: It allows the mounting of remote file systems on the local machine.

Q: What does RFS stand for?
A: Remote File System

Q: Who developed RFS?
A: AT&T

Q: What does FSS stand for?
A: File System Switch

Q: How does a file system switch work?
A: Every inode contains a file type field, the FSS redirects every file-related system call to the service routine appropriate to the type of the file concerned.

Q: How does RFS use FSS?
A: It introduces a new file type and its set of service routines; these routines share their work with server processes on the remote machine.

Q: What is the notion of transparency?
A: Every system call should work exactly the same on every file, whether local or remote.

Q: Does RFS maintain transparency? When does this fail?
A: Not really, fails with I/O operations if remote machine is down.
A: Because operations on local files do not normally fail, programs have no code to handle this situation.

Q: How is state information used in maintaining transparency?
A: It requires client and server to store information about each other.  When a machine crashes or network malfunctions, this information must be reset to a consistent state.

Q: What kind of things need to be stored in the state information?
A: 1. Which machines are up
A: 2. Which files have been locked by processes on which machines
A: 3. How many times a file has been opened by processes on which machines. etc

Q: Why is Sun's NFS so popular?
A: 1. Portable to other machines and operating systems
A: 3. Uses standard network protocols.

Q: What is a downfall of Sun's NFS?
A: 1. Client has to do more of the work
A: 2. Server may not be able to provide Unix semantics.

Q: Does NFS use state information on clients and servers?
A: No, NFS keeps all state information on the client, and none on the server.

Q: With Sun's NFS, what happens if a server crashes?
A: Clients can continue executing until they require service from the server. Then they retry requests continually until the server comes back up, at which time they proceed as usual.

Q: What is a very important property that must be held by requests in Sun's NFS (especially if a server crashes)?
A: All requests must be idempotent.

Q: Why are idempotent requests necessary in stateless servers?
A: Since the server may carry out a request both before the crash and after recovery.

Q: What is a major problem with NFS?
A: Can lock up the machine while retrying requests. This is annoying if the process that is trying to access the unreachable server is some unimportant background task.

Q: Can a stateless server maintain all of the Unix file semantics? Give an example.
A: No.
A: If a file that is open on a client is removed on the server, then the client's reads will fail. i.e. the file should not be deleted until the client closes it.

Q: How does NFS support file locking?
A: Through a separate, stateful lock daemon that implements its own crash recovery.

Q: An operating system that allows its processes to access remote files the same way as local ones requires what?
A: It's own equivalent to the file system switch.

Q: What is Sun's equivalent to the file system switch?
A: V-Nodes (virtual inodes)

Q: What is a vnode?
A: Sun's equivalent to FSS.

Q: Does an operating system that allows remote processes to access its files need a file system switch? Explain.
A: No. It can provide service through new user-level daemons that accept clients' requests and carry them out.

Q: What is the key to performance in LAN?
A: Cache enough information to reduce the need for accessing blocks on a remote disk as much as possible.

Q: Why is caching on LAN's necessary?
A: Accessing a block on a remote disk is expensive.

Q: What are the mechanisms Unix provides for LAN caching?
A: 1. Buffer cache of client and server
A: 2. Read-Ahead
A: 3. Write Behind.

Q: Why is the block caching mechanism of NFS unacceptable? Under what circumstances is this a problem?
A: Because it requires server intervention on each file block read or written.
A: Causes problems if client/server ratio is too high.
A: >3:1 diskless
A: >15:1 dataless

Q: What does AFS stand for?
A: Andrew File System

Q: What does AFS do?
A: Transfers whole file from the server to the client's disk when the client opens the file. [Unless that file is already cached on that client]

Q: How does AFS help? When does it cause problems?
A: Reduces the server's CPU overhead.
A: Problem: prevents access to files that are too big for the local disk.

Q: What is a pseudo-terminal?
A: Terminal like device connected across a network.

Q: What is meant by remote login?
A: Execution of a shell on a remote machine.

Q: What does remote login require of the system?
A: It requires the system to be able to handle pseudo-terminals.

Q: What does remote execution require of the system?
A: 1. That the program is compiled into the machine language of the remote system
A: 2. Client know the remote machine's names for its programs
A: 3. Only access files visible to the remote machine.

Q: How do administrators use NFS to set up networks? Why is this?
A: So that almost all machines see almost the same set of filesystems.
A: This is so that the remote machine would see the same files as the local machine.

Q: What is the ability to move a running process from one machine to another machine of the same type called?
A: Process Migration.

Q: When does process migration come into play on LAN?
A: After remote execution.

Q: What is involved in process migration?
A: 1. Moving the memory state of a process [SIMPLE]
A: ---->Dump the contents of the address space into a file ("checkpointing")
A: ---->Read the file in on the other machine.
A: 2. Moving kernel state [HARD]

Q: Why is moving the kernel state difficult in process migration?
A: Because it has to move things like shared offsets in the open file table.

Q: What is involved in moving the memory state of a process?
A: 1. Dump the contents of the address space of the process into a file (checkpointing)
A: 2. Reread the contents of the file in from the remote machine.

Q: What is checkpointing?
A: Dumping the contents of an address space of a process into a file.

Q: What is theory of load balancing?
A: Given a group of identical machines, it is wasteful to have some machines overloaded while others are almost idle.

Q: How is load balancing achieved in practice? What must we watch out for when allocating processes to the machine with the least load?
A: Each machine broadcasts its load average every few minutes.
A: One can arrange for new processes to use whichever machine was least loaded at the time.
A: One machine must not be given too many processes at once.

Q: If the load difference between two machines is great enough, what should happen to running processes?
A: Should be migrated from one to the other.

Q: Describe how worms work?
A: 1. Looks for idle machines on a network
A: 2. Copies itself over to them
A: 3. Works in parallel on parts of its job, periodically telling a master process how far along it is and where its outputs are.
A: 4. Vacate its machine after checkpointing when it senses that the machine's owner has returned.

Q: When do worms usually operate?
A: At night.

Q: What is the theory of using worms?
A: Exploiting the idle time of large group of workstations.

Q: In what kind of applications are worms especially effective?
A: Applications requiring huge amounts of computer time.
A: e.g. Ray-tracing graphics, animation

Q: If the clocks on the machines on a LAN are not synchronized what can happen?
A: The modify date of a file can be in the future.

Q: How do machines on a LAN synchronize their clocks?
A: By adjusting the SPEED of the clock temporarily.

Q: Why should clock's not be adjusted by sudden jumps?
A: May lead to time going backward on some machines.

Q: Which protocol adjusts the speed of the clock temporarily for networks?
A: NTP

Q: What kind of things do processors in a network need to agree on?
A: 1. Current Time
A: 2. Best route to machine X etc.

Q: On what theory are algorithms based for reaching agreement in the presence of failures?
A: Byzantine Generals problem.
A: When one third or more of all processors are malfunctioning, agreement cannot be assured.
