Is it possible to support multiple processes without support for virtual memory? I would like to know more about it if so.
You can run a multi-process operating system even with no hardware support (no MMU), with all pointers representing a physical address. You do however lose several key features usually provided through the MMU:
- Since a pointer always points to a specific place in RAM, you can't have swap (or only in a very limited way). Normally, the MMU raises an exception when it can't find a physical page for a given virtual address, and the OS-provided exception handler fetches the page from swap.
- Since a pointer is dereferenced with no check, every process can access other processes's memory, and the kernel memory. Normally, the MMU raises an exception when it can't find a physical page for a given virtual address, and the OS-provided exception handler terminates the process for attempting an invalid access.
- Since the same pointer has the same meaning in different processes, you can't easily implement fork. Normally, the effect of
forkis to make a copy¹ of the process's physical memory, and create a new virtual memory map from the same virtual addresses to the new physical addresses.
There are unix-like operating systems that work on systems with no MMU.
- MINIX is a unix variant originally developed by Andrew Tanenbaum as a companion to his book Operating Systems: Design and Implementation. The original versions ran on the PCs of the time, which couldn't support virtual memory. (Given your interests, I recommend reading this book, even an older edition if that's all you can afford.)
- µCLinux is a variant of Linux for microcontrollers without an MMU. µCLinux's limitations include not implementing a general fork (only
vforkis supported), and the absence of memory protection; but there is preemptive multitasking.
¹ In modern unices, this is usually done lazily (copy-on-write), which again relies on the MMU raising an exception when it can't find a physical page.
It is certainly possible with some constraints like memory protection which would be an issue as already stated. For example µClinux http://www.uclinux.org/ supports multiple processes without implementing virtual memory. Note that some CPUs like at least the Analog Devices Blackfin do provide a MPU (Memory Protection Unit) http://docs.blackfin.uclinux.org/doku.php?id=bfin:mpu . This allows virtual memory less operating systems to still allow memory to be partitioned.
This depends on how you define process vs threads in terms of memory.
One of the functions of virtual memory is partitioning. While it is possible to run multiple processes without any partitioning, this would be more like running multiple threads than processes - sharing the same address space.