Here is what I get out of the output of the program:
Threads with the different priority levels may get the same amount of
processing time share. See the progresses of thread 0 and 1. Thread 0 had
priority 1, and thread 1 had priority 5. But they showed about the same
progress rate.
Thread of priority 1 was getting about 10 times less amount of the processing
time share than thread of priority 10. See the progress rates of thread 0 and
thread 4.
The main thread was running at least 20 times slower when all 5 sub-threads
were running. See the elapse time intervals, which were > 2000 milliseconds while
all 5 sub-threads were running. The sleeping time was about 100 milliseconds.
So the main thread was blocked for at least 1900 milliseconds.
Another interesting behavior was noticed while executing the program. While all 5
sub-threads were running, the operating system was very sluggish. I was only able
to move the mouse pointer around. Clicking on windows of any other running application
programs gave me no response at all until 3 sub-threads reached the end.
I guess the reason for this behavior is that Windows 2000 system is not truly sharing
processing time among the running application programs equally. It let my Java
application program (running under Java VM) took 100% of the CPU processing time.
This is not a well-designed time-sharing multi-tasking operating system.
Can anyone try my program a Unix system?