Microsoft had been designing a completely new OS (Yes it isnt Windows at least Microsoft says that). This new project is called Singularity and it is aimed at designing an OS which is stable and fast. Singularity is written Sing# (most of you wont have heard even its name but its just a derivative of C#).
Features of Singularity
SPIs:Singularity implements SPIs, i.e., Software Isolated Processes which means that now onwards it is the responsibility of the OS to make sure that no two processes interfere with each other. With SPIs being implemented Shared Memory concept is out. No two processes can share memory. If two processes want to communicate they will have to use special channels for communication and all communication will take place through a part in memory called Exchange Heap. Processes will pass pointers to this data and thus communicate with each other. So no process can by any method interfere with memory space of other process. So no longer OS crash due application crashes.
ContractBased Channels: These channels will be responsible for inter-process communication. A channel is a bi-directional message conduit with exactly two endpoints. This process of transfer starts with one process sending a message. If the other end is able to read that message (i.e., compatible) then process of transfer starts.
Manifest-Based Coding: Remember MD5/SHA checks a file if it is a valid one. Singularity implements the same procedure for executable files. Files are checked for possible errors they can generate while execution. Singularity no longer supports Dynamic Code Generation (which is mainly done is order to increase the performance of application.)
So with Singularity RDK 2.0 out, picture is becoming clearer.
Advantages of Singularity
- Every process runs in an isolated manner so in case one process fails the machine can still go on. Although this may not seem as a big achievement in case of apps as many current OSes already have this capability but it is surely worth appreciation that this technique has been extended even to drivers so if an application reading from a device fails the device will still continue to work properly (e.g. the GPU may stop working in present OSes if an application using it crashes).
- A lot of weight has been shed from the kernel with nearly every basic function being implemented in form of SPI (Software Isolated Process) and ABI (Application Binary Interface). So this will result in faster, lighter and more responsive kernel.
- With use of Manifest Based Programs no longer unsafe applications will be able to run which means lesser number of malicious programs.
- Possible runtime errors can be judged early using Manifest Based Program execution.
- With each memory block only accessible to only one process garbage collection is a lot easier and faster job resulting in efficient and fast retrieval of memory.
- With ability to select kernel users can effectively run programs faster.
- No more unnecessary checks for safe language coded application.
- Low hardware load software does all the necessary memory handling jobs so less expensive hardware needed.
Disadvantages of Singularity
- With resource sharing no longer possible using shared memory it will get difficult for application to communicate and will include a lot of overheads. This will affect application like game trainers which modify the value at memory being handled by other processes.
- More amount of memory will be needed to run Singularity as a different section exchange heap will be needed to exchange information between two processes.
- Singularity may be able to boot faster and may be less CPU intensive but with the use of contract based channels as only way of communication the application performance may degrade.
- No longer would programmers be able to write self-generating code so as to optimize application performance at runtime.
- File reading is no longer an easier job as it would result in calling of an ABI which has higher overhead than a normal function call.
- Manifest Based Program execution can cause the startup time of application to increase.
- With extra code being added to increase the number of modes of accessing an I/O device the performance of I/O devices may degrade.
- Older applications may fail to run on Singularity as they may not follow the protocols set by Singularity.
Nice information. Do cover more on this..!
Cheers’
Vijay | MS-MVP
Thanks a lot Vijay, I’ll surely tell Ramjot to post updates. Its really my pleasure to get comment from a MVP.
It seems the Singularity trail has gone cold. I was hoping to find a community similar to Minix3 but it doesn’t appear one exists. Also, I can’t seem to find the sort of documentation that would help a student learn about the implementation of Singularity. Oh well..I hope things pick up.