We use the mathematical language of sheaf theory to give a unified treatment of non-locality and contextuality, which generalizes the familiar probability tables used in non-locality theory to cover Kochen-Specker configurations and more. We show that contextuality, and non-locality as a special case, correspond exactly to *obstructions to the existence of global sections*.
We describe a linear algebraic approach to computing these obstructions, which allows a systematic treatment of arguments for non-locality and contextuality. A general correspondence is shown between the existence of local hidden-variable realizations using negative probabilities, and no-signalling. Maximal non-locality is generalized to maximal contextuality, and characterized in purely qualitative terms, as the non-existence of global sections in the support. Some ongoing work with Shane Mansfield and Rui Soares Barbosa is described, which identifies *cohomological obstructions* to the existence of global sections, opening the possibility of applying the powerful methods of cohomology to non-locality and contextuality.