Operating Systems
CIS*3110 (W12)


Bonus Assignment

Due: April 16, 2012 at noon (no exceptions)
(please see deliverables section below)

Key concepts: Distributed system design and problem solving.


Terms of Bonus Assignment

This is a bonus assignment that is being provided so that the people who are asking for an opportunity to make up marks have the chance to demonstrate that they are serious about the idea.

If you submit this assignment, it will be graded and will be used to replace your lowest existing assignment grade if applicable. Thus these are not "pure bonus" marks that add to whatever you're achiveing in the course, it is a way to make up for a low assignment mark by having it replaced. Note that this assignment is not particularly trivial, and emphasizes design very heavily. If you are serious about making up marks and demonstrating that you have picked up (or are picking up) the skills we've been pushing on your in this course, this is the opportunity to demonstrate that.

Documentation, in this case the detailed design of your system, is the only thing you're turning in, and constitutes all the marks (no implementation). If you are not planning to spend time producing quality documentation and clear design, you will do poorly on this assignment. In order to expect a reasonable mark on this assignment, your design must be sufficiently detailed, complete and well organized that someone could easily implement your solution without further consideration of protocol/design issues.

Note that this assignment involves the design of a library (not a program). This library is responsible for producing some very sophisticated behaviour in a distributed manner, with limited means of tracking global state. Most people will find it challenging, so be aware what you're getting into if you choose to attempt it.

I don't mind having conversations with people related to the bonus assignment; however, due to the timeline of the course and other obligations, it will not be possible to provide a high level of direct support for this assignment.

Read the following sections carefully to ensure that you know what is to be done and what is to be handed in. If the details aren't addressed successfully you will lose marks. Please refer to the coding style guidelines to provide direction regarding the format of the code you write. You are expected to work independently on this assignment (please see academic misconduct in computing for clarification if necessary).


NFS-Socket Library

Consider any "basic" program that uses sockets (such as assignment 3). Note that you need to have good knowledge of the behaviour and functionality of the core function calls (as you're designing something that behaves just like them): socket, bind, listen, accept, connect, select, close, send (or write) and recv (or read). You should make sure you have a very clear understanding of what all these functions do.

The Problem

Imagine you are on a UNIX system on which sockets do not exist (e.g. a highly orthodox clone of System-V) and you have a collection of programs designed to operate on a BSD system with POSIX.1 sockets (such as A3).

Your task is to implement the basic operations on sockets listed below, (and only those operations), i.e. socket, bind, listen connect, accept, select, close, send (write), receive (read), using operations on files as a prerequisite (assume that wherever this code would be run, the same file system is visible consistently to all machines on which you might run it). The semantics of your versions of these operations should be close enough to their original semantics for the example to execute smoothly in the new environment. Note that any similarly constrained BSD-style socket code should work equally as well with this library. Assume the library would be written in the C programming language.

Desgin Guidelines



Deliverables



Last Modified: 2012 / 04 / 10