Assignment5 - CSci4061 Programming Assignment 5...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSci4061 Programming Assignment 5 Specification Socket Programming and Performance Evaluation Due at 10pm on 5th May 2010 1 Overview For Lab 5, you will implement the socket (HTTP and file versions) functions we gave to you in the form of object files in Lab4. You will write these functions using UNIX Sockets in C. Also, you will compare the performance of your file-version-program when using different numbers of threads and different cache replacement techniques. For this lab, you may disable the prefetcher threads. 2 Socket Programming / Function Implementation In this lab, you will demonstrate your ability to use network sockets in C. To do this, you will implement the routines that we provided to you in the previous lab. You should use your own code for Lab 4 as the starting point. If you could not get this working, you may use the lab 4 solution. The functions you will implement are: init , accept connection , get request , return result and return error (for the latter two, we will help you with the simple HTTP headers that you need, given below). You may find the function fdopen handy in turning a regular file descriptor into a FILE stream object (this will allow easy high-level standard I/O operations on the socket). You should also set the server socket to allow port reuse as discussed in class. In addition, you will implement another cache replacement policy called least recently used (LRU). LRU replaces the cache entry that was the least recently used, as the name implies. For example, if the cache size is 3, and requests come in for pages A A A B C B and then a request...
View Full Document

This note was uploaded on 10/21/2011 for the course CSCI 4061 taught by Professor Tripathi during the Spring '08 term at Minnesota.

Page1 / 3

Assignment5 - CSci4061 Programming Assignment 5...

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

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