A Zoomable Interactive Python Thread Visualization

David M Beazley (http://www.dabeaz.com)

Threads Executing on 1 CPU (Linux)

The following visualizations show thread scheduling of CPU-bound threads on a single CPU of a Linux system (described below). Observe how threads alternate execution in large blocks of time. This is good--you want this kind of behavior to avoid excessive context-switching. If you don't care about Linux, view the OS-X version of this page.

Linux, 2 Threads, 1 CPU [ code ]

+ -

Acquired and running Busy Retry

Linux, 4 Threads, 1 CPU [ code ]

+ -

Acquired and running Busy Retry

Test Details

Tests were conducted on the following system:

Take Me To More Visualizations!