permaculture playing cards
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Multiple Threads?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Multiple Threads??" Watch "Multiple Threads??" New topic

Multiple Threads??

Ramnath krishnamurthi
Ranch Hand

Joined: Jan 22, 2003
Posts: 56
Since the Scheduler(the underlaying OS) decides which thread to run at any given point of time,i mean only one thread running at any point of time,then where do we get the concept of Multiple Threads??
Can some one explain it??
Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522
In a single CPU environment 'Multiple Threads' concept is simply an illusion, because you have only one CPU that is shared among multiple thread, and there is only one thread that actually uses that CPU. However, periodically switching the CPU from one thread to another gives the user the illusion that indeed threads are running in parallel (but in reality they are not).

- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. - What truth? - That there is no spoon!!!
Ramnath krishnamurthi
Ranch Hand

Joined: Jan 22, 2003
Posts: 56
Thanks once again vicken for ur prompt reply.
I agree. Here's the link:
subject: Multiple Threads??
It's not a secret anymore!