0

At university this past semester, we played around with x86 assembly- learning how to move memory into registers, playing with the instruction sets, and doing a bit of reverse engineering with binary bombs.

But this got me thinking, if I can write a program which can move memory into the EAX register, what if another program wants to use the EAX register, too? Computers execute droves of instructions under multiple processes nowadays- how is the value that I write in a particular register saved when another process wants to use that register as well? Is it moved to RAM? Into caches?

Kenny Worden
  • 4,335
  • 11
  • 35
  • 62
  • 1
    This question appears to be off-topic because it is not within the bounds of discussion as described in the help center. –  Jun 30 '17 at 20:07
  • 1
    https://en.wikipedia.org/wiki/Context_switch – Peter Cordes Jun 30 '17 at 23:55
  • 1
    Context is saved in RAM by the kernel. Memory is cacheable, so the kernel might have a cache hit when restoring the context if it wasn't evicted. – Peter Cordes Jul 01 '17 at 00:02

0 Answers0