From owner-freebsd-questions Mon Sep 23 14: 0:56 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DE1337B401 for ; Mon, 23 Sep 2002 14:00:55 -0700 (PDT) Received: from nic.upatras.gr (nic.upatras.gr [150.140.129.30]) by mx1.FreeBSD.org (Postfix) with SMTP id 55CE143E6E for ; Mon, 23 Sep 2002 14:00:53 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 2862 invoked from network); 23 Sep 2002 20:54:00 -0000 Received: from upnet-dialinpool-50.upatras.gr (HELO hades.hell.gr) (150.140.128.204) by nic.upatras.gr with SMTP; 23 Sep 2002 20:54:00 -0000 Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.6/8.12.3) with ESMTP id g8NL0tmh082335 for ; Tue, 24 Sep 2002 00:00:55 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by hades.hell.gr (8.12.6/8.12.3/Submit) id g8NKadOX079957; Mon, 23 Sep 2002 23:36:39 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 23 Sep 2002 23:36:38 +0300 From: Giorgos Keramidas To: MET Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Time-Sharing ? Message-ID: <20020923203638.GE74987@hades.hell.gr> References: <000c01c26323$13ab16e0$6401a8c0@SURVIVAL> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000c01c26323$13ab16e0$6401a8c0@SURVIVAL> X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-09-23 13:02, MET wrote: > I see this phrase everywhere. What exactly is meant by 'time-sharing' > in Unix? When many programs are run, on a single machine, there's eventually some limit that they will hit as trying to run "at the same time". There's only one CPU for instance[1]. Time-sharing refers to a technique that many operating systems use to give the impression that programs "run at the same time". A simple diagram might help you understand this better. If there are three programs that are "running" on a multi-processing operating system (one that allows the execution of many `processes', i.e. programs, at once), and time advances from left to right... the following diagram shows the fragments of time that each program occupies the cpu of the machine. A |---XXX-----XXX----------XXX-----------XXX--------------XXX--| B |-------XXX---------XXX-----------XXX-------XXX-----XXX------| C |--------------XXX-----------XXX----------------XXX----------| If you project this to a single line, replacing XXX with the name of the program you get something like: T |---AAA-BBB-AAACCC--BBB--AAA-CCC--BBB--AAA--BBB-AAA-BBB-AAA--| The three programs "share" the time of the machine's cpu, and the operating system takes care of periodically running each one for short periods of time. I hope this helps a bit, Giorgos. [1] Well, SMP machines make this statement less true, but that's besides the point. Let's stick to a simple example. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message