For this assignment you are required to write a program that generates two separate windows (each created as a separate thread). The first thread (window1/producer) should take numeric and alphabetic inputs from the keyboard
CSIS310 Introduction to Operating
Systems
Assignment 1
Seyed Ebrahim Esmaeili
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
1
2
• Outline:
• Assignment 1:
Processes and Interprocess Communication
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
• The project is due on: 06-06-2014.
• This project can be done in teams of no more than
two students.
• Requires notion of Chapter 3.
3
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
• Requirements:
- Write a program that generates two separate
windows (each created as a separate thread)
- The first thread (window1/producer) should take
alphabetic and numeric inputs from the keyboard
and place it in the shared memory (bounded
buffer interface)
- The second thread (window2/consumer) should
pick up the contents of the shared memory, and
display it on the screen. However, numerics will be
multiplied by 2.
4
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
5
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
• I should have two windows that whatever alphabet
or number I type in the producer window appears in
the consumer window with the numbers multiplied
by 2.
6
Hello.
2
3
7
Producer Window
Hello.
8
12
28
Consumer Window
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
7
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
8
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
9
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili
10
CSIS 310 Introduction to Operating
Systems
Assignment 1
S. E. Esmaeili