[concurrency-interest] ThreadLocalRandom clinit troubles

Peter Levart peter.levart at gmail.com
Sun Jun 29 05:29:02 EDT 2014


On 06/29/2014 03:53 AM, Peter Firmstone wrote:
>
> It does look like a good solution.
>
> You might wonder why we still need a custom SecurityManager?
>
> Concurrency.
>
> The ageing java security infrastructure is a huge bottleneck for 
> multithreaded code.
>
> Regards,
>
> Peter.
>

Hi Peter,

If you could identify the most critical bottleneck(s) of default 
SecurityManager, there might be a way to fix them...

Regards, Peter

>
>
>
>
>
>
>
> > Message: 1
> > Date: Thu, 26 Jun 2014 19:10:22 -0400
> > From: Doug Lea <dl at cs.oswego.edu <mailto:dl at cs.oswego.edu>>
> > To: Peter Levart <peter.levart at gmail.com 
> <mailto:peter.levart at gmail.com>>
> > Cc: core-libs-dev <core-libs-dev at openjdk.java.net 
> <mailto:core-libs-dev at openjdk.java.net>>, OpenJDK
> >     <security-dev at openjdk.java.net 
> <mailto:security-dev at openjdk.java.net>>, concurrency-interest
> >     <concurrency-interest at cs.oswego.edu 
> <mailto:concurrency-interest at cs.oswego.edu>>
> > Subject: Re: [concurrency-interest] ThreadLocalRandom clinit troubles
> > Message-ID: <53ACA85E.2030407 at cs.oswego.edu 
> <mailto:53ACA85E.2030407 at cs.oswego.edu>>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> >
> > Peter: Thanks very much for attacking the shocking impact/complexity
> > of getting a few seed bits.
> >
> > On 06/25/2014 01:41 PM, Peter Levart wrote:
> > >
> > > Peeking around in the sun.security.provider package, I found there
> > > already is a minimal internal infrastructure for obtaining random
> > > seed. It's encapsulated in package-private abstract class
> > > sun.security.provider.SeedGenerator with 4 implementations. It turns
> > > out that, besides Java-only fall-back implementation called
> > > ThreadedSeedGenerator and generic URLSeedGenerator, there are also 
> two
> > > implementations of NativeSeedGenerator (one for UNIX-es which is just
> > > an extension of URLSeedGenerator and the other for Windows which uses
> > > MS CryptoAPI). I made a few tweaks that allow this sub-infrastructure
> > > to be used directly in ThreadLocalRandom and SplittableRandom:
> > >
> > > 
> http://cr.openjdk.java.net/~plevart/jdk9-dev/TLR_SR_SeedGenerator/webrev.01/ 
> <http://cr.openjdk.java.net/%7Eplevart/jdk9-dev/TLR_SR_SeedGenerator/webrev.01/> 
>
> > >
> >
> > This seems to be the best idea yet, assuming that people are OK
> > with the changes to sun.security.provider.SeedGenerator and
> > NativeSeedGenerator.java
> >
> > -Doug
>
>
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20140629/1660560a/attachment.html>


More information about the Concurrency-interest mailing list