Quote:
A process should never be able to get full control of the CPU, if it does, then there's no point in protecting the memory pages.
Sorry; what I meant really was that the process is currently running on the CPU, and the kernel is not currently running, so the process has control over the CPU
unless the CPU prevents it from accessing memory, or the OS can somehow be called through an interrupt when the process accesses out of bounds memory.
Quote:
Your process gets virtual memory assigned by your kernel, so the kernel controls what memory can and cannot be written to/read from. If your process allocates memory and there's no assigned virtual memory left for that process, it should request more virtual memory.
The kernel receives this request (probably using a syscall) and can for example check if the process isn't using too much resources yet.
Isn't that basically describing paging? Actually, the entire purpose of this post was to see if there were any alternatives to paging because the pages take up a fair amount of memory on a system with memory constraints, and I don't really need all of the functionalities it promises. I just need to be able to prevent a task from overwriting kernel space.
Quote:
If you don't control what's in the task, then segmentation, page translation, interpretation/emulation of task's code (hardware-assisted virtualization is just a variation on the theme of memory protection with page translation).
Can you elaborate more on each system and roughly give like how much memory it uses and such? I have seen some of what you are saying and have an idea of it, but what I was asking more for was like a bulleted list of each process and perhaps a brief overview on what it entails. I know that it is somewhat vague and perhaps hard/tedious to map out.
Quote:
If you do, you can just insert checks into the task.
Lets just go with the initial premise that assuming an arbitrary task that can contain anything is in memory, and it is running at the moment.
I just want to prevent it from overwriting memory outside of its allocated space; if the task causes other problems such as processor/operating system exceptions, than I can deal with that. I just want it to stay in it's bounds.