Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query about thread priority mapping.

 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anthony,

I have been using Java from past 5 years. But I believe Concurrency is a common part of the Programming languages. I would like to know whether your book explain about mapping between C++ threads and Operating System threads priorities? For example in Java we have 10 priorities of Threads. But in case of operating system NT we have 7 priorities and In case of Solaris its 2^31 priorities(I am not sure about exact figures). I am not sure how Java map these priorities at OS level. Please let me know if your book has details on this topic.




 
Anthony Aj Williams
author
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pawan chopra wrote:I have been using Java from past 5 years. But I believe Concurrency is a common part of the Programming languages. I would like to know whether your book explain about mapping between C++ threads and Operating System threads priorities? For example in Java we have 10 priorities of Threads. But in case of operating system NT we have 7 priorities and In case of Solaris its 2^31 priorities(I am not sure about exact figures). I am not sure how Java map these priorities at OS level. Please let me know if your book has details on this topic.


My book does not cover thread priorities. The C++ standards committee decided that handling of thread priorities was too varied across operating systems, so it was left out of the C++ concurrency facilities. As my book does not cover platform specifics, it does not cover thread priorities.
 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
Chun Chu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agreed that thread priority mapping might not be an important topic to discuss in the book because each platform has its own priority mapping and it is very difficult to cover all platforms.

However that spawns another question. Although priority mapping does not need to discuss within the book but does the book provide an overview of thread preemption and thread starvation?

I think the understanding of thread preemption and thread starvation is an important topic that developers should understand when designing a multithreaded application.
 
Anthony Aj Williams
author
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chun Chu wrote:Does the book provide an overview of thread preemption and thread starvation?


Yes, these concepts are covered, especially in chapter 7 with regard to the construction of lock-free algorithms.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic