• Post Reply Bookmark Topic Watch Topic
  • New Topic

Any OS course-related stuffs in the Java Threads book?  RSS feed

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have skimmed throught the TOC of the book already. I just would like to know whether OS course-related topics such as Semaphores, Producer-Consumer are discusses in the book as examples or not... Since those implementations make intensive use of threads, I guess that they are somewhere else in the book... Could you confirm that? Thank you...
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ko Ko Naing:
I have skimmed throught the TOC of the book already. I just would like to know whether OS course-related topics such as Semaphores, Producer-Consumer are discusses in the book as examples or not... Since those implementations make intensive use of threads, I guess that they are somewhere else in the book... Could you confirm that? Thank you...


We do discuss semaphores as it is now part of JDK 1.5. (actually, we also discussed it with the earlier edition too) We don't spent too much time with it, because quite frankly, by the time we get to it, there were many similar options to semaphores... sorry.

Producer-consumer got a very detailed discussion in the collection chapter, as using collections is a great way to hide all the thread related issues in decoupling producers from consumers.

Henry
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Henry Wong:
because quite frankly, by the time we get to it, there were many similar options to semaphores... sorry.

Could you please mention a bit on what you mean by "there were many similar options to semaphores"? Does it mean "Since JDK 1.5 provides the complete solution, there is no need for the book to explain about it" or something? Or do you mean "Since we can refer to semaphores implementation in other books, your book just skip those simple implementations"?
Producer-consumer got a very detailed discussion in the collection chapter, as using collections is a great way to hide all the thread related issues in decoupling producers from consumers.

One question, henry. Sorry for so many questions...
Does that collection chapter, which contains info about implementing Producer-Consumer stuff, discusses both multiple producers-consumers issue and single producer-consumer issue? Thanks for your kind responses to my queries...
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please mention a bit on what you mean by "there were many similar options to semaphores"? Does it mean "Since JDK 1.5 provides the complete solution, there is no need for the book to explain about it" or something? Or do you mean "Since we can refer to semaphores implementation in other books, your book just skip those simple implementations"?


Basically, we never got to semaphores until chapter 6... not too sure why, it just wasn't necessary for the earlier examples. By then, we went through a ton of thread examples -- that semaphores were actually a relatively simple concept.

We simply explained it, how to use it, and had a small discussion on when it may be useful. We just never went into detail about it.

Henry
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One question, henry. Sorry for so many questions...
Does that collection chapter, which contains info about implementing Producer-Consumer stuff, discusses both multiple producers-consumers issue and single producer-consumer issue? Thanks for your kind responses to my queries...


The main example in this section allows multiple producers and multiple consumers. It is actually not that big of a section, by the time we finished the collection class discussion, the producer/consumer section just fit in effortlessly.

Henry
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry, Thanks a lot for your great explanation about your book... I have no more questions for this thread... I'll start another new thread, if I got more questions with a different topic...

Thanks...
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!