Memory mannagment

Alfred Perlstein alfred at freebsd.org
Thu Jun 14 07:08:08 UTC 2007


* cadastrosonline cadastrosonline <cadastrosonline at yahoo.com.br> [070613 23:42] wrote:
> First of all,
> 
> "Each process has its own private address space. The address space is initially divided
> into three logical segments: text,
> data, and stack. "
> 
> But if the address is just something like 343556 then how does it really work? The memory is divided into segments is that what it means?

Each process has a seperate virtual vmspace, this means that address 343556
in process A can map to a different physical address in process B.

> "The data segment contains the initialized and uninitialized data portions of a program"
> 
> Is it talking about multithreading? I COULDNT FIND anything talking about how freebsd deals with multithreading, just found out it does it by man pthread.

The data segment has nothing to do with multithreading other than as
a shared memory space for use by multiple threads.

> Tell me anything else interesting to know about memory mannagment, does it use any algorithm to substitute a page when out of pages in memory? such as "second chance" "fifo" "lru" (last recently used) "nfu" (not frequently used) and so on? I am studying freebsd but sometimes I am out of ways to find out, yes I am reading the handbook about memory mannagment as you can see my quotes but sometimes I don't understand.

FreeBSD uses a LRU.

If you want to learn more I would advise you to purchase "The Design
and Implementation of the FreeBSD Operating System" by McKusick.

You can also use the FreeBSD mailing lists if you so desire.

Good luck and enjoy.

(btw, FreeBSD is how I learned most of my deeper OS level concepts,
so you're in the right place.)

-- 
- Alfred Perlstein


More information about the freebsd-arch mailing list