



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!




CS 3204 Spring 2007 3/27/2007 2
CS 3204 Spring 2007 3/27/2007 4
CS 3204 Spring 2007 3/27/2007 5
ustack (1)
kernelkernel
kernelkernel ucode (1)
kcodekdata
kheapkbss
used
free user (1)user (1) udata (1)
user (1)
Pintos then starts the firstprocess … Process faults because codepage is not present … Process faults whentouching address in data segment … stack page was allocated eagerly data + code pages are notedin page table, but no physical frame has been allocated CS 3204 Spring 2007 3/27/2007 6
ustack (2)ustack (1)
kernelkernel
kernelkernel ucode (1)
kcodekdata
kheapkbss
used
free user (1)user (1) udata (1)
user (1)
Pintos then starts the firstprocess … Process faults because codepage is not present … Process calls recursivefunction or allocates large local variable page fault at about here
CS 3204 Spring 2007 3/27/2007 7
ustack (1)
kernelkernel
kernelkernel ucode (1)
kcodekdata
kheapkbss
used
free user (1)user (1) udata (1)
user (1)
Pintos then starts the firstprocess … Process faults because codepage is not present … Process opens file, callsmmap(fd, addr)
ummap (1)
Process faults whentouching mapped file Page fault handler allocspage, maps it, reads data from disk: CS 3204 Spring 2007 3/27/2007 8
CS 3204 Spring 2007 3/27/2007 9
CS 3204 Spring 2007 3/27/2007 11
CS 3204 Spring 2007 3/27/2007 12
CS 3204 Spring 2007 3/27/2007 19
Alloc (16KB) Alloc (32KB) Alloc (4KB) Alloc (4KB) Alloc (4KB) CS 3204 Spring 2007 3/27/2007 20
Free() Free() Free() Free() Free()
CS 3204 Spring 2007 3/27/2007 21
CS 3204 Spring 2007 3/27/2007 22
Alloc (12KB) Alloc (24KB) Alloc (4KB) Alloc (4KB) Alloc (3KB) 12KB
CS 3204 Spring 2007 3/27/2007 23
Free() Free() Free() Free() Free()
Have 8 KB free, but can‘t Alloc(8KB) Have 12 KB free, but can‘t Alloc(12KB)
No external fragmentation
No external fragmentation
CS 3204 Spring 2007 3/27/2007 24
CS 3204 Spring 2007 3/27/2007 25