Special Registers Flags Page Directory Base Interrupt Vector Base Call Gate Base Call Gate Length Debug Address System Stack Pointer 0111??? SSIPSYSVMZNOF FFFFFFFE
Interrupts 1 = clock tick 2 = page fault 3 = keyboard click 4 = debug breakpoint 5 = privileged operation etc
System Call Indexes (call gate entries) 0 = fork 1 = exit 2 = alloc (request more memory pages) 3 = read 4 = write etc
Current Virtual Memory Map virtual addressphysical addresscontent Does not exist... 7FFFD000 7FFFE000 7FFFF Does not exist A B O.S.... FFFFD000 FFFFE000 FFFFF System mode stack
What happens when interrupt N is signalled if IP flag = 1, nothing push all normal regs on system stack push FLAGS on system stack set IP flag and SYS flag push PC on system stack set PC = [interrupt vector base reg + N]
What happens when SYSCALL N is executed if N =call gate length register signal “privileged operation” interrupt push all normal regs on system stack push FLAGS on system stack set SYS flag push PC on system stack set PC = [call gate base reg + N]
Page Table Entries Page addresses are all multiples of 4096 (4K) last 12 bits are useless Used for page specific flags instead. Minimum Necessary: 2 bits RResident / Valid UUser-mode access permitted Any attempted access when R=0 or (U=0 and SYS flag = 0) results in PAGE FAULT interrupt.