Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2002 07:31:41 +0100
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        FreeBSD <questions@freebsd.org>
Subject:   Re: OT address space
Message-ID:  <20020207063141.GB7234@raggedclown.net>
In-Reply-To: <20020207053621.22969.qmail@web11001.mail.yahoo.com>
References:  <20020207053621.22969.qmail@web11001.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020207063141.GB7234>