The recent detection of high energy gamma-rays coming From supernova remnan
ts and active galactic nuclei has revived interest in the diffusive shock a
cceleration of electrons. In the present paper we examine the basis of the
so-called "box" model for particle acceleration and present a more physical
version of it. Using this we determine simple criteria for the conditions
under which "pile-ups" can occur in shock accelerated electron spectra subj
ect to synchrotron or inverse Compton losses (the latter in the Thompson li
mit). An extension to include nonlinear effects is proposed.