PrefaceviiRecommendedlabsessionsixAcknowledgementsandthanksxi1Introductiontoreal-timesystems12Implementingsimplereal-timesystems293Basicinputandoutput464Cyclicexecutivesforbarehardware815Finitestatemachines–designtool946Finitestatemachines–implementationoptions1107Whymulti-task?1