ASSIGNMENT
Task 1. SEMAPHORE SOLUTION of the "DINING PHILOSOPHERS" SYNCHRONIZATION TASK in SELF DEVELOPED MULTITASKING ENVIRONMENT
1.1. Develop multitasking operating system kernel in DOS one-processor single-task environment. It must provide preemptive multitasking, i.e. each task must know nothing about possible preemptions and must do nothing special concerning this problem. To share processor's time use timer ticks (interruption x08) by introducing dispatcher process as this interruption handler. Any language you want (Pascal, C, Assembler,..) may be used for implementation. In the case of using high-level languages (Pascal, C) you are to comply to corresponding compiler by analyzing produced by it assembler code (use for this purpose Turbo Debugger td.exe, td286.exe,.., which may be found, for example, in BC3/BIN standard folder. You are to stress attention on how compiler restore process's context before returning control from interruption handler). In the frame of this subtask it is necessary to implement 4 application processes (philosophers interleaving thinking and eating, for task description look at Lecture Notes - Synchronization Tasks) and dispatcher process - x08 interruption handler responsible for switching processes. To switch between processes it may be used stack replacement by changing pointer in pointing stack register pair SS:SP. Processes in the dispatching queue may be represented by pointers to their Process Control Blocks (PCB) containing processes contexts (PC, PSW, common purpose registers,..). No synchronization of philosophers is assumed to be used in this part of the work. So, you may obtain such anomalies as having simultaneously eating all of the four philosophers, it is normal for such solution without synchronization but it doesn't mean that it will really occur in made runs, it depends on current situation and may not appear. Sample Pascal file in MS DOS for Turbo Pascal 7.0 is given here. It provides round-robin processor using by several one-procedure based processes. (Russian comments are retained but English comments precede them. Outputs in Russian are also retained but are given in comments, corresponding outputs in English are given in adjacent lines.) Sample file was revised 20.11.02 (2 lines were modified, previous lines are commented) for working with local Borland Pascal. It (phil.exe) works under XP but doesn't want to start from deeply nested directories. It must produce such output file.
1.2. Develop synchronization mechanism - binary semaphore having 2 operations: P() and V(). Provide indivisibility of these operations, for example, by prohibiting interruptions during their execution (Assembler commands CLI, STI). Associate with each semaphore its own queue for keeping waiting at this semaphore processes.
1.3. Implement semaphore solution of the "dining philosophers" synchronization task given in Lecture Notes - Synchronization Tasks.
Report on the Assignment Task1 must be submitted to lecturer on December, 16 ( Monday) 2002, 12:30, Research Lab. You are to present paper report containing task description, description of your approach to task solution (high-level algorithm with emphasizing on task's solution peculiarities), description of the program system (graph of the program, procedures, interfaces, goals in connection with previously described algorithm), references on cited sources. Also you are to prepare your program system on the diskette as appendix to report. Submission of reports on Task1 is postponed to December, 23 (Monday), 2002, 12:30, Research Lab
Grading: 20 points including 12 points - multitasking kernel, 5 points - implementation of semaphores, 3 points - semaphore solution.
Task 2. SOLVING SCIENTIFIC TASKS in PARALLEL DISTRIBUTED ENVIRONMENT
2.1. Using DCOM (revised 25.10.02) or CORBA (28.11.2002) facilities you are to implement some simple scientific (computational) task. List of such tasks will be announced on 28.10.02. (look at DCOM, Section 5 - TASKS VARIANTS). You may choose as such task some problem concerning your research interests. You may choose also some other tool for organizing your distributed parallel application (MPI, PVM, OpenMP,..). Tasks you have chosen must be known to me on November, 18, 2002. (Necessary for working with CORBA files and executable files of Server and Client are available in Announcements page of my site. 28.11.2002) References to sample DCOM project files are also there.
2.2. You are to experience with your application using 1,2,3,.. computers, measure times of execution, give corresponding graphics and their discussion in your reports.
Report on the Assignment Task 2 must be submitted to lecturer on January, 20 (Monday), 2003, 12:30, Research Lab. Requirements to report are the same as for the Task 1. Additionally you are to present results and discussions of your experiments with different number of involved computers.
Time for Assignment Part 2 reports submission: 20.01.03, Mon, 12:30-14:30 (preferrable)
23.01.03, Thu, 16:00-18:00
Be ready to demonstrate your distributed applications at least on 2 PCs
Reports must contain 1) task formulation; 2) brief description of your algorithm; 3) description of the used tools; 4) description of your software product; 5) results of running your application on 1 and several PCs; 6) full source code; 7) diskette with sources, executables and user instruction (readme file)
Grading: 10 points
Total assignment grade: 30 points