Marlabs  
  >>
Passionate about your results
  About Us      Services      Products    Industries  Partners    Careers    Awards News Contact Us 29

Marlabs Blog


Stay connected with the
worldwide business
community
GIL – A Non-Issue Issue! Thursday, March 25, 2010

An important topic related to both Ruby & Python is the Global Interpreter Lock (GIL). Because of GIL, pure Ruby/Python languages can use only one CPU (1 core) regardless of the available number of CPUS/Cores.

But GIL is a non-issue in at least three ways:

1> Common automatically eliminates GIL Language Runtime /Java Virtual Machine (CLR/JVM)
IronRuby/IronPython/JRuby/Jython/MacRuby have “no GIL” issues, because they map corresponding “green threads” to CLR threads or JVM threads or native threads.

2> Asynchronous Programming Approach

Even if using pure Ruby/Python, using a library like Twisted (for Python) or EventMachine (for Ruby) eliminates GIL/concurrency issues.

http://www.artima.com/weblogs/viewpost.jsp?thread=230001

http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/

3> Using Separate Libraries

http://pypi.python.org/pypi/processing

http://www.parallelpython.com/

http://github.com/grosser/parallel

Posted by Srinivasan Balram | No Comments
Post a Comment

Name:


Email Address:


Website:


Comments:


*
 
  Blogger Profiles
 
 
 
 
  Linked in
 
 
 
 
  Marlabs on
Facebook
 
 
 
 
  Follow us
on Twitter
 
 
 
 
  Read our Feed