transputer.gif (9866 bytes)
Brock University
Department of Computer Science

COSC 3P93 A1: Supercomputer Reset v.1

Instructor: Vlad Wojcik mail.gif (1189 bytes)

darkDot.gif (501 bytes)DUE DATE / TIME: Friday, 20 Oct 2017, 4 PM.

darkDot.gif (501 bytes)THE PROBLEM (Old text, perhaps somewhat unclear):

A 3D torus supercomputer (3x4x5 processors) needs to be reset. To reset a processor means to bring it to a certain controlled state.

Every processor in the torus has exactly six immediate neighbours. We will assume that each processor runs an Ada task. Each task has a RESET entry and an ACK entry. A user program, running on the host computer, first calls the RESET entry of a task running on an arbitrarily chosen processor. Then it calls on the ACK entry of that task, waiting for the acknowledgement. When this acknowledgment is received, the user program is informed that the torus machine has been reset.

Each processor task waits first on the RESET entry call. If this is NOT the first time that entry was called, the task is ready to accept the ACK entry call immediately. Otherwise it first calls the RESET entry of all its immediate neighbours (with the exception of the neighbour that called its RESET entry), and then waits for ACKnowledgments (which may come in any order). Upon receipt of all due ACKnowledgments, the task is willing to accept its own ACK entry call.

Write the most efficient Ada program to reflect this behaviour. While the torus is being reset, the program should produce a brief report, viz.:

PNO   #ACKs
### ####
### ####

where PNO stands for processor number and #ACKs represents the number of acknowledgments issued.

NOTE: Beware of deadlock!

darkDot.gif (501 bytes)THE PROBLEM (Revised text, equivalent but perhaps clearer):

A 3D torus supercomputer (3x4x5 processors) needs to be reset. To reset a processor means to bring it to a certain controlled state.

Every processor in the torus has exactly six immediate neighbours. We will assume that each processor runs an Ada task. Each task has a RESET entry and an ACK entry. A user program, running on the host computer, first calls the RESET entry of a task running on an arbitrarily chosen processor. Then it calls on the ACK entry of that task, waiting for the acknowledgement. When this acknowledgment is received, the user program is informed that the torus machine has been reset.

Each processor task waits first on the RESET entry call.

On the first call to its RESET, the processor calls the RESET entry of all its immediate neighbours (with the exception of the neighbour that called its RESET entry), the processor then waits for ACKnowledgments from all of its neighbours (which may come in any order). After receiving all ACKnowledgments, the task is willing to accept its own ACK entry call.

On every subsequent RESET call, the task is ready to accept its ACK entry call immediately.

Write the most efficient Ada program to reflect this behaviour. While the torus is being reset, the program should produce a brief report, viz.:

PNO   #ACKs
### ####
### ####

where PNO stands for processor number and #ACKs represents the number of acknowledgments issued.

darkDot.gif (501 bytes)SUBMISSION FORMAT:

Both hardcopy (paper) and electronic submission is required.

Hardcopy submission: Your submission envelope with the standard Cover Page should contain all relevant printouts, demonstrating flawless behaviour of your program. The envelope should be dropped in the submission box on or before deadline date / time.

Electronic submission: Please create on your PC a sub-directory bearing your student number, place within it all the files (and only the files) to be submitted. ZIP this directory and e-mail it to your instructor (once - and only once!). The title of the message should be: "COSC 3P93: Assignment 1 Submission". The message should contain your name and student number, and the attached ZIP file.

Similarly, the electronic submission should be performed on or before deadline date / time.


cameo.gif (1740 bytes)Instructor: Vlad Wojcikmail.gif (1189 bytes)
Revised: 18 October, 2017 11:02 PM
Copyright 2017 Vlad WOJCIK