5 ms·
Yes, thats exactly the reasoning, why it isn't a problem to handle the interrupts only between basic blocks. Qemu does something similar. The ATmega32 makes it
by MackieLoeffel 10y ago
Yes, thats exactly the reasoning, why it isn't a problem to handle the interrupts only between basic blocks. Qemu does something similar. The ATmega32 makes it easy in this regard, because it doesn't have exceptions/traps, which have to be executed synchronously (div by 0 isn't a problem, because there is no div instruction). JIT compiling for a x86 is far harder, because you have to make sure, that the traps are triggered at the correct points in time (e.g. a page fault, which happens during the fetching of an instruction).
- chrisseaton 10y agoI only know about it because I do the same thing in dynamic programming languages. In Ruby you can redefine methods at any point, but in my implementation I only check if they have been redefined once per loop in the program. If another thread wants to redefine a method, it just waits a little while until all the other threads are ready. This means we can basically ignore the problem of method redefinition - as we only allow it when we are ready and then we can handle it slow-time.