Date: Mon, 23 Sep 2002 23:36:38 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: MET <met@uberstats.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Time-Sharing ? Message-ID: <20020923203638.GE74987@hades.hell.gr> In-Reply-To: <000c01c26323$13ab16e0$6401a8c0@SURVIVAL> References: <000c01c26323$13ab16e0$6401a8c0@SURVIVAL>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-09-23 13:02, MET <met@uberstats.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020923203638.GE74987>