Using All These Cores: Transactional Memory in PyPy

Armin Rigo - EuroPython 2014

Part 1 - Intro and Current Status

Introduction

Why is there a GIL?

Consequences (+)

Consequences (-)

Removing the GIL

Fine-grained locking

Shared-nothing

Transactional Memory

PyPy-STM

How does it work?

fig4.svg

Demo

Long Transactions

Long Transactions

fig4.svg

Demo

PyPy-STM Programming Model

PyPy-STM Programming Model

PyPy-STM status

Summary: Benefits

Summary: Issues

Summary: PyPy-STM

Part 2 - Under The Hood

STMGC-C7

Overview

Trick #1

Trick #2

Barriers

...

Thank You