Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Critical sections; In the Perl interpreter (no)

by tye (Sage)
on Feb 21, 2017 at 00:56 UTC ( [id://1182383] : note . print w/replies, xml ) Need Help??


in reply to Critical sections; In the Perl interpreter

But they were all sharing the same .so libraries, and the number of critical sections(CS) that the interpreter had to go through would create single file bottle-neck after bottle-neck.

No. Critical sections are only needed to protect shared and modifiable resources. Shared libraries are indeed shared, but they are not modifiable. If the code in a shared library implements a critical section around some block of code, then each process that passes through that code is going to have their own semaphore and they will not block each other at all.

- tye        

  • Comment on Re: Critical sections; In the Perl interpreter (no)