1 / 2

Operating Systems : Coursework 1

Operating Systems : Coursework 1. Task : To annotate a program which emulates the behaviour of a Distributed Virtual Memory system.

penda
Download Presentation

Operating Systems : Coursework 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exercise 1 Operating Systems : Coursework 1 • Task : To annotate a program which emulates the behaviour of a Distributed Virtual Memory system. • Background : A Distributed Virtual Memory system is one in which a number of networked computers can concurrently execute a program using the same Virtual Address space, shared between them.The motivation is to improve the execution speed of running a program by using more than one processor. In this arrangement, however, the processors are only loosely interconnected, rather than tightly connected as in a dual, 4-way or 8-way etc. processor system, in which the processors are on the same mother board and connected by means of a system bus.This program, running on one machine, emulates the distributed processors by means of a single process for each processor, each of which is forked from a parent process. Sockets are used to interconnect them just as they would be in a real system. System Calls are used to create the control environment which supports the emulation. Threads and signals are used to manage the shared and paged virtual memory space. Pages are `owned’ by one process at a time. If a process causes a the equivalent of a page-fault because it does not currently have access to a page, its environment endeavours to fetch the page from the process which does own it by means of a request and response protocol.The program was written very carefully to ensure that it was correct.Compiling and running the program will help you to understand how it works : • Source Program file : /home/cs3/os/dvme.c • Compilation Command : gcc dvme.c -lpthread -o dvme

  2. Exercise 1 • Details : Most of the comments have been removed from this source file! Your task is to put comments back in to explain how the emulation works in detail, including particularly the page request and response protocol and the ‘barrier synchronisation’ implementation. Why do they have to be as complex as they are? A large comment at the top is probably appropriate to give a general overview of the approach. Other appropriate places for your comments are indicated throughout the source by lines such as // why??You should also include at the beginning brief explanations in your own words of the System Calls that are used (not just copies of ‘man’ pages).You may modify the program in any way you think fit in order to test your theories as to how it works, but what you submit must be an annotated version of the original source file, not your modified version. • Submission : Send your annotated source file to me by email at djr@dcs.ed.ac.uk. Please send it as a straight in-line text message rather than as an attachment. It must include a comment at the top which tells me your name and the location of the source file in your home directory, which you should keep intact. • Deadline : 5pm, Monday 20th November • Warning : Your submission must be entirely your own work.

More Related