Learning Communication Patterns in Singularity
Paul Barham, Rebecca Isaacs, Richard Mortier, Tim Harris · USENIX workshop on Tackling computer systems problems with machine learning techniques · 2006
Modern software is so complicated that it is often infeasible to get a good understanding of a system’s dynamic behaviour simply from its source code. Commodity operating systems are a good example: they comprise numerous separatelyauthored components, large numbers of interacting threads, and extensibility mechanisms that allow new components to be plugged in based on boot-time or run-time configuration settings. Ideally it should be possible to understand this kind of complex system by capturing dynamic traces of its behaviour and then applying machine learning techniques to these traces to elucidate the structure present in them. In practice, this is extremely difficult because such systems are usually poorly specified and structured, and component interactions are largely unconstrained [2]. In order to sidestep these issues, this work is based on the Singularity research operating system [5] in which all component interactions are well-specified and statically verified. In Singularity, inter-process communication (IPC) is performed over type-safe message channels. Each channel is statically checked to conform to a channel contract that defines named message types that the channel can carry, and a finite state machine (FSM) whose edges define the message send/receive operations that are valid in a given state. This environment is extremely suitable for the application of machine learning techniques to understand runtime behaviour. Component communications conform to a statically verified FSM that the OS tracks at runtime, we can be sure that we track all forms of IPC, and we can present results using the names of channel contracts and message types. Section 2 describes IPC in Singularity in more detail. To explore the potential of applying machine learning in this more structured context we have developed a series of preliminary techniques for capturing the runtime dependencies and dominant interaction patterns between components in Singularity. We have explored three techniques that provide progressively more detailed information: