












































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













































































(optional)
User Process OS
Time
Interrupt vector
Exception numbers 0 1 2
n-1 Address of handler n-
Address of handler 2
Address of handler 1
Address of handler 0
Can not be read/written by any other process I.e., address 0x400000 is different for every process
User Stack
Shared Libraries
Heap
Read/Write Data
Read-only Code and Data
Unused
0x7FFFFFFFFFFF
%rsp
0x
0x
int a[1000]; int main(void) { a[5000] = 23; return (0); }
0x400448
page fault Detect invalid address
event (^) movl
Signal process
User Process OS
User Process OS
page fault Load page into memory return
event (^) mov
int a[1000] = { 0, 1, 2, … }; int main(void) { printf(“%d\n”, a[500]); return (0); }
0x40049c <main+4>: mov 0x200bae(%rip),%esi # 0x601050 <a+2000>
Time
Process A Process B Process C
Time
Process A Process B Process C
if (fork() == 0) printf("hello from child\n"); else printf("hello from parent\n");
Interesting & confusing – called once, but returns twice!