CS476/576

Assignment #5

Due Midnight, Wednesday   Dec. 5, 2007


Write Java (swing/threads/sockets) program with the following descriptions:

NAME

Jdispatch  -    java-based master-thread dispatches work among other threads.

 

 

SYNOPSIS

         Jdispatch  

 

 

DESCRIPTION

 

This is similar to Assignment #4  but instead of using:

 

1.   Processes it uses Threads.

2.   Signals it uses Notify.

3.   Command line arguments it uses Swing  GUI interface.

4.   You may use either TCP or UDP sockets send data among threads.

 

  The following figure is a general overview of the system:

OutputFile

 

ChildrenLog

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 


Swing GUI Interface Layout

       The interface should have three areas:

 

                Input arguments  area: to enter the values of:

                        <n>  <m>   <InputFile>   <OutputFile>      

 

Information area: Have n rows, one row for each thread.

Each row displays the following information for the associated thread:

 

-         Status:  has three values Sleep/Active/Terminated

-         Read Counter: to display the number of reads.

 

 

Progress Bar Area: to show the progress of sending the file to the threads.

 

                 Control area:  has four buttons:

-         Start: to start the threads (the button becomes insensitive after the start)

-          Quit: to exit (the button becomes sensitive only when all threads are terminated).

 

You may use the shell script: check_sh to verify the accuracy of the results.