225k views
4 votes
Imagine running a 64-bit system on a 32-bit system, where we simulate a single 64- bit memory location (register) using two atomic 32-bit memory locations (registers). A write operation is implemented by simply writing the first 32-bits of the simulated 64-bit register in the first real register, then the second 32-bits in the second real register. A read, similarly, reads the first half from the first register, then the second half from the second register, and returns the concatenation. What is the strongest property that this 64-bit register satisfies: safe, regular, or atomic

User Monkey
by
4.5k points

1 Answer

4 votes

Answer:

It's not possible to ensure memory access occurs indivisibly when it has to broken into multiple operations. Unfortunately, the fact that your application is running on a 64-bit kernel does not change the equation any - it is actually running in a compatibility layer and has none of the benefits of x64

Step-by-step explanation:

User NoSkill
by
4.7k points