Back to Adam Winstanley's home page


CS405 Parallel Processing: Practical 1

A program is required to process text read from a file and transform it according to the following rules:

  1. Consecutive multiple space characters are to be replaced by one space
  2. Each equals sign '=' should be replaced by the word "equal"
  3. Each question mark '?' should be replaced by an exclamation mark '!'

For example the following input:

results in the following output:

You should write two versions of the program in Modula-2, one using co-routines, the other time-slicing. Both should use two separate processes, one to handle input and the other output . The amount of data communicated between processes should be kept to a minimum. You should test both programs thoroughly.

Hand in

DUE TO BE HANDED IN ON TUESDAY 3rd FEBRUARY 1998. (ABSOLUTELY NO EXTENSIONS)