Liste des Groupes | Revenir à c arch |
On 4/3/2025 9:09 AM, Stefan Monnier wrote:Have you seen the MPRV bit in RISCV? Allows memory ops to execute using the previous mode / address space. The bit just has to be set, then do the memory op, then reset the bit. Makes it easy to access data using the process address space.BGB [2025-04-01 23:19:11] wrote:Or, to allow for NOMMU operation, or reduce costs by not having context switches result in as large of numbers of TLB misses.But, yeah, inter-process function pointers aren't really a thing, and should>
not be a thing.
AFAIK, this point was brought in the context of a shared address space
(I assumed it was some kind of SASOS situation, but the same thing
happens with per-thread data inside a POSIX-style process).
Function pointers are perfectly normal and common in data (even tho they
may often be implicit, e.g. within the method table of objects), and the
whole point of sharing an address space is to be able to exchange data.
>
Also makes the kernel simpler as it doesn't need to deal with each process having its own address space.
Some data sharing is used for IPC, but directly sharing function pointers between processes, or local memory (stack, malloc, etc), is not allowed.Thinking of having a CPU local address space in Q+ to store vars for that particular CPU. It looks like only a small RAM is required. I guess it would be hardware thread local storage. May place the RAM in the CPU itself.
Though, things may change later, there is a plan to more to separate global/local address ranges. Likely things like code will remain in the shared range, and program data will be in the local range.
>
>
Stefan
Les messages affichés proviennent d'usenet.