Next: Exam files
Up: Investigation
Previous: Reliability
Runlevels are a standard feature of SysV-style init. Runlevels 0,
1, and 6 are reserved, and levels 2, 3, and 5 have (thanks to
LSB[9]) fairly standard definitions across distributions.
Runlevel 4 is available for use on many Linux systems. By using a
runlevel specifically for lexis, we can use
init[5] to handle transitions into and out of
exam state, as well as providing a secure boot when an exam is in
progress.
To start an exam, we create a new set of config files for the system,
then change to runlevel 4. On changing runlevel, init stops
services from the last runlevel and starts services for the new
runlevel. We create a Lexis service that only runs in runlevel 4 that
carries out any changes that need to be done on starting an exam or
booting during an exam, including signalling the server that the
workstation is ready for use and turning on the firewall rules.
This approach places most of the management burden on standard
system processes, rather than on bespoke Lexis code.
Unfortunately, the init supplied with RedHat 6.2 proved
extremely unreliable during initial testing, often changing
runlevel without running stop or start scripts. This meant that a
large amount of the functionality of init (stopping services,
restarting them) would have to be replicated in Lexis to ensure
reliability.1
Mike Wyer
2002-05-10