Skip to content

Latest commit

 

History

History
executable file
·
48 lines (19 loc) · 984 Bytes

hw.md

File metadata and controls

executable file
·
48 lines (19 loc) · 984 Bytes

lazy page allocation

phenomena

page fault

eip 0x104c

xv6: sh.c

shell

umalloc

xv6 CPU alarm

stack switch

xv6 locking

Don't do this

it would panic on the same cpu or block on another cpu

Interrupts in ide.c

double acquired lock

Interrupts in file.c

it relates to frequency

xv6 lock implementation

Why does release() clear lk->pcs[0] and lk->cpu before clearing lk->locked? Why not wait until after?

Ans: if lk->locked reset first in cpu A, at the same time if another cpu call acquire and get the lock in cpu B, then value of lk->pcs; lk->cpu; may be overrided by in A