Training
×

Virtual Segments/Pages

Let’s have a closer look into the layout of a virtual segment.
Each real-time process (comprised of one or more threads) is placed in its own segment (with a unique segment descriptor). Thus, each real-time process is isolated from other processes, including the Windows process which occupies its own segment. If code tries to access an address outside of its segment, a general protection fault is generated.
 
Every process is assigned pages of memory for code, data, stack and dynamically allocated memory. By separating the pages with unallocated memory bands, memory overruns can be detected (if an address outside of the allocated pages is accessed, a page fault is generated which is trapped and treated as a memory access violation). Code is protected by being placed in read-only pages.
The page size is 4kbytes.