OSProject2 - COP5615 Operating System Principles Fall 2007...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
COP5615 Operating System Principles Fall 2007 Project 2 Date Assigned: September 20, 2007 Date Due: October 4, 2007 Introduction: In this project we will develop a distributed client/server implementation of the Concurrent Readers and Exclusive Writer (CREW) . The implementation will consist of a server that maintains a shared object (an integer variable) for read and write accesses and several reader/writer clients on remote machines communicating with the server using socket on TCP/IP protocol suite. The readers and writers are distributed processes running independently on various CISE machines. Recall that the definition of the writer preference CREW is: An arriving reader must wait if there is an active writer or waiting writer(s). When a writer client completes its writing and there are both waiting readers and writers, we always choose a writer client next, and it is in the FCFS order among the waiting writers. If there is no waiting writer, all waiting readers would be allowed to join the access concurrently. Please notice that notify() wakes up only one arbitrary thread and notifyAll() does not guarantee any ordering of the thread requests. The definition of the socket is: A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent and the socket API allows application programs to communicate remotely over the Internet using the concept of ports in the transport layer as service access points. A socket is analogous to a file (an example of transparency) and is used very much like a file. Its send/receive primitives correspond to the write/read operations in a file system. In this project, we will use sockets over TCP/IP. In TCP/IP protocol suite there are two transport layer protocols, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). TCP provides connection-oriented, reliable, and ordered delivery of packets. UDP is a best-effort connectionless protocol, which requires no connection establishment between communicating hosts. The distinction also exists in the higher layer (socket abstraction), which uses these protocols. We will use TCP in this project. Problem Details : This project requires three programs that run on different machines. They are the server with resources to be accessed by writer clients and reader clients and the client (reader and writer) programs. In addition to these programs we need a configuration file that provides information about the overall system.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
More about the socket communication: http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html http://en.wikipedia.org/wiki/Berkeley_sockets System Configuration The system configuration (with a sample port number, 49053) shown below is in the system.properties file to be read by your program. RW.server=sand.cise.ufl.edu
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

OSProject2 - COP5615 Operating System Principles Fall 2007...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online