Let's say a 32-bit value is written to a memory location which spans 2 pages. For the sake of the argument let's assume 2 bytes end up in the first page and 2 more in the second one. The first page is writable, but the second page is unmapped. Executing the instruction as whole will trigger a page fault and that's fine.
My question is: will the page fault trigger before or after the first 2 bytes of the value are written to memory? To put it another way will code running after the fault (for example, the fault handler) be able to observe the partial write?
Let's assume an X86 environment, as I suspect that the behavior may be architecture or maybe even model specific.