Hi,
ababo wrote:
Single 64-bit address space. This will give ability for applications to call kernel without need to switch context and serialize data. Moreover it will shorten thread context switches and will remove need to clear TLB-cache.
This won't avoid switching from one context (e.g. the context of an application) to another context (e.g. kernel context). You may or may not reduce the overhead of these context switches depending on how they're done (e.g. no privilege level change) but that has nothing to do with "single 64-bit address space".
Clearing the TLB itself costs almost nothing (it's the TLB misses that clearing the TLB causes that cost something, not clearing it). The TLB miss costs are also not the real problem - the real problem is changing from one working set to another. E.g. the TLBs, instruction caches, data caches, branch prediction buffers, return buffer, etc. are all full of stuff for the previous thread and you switch to a different thread causing TLB misses, instruction cache misses, data cache misses, branch mispredictions, etc. Using a single address space (where you don't change virtual address spaces during thread switches) doesn't avoid any of this; and there's very little difference between "TLB is empty" and "TLB is full of stuff for previous thread that's useless for the current thread".
ababo wrote:
Virtual machine for applications. It will disable applications to exceed own memory boundaries (memory protection). Virtual machine is also useful for distributed environments with several CPU architectures.
Running applications inside a virtual machine will add overhead. It also effectively means that applications are running inside their own virtual address space (it's just that the virtual address space is created by slower software/virtual machine and not faster hardware).
ababo wrote:
Storage devices are mapped to 64-bit address space. RAM is just caching access to persistent storage via address space. In-use pages are loaded to RAM, and not-in-use ones are saved back to device. This is done transparently to applications. This approach makes files redundant: regularly allocated memory is already persistent, thus there is no need to save its content to files.
For 80x86, the address space is 48-bit (256 TiB). This is probably too small for some servers already; and by the time you "finish" the OS it will probably be worse.
This does not make files redundant. If I download a large picture from the internet then modify it and save the modified version, then open one of those pictures in an image viewer, how does the user tell the image viewer which one they want? You must have some sort of human readable identifier (a file name) that is used to find the requested data (the file).
ababo wrote:
Persistent applications. They survive both system restart and moving to another machine. This is partially achieved by the previous point as well as by absence of resource descriptors (e.g. no file handles). To use any resource a unique identifier must be used instead (no need to open the resource before the actual usage). Оn the one hand this will expose some additional overhead (but not too drastic because of caching) but on the other hand this will detach such call from place and time constraints (code which is resumed after system restart or moved to another machine will be able to continue running).
Do you honestly think there's any difference between "unique identifier" and "file handle"?
If there's a power failure or hard reset; do all applications and all disk contents end up corrupted (inconsistent state due to some things being stored on disk while others aren't, at the time of the power loss/reset)?
ababo wrote:
The x86_64 could help us here, because of its segmentation capability. Indeed we could dynamically create memory segment for domain we're going to mount. All domain code addresses are absolute, starting from its beginning. They are implicitly incremented by the segment address inside CPU. But:
For 64-bit code there is no segmentation (it sucked extremely badly due to unavoidable protection check overheads, so nobody used it, so AMD removed it for 64-bit code to improve performance).
In long mode, you can have 32-bit code that uses segments. In this case, all segments have 32-bit base addresses and 32-bit limits. This means that all of your segments will be in the first 4 GiB of the virtual address space (including all of your memory mapped hard disks).
Cheers,
Brendan