[Logo]
Forums Register Login
Any OS course-related stuffs in the Java Threads book?
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...
 

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
 

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...
 

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
 

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
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...
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 614 times.

All times above are in ranch (not your local) time.
The current ranch time is
Sep 19, 2018 20:12:52.