From owner-freebsd-questions Wed Feb 6 22:31:59 2002 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20]) by hub.freebsd.org (Postfix) with ESMTP id 1046D37B429 for ; Wed, 6 Feb 2002 22:31:43 -0800 (PST) Received: from [212.238.194.207] (helo=mailhost.raggedclown.net) by post.mail.nl.demon.net with esmtp (Exim 3.33 #1) id 16Yi5t-0005ek-00 for questions@freebsd.org; Thu, 07 Feb 2002 06:31:42 +0000 Received: from angel.raggedclown.net (angel.raggedclown.intra [192.168.1.7]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [buffy]) with ESMTP id 4973413040 for ; Thu, 7 Feb 2002 07:31:41 +0100 (CET) Received: by angel.raggedclown.net (Ragged Clown Host [angel], from userid 1001) id 7C0F322593; Thu, 7 Feb 2002 07:31:41 +0100 (CET) Date: Thu, 7 Feb 2002 07:31:41 +0100 From: Cliff Sarginson To: FreeBSD Subject: Re: OT address space Message-ID: <20020207063141.GB7234@raggedclown.net> References: <20020207053621.22969.qmail@web11001.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020207053621.22969.qmail@web11001.mail.yahoo.com> User-Agent: Mutt/1.3.27i 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 Wed, Feb 06, 2002 at 09:36:21PM -0800, faisal gillani wrote: > I am a student of bachelor of computer science .. in > my class our teacher explained to us wat address space > is but i think he was also confused on this ... > can anyone please explain to me what this address > space is ? > Mmm, quite a question :) Part 1... Simply put an "address space" is the areas of computer memory that a "process" may use. A "process" is an incarnation of a program that is actually running on your computer (this is the name Unix uses, other O/S's use other names to mean the same thing). No process can interfere with the address space of another process. This is enforced by the operating system and the computer hardware itself. So if a process tries to use the address space of another process then an error will result, usually causing that process to exit with an error. Part 2... There is also the concept of "kernel address space" and "user address space". The kernel address space is the part of memory used by the kernel (aka operating system). Now a process sometimes needs to use, or be in the kernel address space in order to perform certain functions, so called "system calls" -- these cover i/o requests, some network functions etc etc. This is allowed through a defined interface, a process cannot itself just decide to use kernel adress space except through these interfaces. Part 3... This concept is what allows a multi-user/multi-tasking O/S such as Unix to function. If you consider DOS at the opposite end of the scale, then no such address space concepts really apply, in systems like DOS, a process can just do what it likes with memory. Part 4... In practise this is more complicated, since you really have to talk about "virtual" address space, memory pages, mappings, shared memory and other such fripperies. This needs at least a chapter from a good book on O/S concepts to explain :). I hope the above gives you some taste of the idea (which a lecturer on Computer Science should be able to explain btw !). -- Regards Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message