unix - What is context in xv6? -


what usage of context in xv6 os ? job of each register in context ?

struct context {   uint edi;   uint esi;   uint ebx;   uint ebp;   uint eip; }; 

context set of information allows resume execution of task exact same point stopped due context switch (i.e. scheduler selects task run , suspends current one, hence has save execution information of current task , restore of next task run).

the purpose of each of registers is:

  • edi: destination index, string operations
  • esi: source index, string operations
  • ebx: base index, use arrays
  • ebp: stack base pointer, holding address of current stack frame
  • eip: instruction pointer, points instruction executed

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -