• Post Reply Bookmark Topic Watch Topic
  • New Topic

The Program doesn't pause and display the result it is executing continuously  RSS feed

 
Npsingh Dev
Greenhorn
Posts: 1
Java Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hello Java followers,

I am new here, and really appreciates the help which is done by this forum. I am implementing a ROUND ROBIN Scheduling program in java, So just copy some of line from other source and also added some line from my own. now the problem is it is compiled successfully and i think the result is also computed rightly but i can't see it, the screen is going in continuously like a infinite loop, i didn't figure out where is error in this program. I am also included my that program file as a attachment so you guys can download and run it, so you can see what the problem in the code. I am also included the Program here so you can see it.
The code is :
JAVA file name: RoundRobin.java
-----------------------------------------------------------------------

-------------------------------------------------------------------------
Any help will be appreciated.

Waiting to response.

Cheers
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a lot of code to expect someone to go through.

Generally, if you have an inf. loop, your conditions aren't changing how you think they are. System.out.println() is your best friend. I would suggest putting a few in around your do-while loop. In particular, I would print out what T, activeProcess.burstTime, and lastProcessArrival are just before your current line 80. You may want to also put some in around where any of those value might change, to make sure they really are.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!