not ready

advertisement
Programming Assignment #4
CSCI 4534
Date Assigned: April 12, 2009
Date Due: April 26, 2009
Let your server program act as a memory manager. The memory manager uses a paging scheme
in which pages and frames are of size 256 bytes. Clients request main memory space by sending
to the server the total number of bytes in their logical process. Given a list of free frames, the
server allocates frames for the clients. After clients’ logical space has been mapped to physical
space, the server will be prompted with a client number (must be verified) and a logical address.
The server will respond by calculating the physical address.
Example: Client1 requests memory for its program of size 700 bytes. If the free space list (the list
of free frames) is 5, 3, 0, 1, 2, then Client1 will be allocated frame 5 (for its first 256 bytes),
frame 3 (for its next 256 bytes) and frame 0 (for its final 188 bytes). When prompted for the
physical address for logical address 400, the page table for Client1will be examined. We will
know that the address in question is on page 1 at offset 144, which is loaded in frame 3. Frame 3
begins at location 768, which is (256 * 3). The server calculates the physical address to be 768 +
144.
The server:
The server program accepts memory requests for each of several clients. A page table is
built for each client. The frames assigned to the client are sent back to the client. Pages
are mapped to frames according to a free frame list. For the final check on your program,
please use the following free frame list: 7, 3, 2, 5, 0, 9, 8, 1, 4, 10, 6, 11. The server will
work on a static set of memory allocations as long as the operator wants to continue.
The client:
Each client program sends a memory request to the server program. Each client will
print its memory size and its assigned frames.
Memory Management:
A physical memory of 12 frames should be sufficient.
To be displayed:
The server should print the client number, the logical address, the frame number and the
physical memory
Read me:
Write a Read Me file that gives the user of your program the directions for interacting
with your program.
What to turn in:
 Your CD or thumbdrive; include only your .c files, executable files, or header files.
 A hardcopy of your documented source code listing.
 A hardcopy of output with a recorded session using your input data.
 An estimate and an actual time spent in each of the following phases: design,
implementation and testing.
 A labeled thumb drive containing your necessary files.
 Put the above into a large (9 * 12) clasped envelope.
 Your typed user’s guide, or Read me file.
Download