Deleted Added
full compact
kernel.ms (15230) kernel.ms (18715)
1.\"
2.\" ----------------------------------------------------------------------------
3.\" "THE BEER-WARE LICENSE" (Revision 42):
4.\" <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
5.\" can do whatever you want with this stuff. If we meet some day, and you think
6.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7.\" ----------------------------------------------------------------------------
8.\"
1.\"
2.\" ----------------------------------------------------------------------------
3.\" "THE BEER-WARE LICENSE" (Revision 42):
4.\" <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
5.\" can do whatever you want with this stuff. If we meet some day, and you think
6.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7.\" ----------------------------------------------------------------------------
8.\"
9.\" $Id$
9.\" $Id: kernel.ms,v 1.1 1996/04/13 08:30:16 phk Exp $
10.\"
11.ds RH The kernel and memory
12.NH
13The kernel and memory
14.PP
15Brk(2) isn't a particular convenient interface,
16it was probably made more to fit the memory model of the
17hardware being used, than to fill the needs of the programmers.

--- 7 unchanged lines hidden (view full) ---

25how the kernels exploited them varied a lot from UNIX to UNIX and from
26machine to machine.
27.PP
28Typically a process would have one segment for the text section, one
29for the data and bss section combined and one for the stack.
30On some systems the text shared a segment with the data and bss, and was
31consequently just as writable as them.
32.PP
10.\"
11.ds RH The kernel and memory
12.NH
13The kernel and memory
14.PP
15Brk(2) isn't a particular convenient interface,
16it was probably made more to fit the memory model of the
17hardware being used, than to fill the needs of the programmers.

--- 7 unchanged lines hidden (view full) ---

25how the kernels exploited them varied a lot from UNIX to UNIX and from
26machine to machine.
27.PP
28Typically a process would have one segment for the text section, one
29for the data and bss section combined and one for the stack.
30On some systems the text shared a segment with the data and bss, and was
31consequently just as writable as them.
32.PP
33In this setup all the the brk(2) system call have to do is to find the
33In this setup all the brk(2) system call have to do is to find the
34right amount of free storage, possibly moving things around in physical
35memory, maybe even swapping out a segment or two to make space,
36and change the upper limit on the data segment according to the address given.
37.PP
38In a more modern page based virtual memory implementation this is still
39pretty much the situation, except that the granularity is now pages:
40The kernel finds the right number of free pages, possibly paging some
41pages out to free them up, and then plug them into the page-table of

--- 15 unchanged lines hidden ---
34right amount of free storage, possibly moving things around in physical
35memory, maybe even swapping out a segment or two to make space,
36and change the upper limit on the data segment according to the address given.
37.PP
38In a more modern page based virtual memory implementation this is still
39pretty much the situation, except that the granularity is now pages:
40The kernel finds the right number of free pages, possibly paging some
41pages out to free them up, and then plug them into the page-table of

--- 15 unchanged lines hidden ---