[lfs-dev] systemd vs system V

Pierre Labastie pierre.labastie at neuf.fr
Mon Mar 31 12:20:19 PDT 2014


Le 31/03/2014 20:26, Bruce Dubbs a écrit :
> I've been working on rewriting Chapter 7 to incorporate systemd.  I've 
> come up with the following text in the introduction and would like 
> feedback.  Thanks,
> 
>    -- Bruce
> 
> 7.1.1. System V
> 
> System V is the classic boot process that has been used in Unix and 
> Unix-like systems such as Linux since about 1983. It consists of a small 
> program, init, that sets up basic programs such as login (via getty) and 
> runs a script. This script, usually named rc, controls the execution of 
> a set of additional scripts that perform the tasks required to 
> initialize the system.
> 
> The init program is controlled by the /etc/inittab file and is organized 
> into run levels that can be run by the user:
> 
>      0 — halt
>      1 — Single user mode
>      2 — Multiuser, without networking
>      3 — Full multiuser mode
>      4 — User definable
>      5 — Full multiuser mode with display manager
>      6 — reboot
> 
> The usual default run level is 3 or 5.
> 
> Advantages
> 
>      + Established, well understood system.
> 
>      + Easy to customize.
> 
> Disadvantages
> 
>      - Slower to boot. A medium speed base LFS system takes 8-12 seconds 
> where the boot time is measured from the first kernel message to the 
> login prompt. Network connectivity is typically established about 2 
> seconds after the login prompt.
> 
>      - Serial processing of boot tasks. This is related to the previous 
> point. A delay in any process such as a file system check, will deleay 
> the entire boot process.
> 
>      - Does not directly support advanced features like control groups 
> (cgroups), and per-user fair share scheduling.
> 
>      - Adding scripts requires manual, static sequencing decisions.
> 
> 7.1.2. Systemd
> 
> Systemd is a group of interconnected programs that handles system and 
> individual process requests. It provides a dependency system between 
> various entities called "units". It automatically addresses dependencies 
> between units and can execute several startup tasks in parallel. It 
> provides login, inetd, logging, time, networking services, and other tasks.
> 
> Advantages
> 
>      + Used on many extablished distributions by default.
> 
>      + There is extensive documentation.
> 
>      + Parallel execution of boot processes. A medium speed base LFS 
> system takes 6-10 seconds from kernel start to a login prompt. Network 
> connectivity is typically established about 2 seconds after the login 
> prompt. More complex startup procedures may show a greater speedup when 
> compared to System V.
> 
>      + Implements advanced features such as control groups to manage
>        related processes.
> 
>      + Maintains backward compatibility with System V programs and
>        scripts.
> 
> Disadvantages
> 
>      - There is a substantial learning curve.
> 
>      - Some advanced features such as dbus or cgroups cannot be diabled 
> if they are not otherwise needed. Systemd knows better than the user.
> 
>      - Logging is done in a binary format. Extra tools must be used to 
> process logs or additional processes must be implemented to duplicate 
> traditional logging programs.
> 
>      - Systemd violates two of the points of traditional Unix philosophy:
> 
>          Write programs that do one thing and do it well.
>          Write programs to work together.
>          Write programs to handle text streams, because that is a
>          universal interface.
> 
> 
-You have three points in "two of the points of traditional Unix
philosophy"... Maybe violates ids to strong?

- Pointers to the "extensive documentation"?

- Serial processing of boot tasks is traditional in sysv, but not mandatory.
One could imagine creating some Makefile style processing, (actually, Debian
does, I think). Then if the equivalent of make is called with the equivalent
of -jN, some parallelism could be achieved.

s/extablished/established
s/diabled/disabled/

Regards
Pierre



More information about the lfs-dev mailing list