:: Re: [DNG] Technical overview of ini…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Steve Litt
Fecha:  
A: dng
Asunto: Re: [DNG] Technical overview of init systems
On Thu, 10 Aug 2017 09:22:38 -0500
"Jamey Fletcher" <jamey@???> wrote:


> Take what he's written, add in your thoughts, more clearly specify the
> differences between inits, supervisors, hypervisors, and containers,
> and write up your own explanation.


This will probably fail due to a lack of agreed upon definitions. I'll
discuss just inits and supervisors here.

There are folks who say if it's not part of PID1, it's not part of the
init system. That means that runit's rc files and process supervisor
aren't part of the init system. But on very similar s6, where the
supervisor *is* part of PID1, the whole thing is an init. And what
about OpenRC, which has no PID1 at all but must borrow one from
somewhere else, typically from sysvinit? Is OpenRC not an init system?

As far as the word supervisor, Laurent Bercot is working very hard to
keep a pure definition. I'm not sure I agree with all elements of his
definition, but could live with it if he would write very tight
definitions for both "process supervisor", "supervisor" if any
different, and "process manager". We'd then have to correct the
millions using different terminology.

We see this definition mess all the time when people talk about "window
managers" and "desktop environments". That's a distinction that never
should have been made.

I suggest everyone read and do their best to understand
https://skarnet.org/software/s6/s6-svscan-1.html. This page does a
great job of defining and explaining the three stages of the
initialization process, and if you read carefully, it explains that
there's not necessarily a relationship between stage and PID. In runit,
stage1 is done in PID1, but a fork to an rc file culminating in
runsvdir does all the stage2 work, while PID1 continues to check for
zombies. In s6, PID1 does the first part of stage1, then the rest of
stage1 is forked, and then supervisor s6-svscan is execed into PID1,
and s6-svscan not only supervises, but also checks for zombies.

I'm a little confused on stage3, shutdown. When I've built my own init
systems, I've always had stage3 just be a shellscript to shut
everything down. Sometimes I shut down by manually running the
shellscript, rather than sending a signal. Crude, but effective.
https://skarnet.org/software/s6/s6-svscan-1.html has an excellent
bullet list on the four things a stage3 must do.

https://skarnet.org/software/s6/s6-svscan-1.html is one of a few
documents I read before beginning the Manjaro Experiments, along with
such classics as ewontfix.com/14 and the Daemontools documentation. It
helped me immensely, and I highly recommend it.


SteveT

Steve Litt
July 2017 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz