next up previous
Next: 6 Availability Up: POSH: Python Object Sharing Previous: 4 Performance

5 Conclusions

Threads provide a useful abstraction for programming CPU-intensive parallel algorithms and master-worker computations. In Python, threads can easily communicate using synchronized access to standard container objects. However, threads in Python lack scalability for CPU-intensive applications because of the global interpreter lock. This paper has presented an approach called POSH which retains much of the programming model associated with threads but by means of processes and objects in shared memory. The ability to use standard Python objects in shared memory simplifies communication among multiple processes. However, accessing shared objects with POSH incurs some overhead compared to accessing native Python objects, but this overhead is usually subsumed by the increased parallelism when running on more than one processor.