From owner-freebsd-questions Sat Sep 12 09:01:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA13861 for freebsd-questions-outgoing; Sat, 12 Sep 1998 09:01:34 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from laker.net (jet.laker.net [205.245.74.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA13856 for ; Sat, 12 Sep 1998 09:01:29 -0700 (PDT) (envelope-from sfriedri@laker.net) Received: from nt (digital-pbi-130.laker.net [208.0.233.30]) by laker.net (8.9.0/8.9.LAKERNET.NO-SPAM.SPAMMERS.AND.RELAYS.WILL.BE.TRACKED.AND.PROSECUTED.) with SMTP id MAA13931; Sat, 12 Sep 1998 12:00:57 -0400 Message-Id: <199809121600.MAA13931@laker.net> From: "Steve Friedrich" To: "angelayu" , "freebsd-questions@FreeBSD.ORG" Date: Sat, 12 Sep 1998 12:00:56 -0400 Reply-To: "Steve Friedrich" X-Mailer: PMMail 98 Professional (2.01.1600) For Windows NT (4.0.1381;3) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: meaning Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 12 Sep 1998 14:28:17 +0800 (HKT), angelayu wrote: >syncing disks ...3 2 done Unix type operating systems use main memory to "buffer" file write operations, in order to increase performance. Say you have a file that requires 5 blocks on the hard disk. Say you're editing that file, with an editor, and you command the editor to write the file. A write operation to a mechanical device like a hard disk takes milliseconds to perform because the "head" has to be positioned before the write can occur. But a write operation to main memory only takes microseconds. So, to increase performance, an operating system can "buffer" the write to main memory, making your application, in this case the editor, believe that it has actually been written to the disk, and when several blocks have accumulated in the "buffer", the operating system will write several in one operation. Unix style operating systems call this section of main memory used for this purpose, a "buffer cache". This buffer cache is constructed in software, and should not be confused with a CPU's level 1 (L1) or level 2 (L2) cache, which are constructed in hardware. This buffer cache must be written to the actual hard disk before you turn off your computer. That's why unix style operating systems have a shutdown command. When you see: >syncing disks ...3 2 done the operating system is "flushing" the buffer cache to the hard disk so you don't lose this info. Where you see the first "3", it's informing you that it has three disk blocks to write, then it says "2" disk blocks to write, and finally it reports it has written all blocks by displaying "done". The numbers vary each time you shutdown, and nothing is wrong as long as it finally says "done". If you don't see "done", that's a bad thing, and when you boot the operating system the next time, you need to "fsck" the disks. "fsck" stands for file system check and you can read about it in the manual page (type "man fsck" at a unix prompt) or in books that discuss unix system administration. Other operating systems have adopted this performance enhancement as well. Any time you get around a new operating system, check to see if it has a "shutdown" command. DOS got people into a bad habit of just clicking the "off" switch. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message