Reference no: EM13314151
Task One:
1. Compile the .java files.
2. Then start Example2ReceiverSender, followed by Example2SenderReceiver.
An example of the commands for running the programs is:
java Example2ReceiverSender localhost 20000 10000 msgl
java Example2SenderReceiver localhost 10000 20000 msg2
3. Describe the outcome. Why is the order of the execution of the two processes important?
Task Two:
1. Modify the code so that the senderReceiver process sends then receives repeatedly suspending itself for 3 seconds between each iteration.
2. Compile the .java files.
3. Then start Example2ReceiverSender, followed by Example2SenderReceiver.
An example of the commands for running the programs is:
java Example2ReceiverSender localhost 20000 10000 msgl
java Example2SenderReceiver localhost 10000 20000 msg2
4. Describe the outcome.repeat the run.
5. Do the same with the receiverSender.
6. Compile and run the programs for a few minutes before terminating the programs (by entering the keystroke sequence "control-c").
7. Describe and explain the outcome.
Note: To help you track the run outcomes, it is recommended that you execute each application in a separate window on your screen, preferably sizing and positioning the windows so that you can see the displays side by side.