aspose file tools*
The moose likes C / C++ and the fly likes Query about thread priority mapping. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "Query about thread priority mapping." Watch "Query about thread priority mapping." New topic
Author

Query about thread priority mapping.

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 411

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.





Pawan Chopra
SCJP - DuMmIeS mInD
Anthony Aj Williams
author
Ranch Hand

Joined: Jun 10, 2011
Posts: 56
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.


Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
just::thread C++11 thread library http://www.stdthread.co.uk
Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 411

Thanks!
Chun Chu
Greenhorn

Joined: Jan 11, 2011
Posts: 15
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

Joined: Jun 10, 2011
Posts: 56
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query about thread priority mapping.