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

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -