PYTHON ACADEMY
The Programming School

Module - Threads and Processes in Python

Motivation

Threads allow the simultaneous execution of several program paths. This opens new possibilities for program development. On the other hand, programs become more complex. Python uses the native thread implementation of the operating system and offers a unified API therefore offers platform-impendent threaded programming.

Course content

Thread Basics

The possibilities for threads in Python are shown. An examples is used to demonstrate how the module threading works.

GIL

Python has a so called General Interpreter Lock (GIL) that prevents several threads to run in real parallel on multi-CPU hardware. The implications of the GIL on programming are covered.

Thread Synchronization

Synchronization of threads is a important part of thread programming. Random manipulations of data has to be avoided when two threads access the same data at the same time. To achieve this data need to be locked by one thread providing exclusive access for this period of time.

Examples are used to explain the principles of locking. Special focus is put on so called dead-lock situations where threads block each other from executing and bring the program to a halt.

Processes

Python provides several ways to launch and access external processes. These ways are introduced with examples.

Combination of Threads und Processes

The combination of threads and processes allows to run programs in parallel using the advantages of multi-processor machines possibily gaining speedups. An example is used to demonstrate the effect of such combinations.

Module Duration

0.5 days

Exercises

The participants can follow all steps directly on their computers. There are exercises at the end of each unit providing ample opportunity to apply the freshly learned knowledge.

Course Material

Every participant receives comprehensive printed materials that cover the whole course content as wells as a CD with all source codes and used software.


Home
Python
Courses
Open Courses
Company Courses
Summer Course
Non-Programmers
Programmers
Scientists
Special Topics
Extensions
Optimizing
Windows
Threads
Network
Patterns
Dates
Prices
FAQ
Training Center
User Group
Jobboard
Workshop
EuroSciPy
References
News


What customers say ...

Very good introduction to the programming language.

Matthias Enderle, freelancer programmer
more ...


News


Next Meeting of Leipzig Python User Group, July 8th, 2008
details ...


Python Summer Course July 21 - 25, 2008
details ...


EuroSciPy July 26/27, 2008
details ...


Booth at Chemnitzer Linux-Tage
details ...


Videos Workshop 2007 available
details ...


Python is programming language of 2007
details ...


[Powered by rest2web]

[Python Powered]