mrjbom wrote:
Hi.
I fully understand the order in which to implement some parts in my 32-bit core.
My goal now is to add multitasking.
I found the article "
kernel multitasking"
The requirements have page paging.
But I don't know if I have everything I need before implementing paging.
I don't have any virtual memory right now.
At the moment I manage my physical memory like this:
I divide all physical memory into 4096-byte pages. And I make them out if I have to.
Now I need to make a virtual memory? Only then do you start multitasking?
In what order do I need to implement something?
Thanks.
You don't need virtual memory to implement multi-tasking. Lots of kernels have only a single address space with multiple threads of execution.
But, paging does enable a whole host of other features, not least the ability to have multiple address spaces, to provide a protection domain to allow independent, isolated processes, as well as releasing you from the shackles of physical memory layout and size.
Paging is just the mapping from a linear virtual address space to a potentially non-linear physical address space. Virtual memory can be facilitated by paging, but you can also implement paging without having virtual memory, and indeed, UNIX/32V (the port of V7 UNIX to the DEC VAX) is an example of an OS using the paging hardware, but not using paging to implement virtual memory.