How does a booster work in a particle accelerator like the LHC? In the proton synchrotron booster (PS) booster at the LHC, protons are accelerated from $50 \, \text{MeV}$ to about $1.4 \,\text{ GeV}$. This takes about a second to accomplish. Since the radius of the trajectory is fixed, I guess, the magnetic field in the bending magnets is adjusted during this time. Similarly, I guess they also adjust the frequency at which they are accelerated, since the protons still change their velocity (Lorentz $\beta$) quite a lot.
My question is: If this process takes about a second, how can protons of completely different energies be kept in the same ring? My guess is that they only fill the ring every second and so the protons all have about the same energy. But wouldn't that be extremely inefficient because the majority of the protons are just dumped, or do they switch the production off and on as well?
 A: You have two other answers which specifically address the CERN Proton Synchrotron Booster and basically confirm the guess in your question: because the bending magnet fields and the acceleration frequencies must change as the protons become relativistic, there can be only one beam energy in the synchrotron at a time. The protons are injected, accelerated, then extracted.
If you are thinking about particles with different energies sharing the same flight path, you would be amused to learn about the Continuous Electron Beam Accelerator at Jefferson Lab. That machine is a pair of back-to-back linear accelerators, connected into a racetrack by two sets of bending magnets. The electrons are already ultra-relativistic when they are are injected into the accelerator, with Lorentz factor $\gamma \approx 200$, so the 100 MeV electrons on their first pass through the linac are traveling at the same speed, $c \times (1\pm10^{-4})$, as the 12 GeV electrons on their fifth pass through the linac.  However, each beam energy needs a different magnetic field to make it around the arc from the end of one linac to the beginning of the next. The arcs have a clever splitter-recombiner magnet system so that the single beam path through the linear accelerating modules is turned into five different beam paths through the arc, each with its own bending magnets.
A: Late to the party but here is how you operate a synchrotron such as the CERN Proton Synchrotron Booster:

*

*You inject the beam from the production facility (currently linac4) and it starts to circulate in the ring. In a specific section of the ring there is a particular element called Radio Frequency (RF) cavity. It produces an electric field oriented along the beam direction and oscillating back and forth. The beam revolution time and the electric field frequency are synchronized so that the beam passes through the RF cavity when the field is vanishing.

*You increase a bit the current in the magnets of the ring. This causes the beam to move on a slightly inwards path, completing a turn in a shorter time. Now, when it goes through the RF cavity, it feels some of the longitudinal electric field getting some boost from it. As the energy increases the beam goes back to the usual path. If the beam is not fully relativistic you need to increase the RF frequency accordingly to compensate for the higher velocity.

*You keep repeating step 2, increasing the current in the magnets to its maximum allowable value. Congrats: you now have the beam at top energy!

*You extract the beam sending it wherever is needed.

*You ramp down the currents in the magnets preparing the ring to receive another pulse from the linac and go back to step 1.

Now, what does the linac do while the PSB cycles? The answer is... nothing, it just waits! You can run diagnostic pulses, or send the beam to some other users, but the PSB (or any other synchrotron) does not accept any proton if not configured for injection. This is a disadvantage of synchrotrons compared to linacs or cyclotrons: they cannot deliver continuous beams, but a single pulse which is at most as long as its circumference, then you need to wait for the next cycle.
Others mentioned that the CERN PSB is made up by four rings. That is true, but quite irrelevant here. The reason for that is that a single ring would take too many cycles to fill the PS leaving part of the beam circulating in the PS at injection energy for an unbearable long time, while it gets disrupted by collective effects and intra-beam forces (in particular space charge). Four rings operating simultaneously deliver four times more beam current to the PS, cutting its filling time, so that it can initiate its acceleration procedure faster.
Note that the PS delivers the beam to the SPS and only then the beam reaches the LHC. All these rings operate in a similar manner, receiving the beam at their lowest acceptable energy and accelerating it before delivering to the next ring. Each ring has to complete several cycles to fill up the next one. The only exception is the LHC which, once at top energy, does not deliver the beam to another ring (at least yet, see CERN-FCC) but it squeezes it down to produce collisions.
A: The proton synchrotron booster is not a simple circular ring:

The Proton Synchrotron Booster is made up of four superimposed synchrotron rings that receive beams of negative hydrogen ions (H-, consisting of a hydrogen atom with an additional electron) from the linear accelerator Linac4 at 160 MeV. The ions are stripped of their two electrons during injection from Linac4 into the Proton Synchrotron Booster to leave only protons, which are accelerated to 2 GeV for injection into the Proton Synchrotron (PS).

Italics mine.
The Proton Synchrotron:

With a circumference of 628 metres, the PS has 277 conventional (room-temperature) electromagnets, including 100 dipoles to bend the beams round the ring. The accelerator operates at up to 26 GeV.

If you read the links you will see that many pulses of protons go around the synchrotron at the final energy without loss of protons in each pulse. The time is for a single pulse but a train of pulses from the booster enters the synchrotron, each pulse serially accelerated as it is going around.
A synchrotron

A synchrotron is a particular type of cyclic particle accelerator, descended from the cyclotron, in which the accelerating particle beam travels around a fixed closed-loop path. The magnetic field which bends the particle beam into its closed path increases with time during the accelerating process, being synchronized to the increasing kinetic energy of the particles.

