Software Archive
Read-only legacy content
17061 Discussions

Question on Separating TEXT (Instructions) and DATA virtual Address Spaces

Kovvali__Surya
Beginner
288 Views

I have a random question, possibly does not belong in this forum, but could not find the right forum.

In many architectures, the per process Virtual Address space is common for both Text (Instruction Stream), Data (Data stream), Stack etc., and when program loaded virtual space allocated for all 3 types in the same VA. To my understanding, when a process is running on Host OS, on a Virtual Machine (VM) or Container on Host OS or Client OS, at the CPU HW level it is a process with it’s Virtual Address space, and at the fast path CPU<>Memory interface level that is a process VA, and   other than for IO, some trap etc., VM, Container etc. are transparent. While the per process VA that is common to TEXT & data were probably targeted for dissimilar programs, in the cloud hosted servers, for example same Webserver code may be servicing 100 different hosted webservers.  For protection reasons across different webservers, currently they would be different processes, since the multiple tasks using the same process VA will not have protection boundaries.  I am wondering if the TEXT and Data Virtual Address Spaces are separated as TEXT-VA, and Data-VA then the same Webserver program/Text could run multiple webservers, each with different DATA-VAs, which improves CPU/Cache performance, and reduces, Swapping/Paging.  HW Level protection could protect TEXT-VA, and thus a running process of one serve could not alter the TEXT segment.  I am wondering  if such was considered and tradeoffs explored.

Dr. Skovvali

0 Kudos
0 Replies
Reply