  A cellular automaton model of pulsar glitches is described, based on the
superfluid vortex unpinning paradigm. Recent analyses of pulsar glitch data
suggest that glitches result from scale-invariant avalanches
\citep{Melatos07a}, which are consistent with a self-organized critical system
(SOCS). A cellular automaton provides a computationally efficient means of
modelling the collective behaviour of up to $10^{16}$ vortices in the pulsar
interior, whilst ensuring that the dominant aspects of the microphysics are not
lost. The automaton generates avalanche distributions that are qualitatively
consistent with a SOCS and with glitch data. The probability density functions
of glitch sizes and durations are power laws, and the probability density
function of waiting times between successive glitches is Poissonian, consistent
with statistically independent events. The output of the model depends on the
physical and computational paramters used. The fitted power law exponents for
the glitch sizes ($a$) and durations ($b$) decreases as the strength of the
vortex pinning increases. Similarly the exponents increase as the fraction of
vortices that are pinned decreases. For the physical and computational
parameters considered, one finds $-4.3\leq a \leq -2.0$ and $-5.5\leq b\leq
-2.2$, and mean glitching rates in the range $0.0023\leq\lambda\leq0.13\$ in
units of inverse time.
