History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RVM-64
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ian Rogers
Reporter: Ian Rogers
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
RVM

Flexible thread model

Created: 18/Jun/07 12:52 PM   Updated: 20/Jul/07 01:36 PM
Component/s: Runtime: Threads and Concurrency
Affects Version/s: None
Fix Version/s: 2.9.2

Time Tracking:
Not Specified

Environment: All
Issue Links:
Duplicate
 
dependent
 


 Description  « Hide
We currently support a single M-of-N thread model, where M Java threads are mapped onto N underlying processors. N should never be greater than the number of processors in the system for GC barriers to work correctly, however, a thread that blocks in native decreases the value of N by 1. For this reason we keep a spare processor handy, but the system will block with 2 blocking threads (also shifting execution of C code from one VM_Processor to another is highly dodgy). There are probably many others reasons an M-of-N thread model isn't desirable, so we should endeavour to implement a more regular pthread thread model, where Java threads are mapped directly onto underlying operating system native threads.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ian Rogers - 19/Jun/07 10:24 AM
The integration of a lot of the code is great, but also a problem when pulling things to pieces. For example, VM_Lock holds information on thick locks, however, it's data structures reside in the scheduler and it knows how to queue/dequeue green threads directly with the scheduler. As part of refactoring the thread model it makes sense to break some of these links (for example locks aren't dependent on a green or pthread scheduling mechanism) and make appropriate accessor methods for the underlying scheduling system. If this is green thread specific then my aim is to make this reside in org.jikesrvm.scheduler.greenthreads.

Ian Rogers - 10/Jul/07 08:11 AM
My hope is that I've cleaned up the JSR166 TCK failures and deadlocks this week, once this is sane or has known deficiencies we should move it to the head following IA32 and PPC full sanity tests. Work continues in the RVM-91 branch.

Peter Donald - 11/Jul/07 11:21 PM
While you are knee deep in this code can you look into allowing a larger number of threads. Trunks seems to die at 135+ threads.

Ian Rogers - 20/Jul/07 01:36 PM
This is fixed in r13106. Peter, could you produce a test case for the many threads problem as I imagine it still persists (I refactored the code but didn't change any internal limits).