gwsystems / composite

A component-based OS
composite.seas.gwu.edu
184 stars 70 forks source link

System life-cycle driven by run-scripts #353

Open gparmer opened 6 years ago

gparmer commented 6 years ago

Summary

I need to get some ideas onto "paper", and might as well do it in a location where other people can comment. This expands on Option 2 from #352 .

High-level idea: Interfaces should be polymorphic across different server implementations (#352), and the runscript should guide the entire process. Interfaces will expose a fixed functional prototype (in their .h file), but the stubs that implement the glue between components can differ. Additionally, in some cases, there will be no "server" component, and the stubs themselves will be library implementations of the interface. In this case, the interfaces effectively organize our equivalent of DLLs. It follows that many different libraries should be pushed from the lib/ directory into an interface implementation (except for those that are included into every component).

Some preliminaries:

Compilation and build life-cycle V2

The build system will be broken into the following stages (changes within this proposal are denoted with New):

Interface compilation

Component compilation

Composite Specification-driven, whole-system linking

Image Generation

At this point, we have a collection of components that are fully linked into ELF programs, and we know the address of the user-level capability structures, and the server and client stubs, and which components depend on which other components.

Limitations and Warts

Future

Conclusions

This infrastructure will allow a level of polymorphism for the interfaces with an integration of libraries that will allow us to avoid a lot of the cos_kernel_api vs capmgr mess that we have now. It will enable the composition specifications quite a bit of power to pull information out of the objects, and to add information in that will, long-term, enable us to pass information where we need it in a much simpler manner. The cost is in the development of the new booter, composition specification interpreter, and build system changes. This seems like a good trade-off. I believe I've addressed most of the annoying edge-cases, but if I've missed something, please let me know now!

@Others @phanikishoreg @ryuxin @hungry-foolish

gparmer commented 6 years ago

To codify this, and make it a little bit more transparent, see the loader branch.

mkimg

FS hierarchy updates

Build system updates

The build system is being changed to do compilation and some linking at normal compile time (make), and to move the final linking stage (including the generation of the executable) to the mkimg phase. To understand why, see Option 2 in #352 for an overview of the highest-level goal of allowing different variants of interfaces. Also see #364 to understand how this will also be used to help guide the library compilation and linking.

Runtime booter updates