From owner-freebsd-current@FreeBSD.ORG Fri Feb 18 20:28:11 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54A8016A4CE for ; Fri, 18 Feb 2005 20:28:11 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7B3E43D1D for ; Fri, 18 Feb 2005 20:28:10 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [IPv6:::1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j1IKPOYA048299; Fri, 18 Feb 2005 13:25:24 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 18 Feb 2005 13:25:23 -0700 (MST) Message-Id: <20050218.132523.112577260.imp@bsdimp.com> To: gurney_j@resnet.uoregon.edu From: Warner Losh In-Reply-To: <20050218080423.GN40468@funkthat.com> References: <20050218080423.GN40468@funkthat.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: alexjeffburke@gmail.com cc: freebsd-current@freebsd.org Subject: Re: single user v multiuser boot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2005 20:28:11 -0000 From: John-Mark Gurney Subject: Re: single user v multiuser boot Date: Fri, 18 Feb 2005 00:04:23 -0800 > Alex Burke wrote this message on Fri, Feb 18, 2005 at 00:33 +0000: > > I was wondering what gives the kernel the ability to boot in multiuser > > mode, and whether it is some code in the kernel or whether it is the > > init process and associated tools? > > single user usually means that you have enough system that you have > a console running and possibly some disk device, though you can end > up using md as part of the kernel, and not require any real disk > devices to work... > > multiuser usually implies that either disk or network is functional > to some degree where /etc/rc can start executing... > > single user pretty much only requires /sbin/init and /bin/sh to "get" > to... One can get to single user mode without a fully working vm system. One can get to single user mode without having process termination working or image rundown working. Multiuser also requires that the various synchronization primitives be fully functional. So things like fork/exec don't have to work completely. Back when /sbin/init and /bin/sh were statically linked, getting to single user didn't even require mmap to work correctly. Plus, in multi-user mode, jmg is right: networking needs to work, along with generally a much higher load on the interrupt system, the memory system, etc. It also exposes races in the system more than single user mode does (and sometimes a LOT more). In some systems, it can expose cache coherency problems, tlb lookup issues with multiple processes, etc. Warner