在 2016年8月30日星期二 UTC+8下午8:22:19,Nadav Har'El写道: > On Tue, Aug 30, 2016 at 6:08 AM, <[email protected]> wrote: > Hello everyone, > > I am new to OSv,these days I have done some experiments on OSv,I found > it was a great project,I am interested in it very much.But now I have some > questions to ask,I will appreciate it very much if some one of you can > explain to me. > > 1. About the image size. In some articles(about LibOS and Unikernels),it > claims that the Unikernel binary is very small,from KB to MB.But,when I build > the simplest HelloWorld C program into the OSv Unikernel,I found the > image(osv/build/last/usr.img) size is about 11M,so I feel doubted,if I have > misunderstand some thing? > > > > Unlike some other unikernels, OSv does *not* statically-link the kernel into > the application. Instead, the kernel contains a dynamic linker, which can run > any Linux executable (with some limitations - it needs to be > position-independent, not use fork, etc.). > > > Because of that reason, the OSv kernel always contains all the features a > Linux programs might need (all C and C++ library functions, all TCP/IP, > filesystem, etc.) and has a fixed size (10 MB sounds about right). > > > OSv could be made smaller - even much smaller - by compiling out of the > kernel features you know your application will not need. We wanted to support > this, but never got around to doing it. Possibly because nobody considers 10 > MB to be big nowadays ;-) > > > > > > > 2. Since I don't known the low-level implementation of OSv,I'm > interested that how you reconstruct a traditional operating system into a > library operating system,or in what kind of form can applications make use of > the libOS. > > > > Please read our paper on the design of OSv: > https://www.usenix.org/system/files/conference/atc14/atc14-paper-kivity.pdf > > > OSv can in theory run unmodified Linux dynamically-linked executables and > shared libraries by implementing a dynamic linkers and all (or most) of the > glibc functions. > It won't work for applications which run fork(), though threads are fully > supported. > > > Currently executables that OSv run need to be relocatable, i.e., PIE > (position-independent executable) or shared object - with the latter > preferred. > > "classic" position-dependent executables are not currently supported, but we > could support running just one of those in the future. > > > > > > > 3. Is there any detailed document can serve as a guide to read the OSv > source code? > > > > The paper is a good start. We don't have much more, unfortunately. > > > > > Best Wishes! > > > > > > -- > > You received this message because you are subscribed to the Google Groups > "OSv Development" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > For more options, visit https://groups.google.com/d/optout.
Hi Nadav Har'El ,Thanks for your answer,I'll read your paper carefully. -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
