| |||
Intent | |||
Start up a system with subsystems which are dependent of one another. | |||
Aliases | |||
bootstrap, run level, One Two Three! | |||
Motivation | |||
Consider the startup procedure of realtime systems or operating systems. The system is composed of a number of subsystems and the subsystems are dependent of one another. Because of the dependency, it is impossible to sequentially start up one subsystem completely after another. In this situation, you have to divide the subsystems' services into several phases(levels) and establish an arrangement over all the subsystems, so you can start up the whole system gradually in order. But the procedure is usually complicated and the arrangement of the startup order requires detail information of all the subsystems. Besides, some startup order may lead the system into a deadlock. The idea is, instead of dividing each subsystem's state into only two state(active/inactive), to introduce intermediate state(s). During the startup procedure, first, start up the subsystems into the intermediate state, and then, start up them into the final active state. Introducing sub levels for bootstrapping can avoid the problem of mutual-dependency and deadlock. If you introduce several intermediate levels and define the meaning of each level over the whole system, you can obtain an insight of the bootstrapping procedure. In order to label the intermediate states, introduce an integer value, sometime called "run level", and make an arrangement over the whole system. This "Multi-Phase Startup Pattern" can make the design and implementation of startup procedure cleaner and safer. Consider the following example. An operating system has a subsystem called "File System(FS)" and another called "Network Interface(NI)". When startup, it starts up FS first, reads a configuration file including its IP address and other information for NI, and then starts up NI to reach the final active state. Recently this operating system added a new FS feature of "Network File System(NFS)". This feature brought a mutual-dependency problem of FS and NI. That is;
As this case shows, mutual dependency between subsystems prevents the whole system's startup in simple order(i.e. first FS, then NI). Therefore, the following method is adopted;
The strategy here is to divide the subsystems' state into intermediate levels and to gradually achieve the final goal, in order to resolve the problem of the mutual dependency. "Multi-Phase Startup Pattern", provides a solution to the mutual dependency problem often occurs in the system's bootstrapping. | |||
Applicability | |||
Use this pattern when;
| |||
Structure | |||
| |||
Participants | |||
|
Collaborations |
Collaborations
|
Implementation |
In implementation, consider the following.
|
Variations | ||||
The following variations are possible.
| ||||
Result | ||||
In result,
|
Knows Users |
|
Related Patterns |
|
Acknowledgements |
I'd like to thank JPLoP members for a lot of advice in the course of refinement of this pattern. Especially, an automonous variation is from HIRASAWA Akira. The insight into the problem of the automonous variation and the essential heuristicness behind this pattern is from FUJINO 'Terry' Terunobu. Kenji Hiranabe <hiranabe@esm.co.jp> Last modified: Sun Dec 12 12:55:07 1999 |