This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlmopen with RTLD_GLOBAL


On 30/06/17 23:52, Elliott Slaughter wrote:
> Python supports threads, but getting actual speedups out of parallel
> Python programs can be a challenge. Python uses a global interpreter
> lock (GIL) that makes the interpreter thread-safe in a very coarse
> grained way. The GIL effectively prevents Python from executing
> multiple Python instructions in parallel, and can prevent Python codes
> from achieving parallel speedups. In practice, the GIL might or might
> not be an issue depending on the workload. For example, Python code
> that calls C/C++ will release the GIL for the duration of the foreign
> call. But because I'm dealing with user-supplied scripts, I can't
> guarantee that all code will be written in a way that avoids use of
> the GIL, and I'd still like that code to achieve reasonable speedups.

What happens while the GIL is held?  *why* is the GIL held?

I heard some talk of replacing the GIL with lock-free data structures.

Unfortunately, I've not yet had time to implement a lock-free balanced
btree, which would of all data structures be the most likely to be
useful.  However, I could get a singly-linked list going in the near
future.  It would be algorithmically poor, but it would in terms of
parallelism be excellent.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]