Rationale: It is worth mentioning from the start that this question is about high-level concepts of a new operating system, so a right answer should not include any implementation details. At the same time, most of the aspects related to performance should also be avoided when providing an answer. After all, performance is about engineering and the focus of this question should be on more general design principles, such as security or robustness.
First of all, a good question to ask the interviewer would be ‘What kind of operating system do these design requirements apply to?’. There are various classifications of operating systems. A first classification arises from the platform the operating system is written for. There are two main categories:
- Mobile operating systems – this is the kind of operating system that runs on mobile devices (mobile phones, tablets, other similar gadgets). The focus of such an operating system should be reducing power consumption, as most devices that will use it run on battery.
- Desktop operating systems – this is the operating system that runs on devices that are normally attached to a power source (desktop PCs, laptops). The focus of such an OS would be performance, rather than saving power.
- Single-tasking / Multi-tasking operating systems – single-tasking operating systems can only execute one program at a time, while a multi-tasking OS can run multiple programs at any given moment.
- Single-user / Multi-user operating system – single-user operating systems can be used by one user at a time, while a multi-use OS enables multiple connections to the same machine (for example, remote connections using the SSH command from other computers).
- Distributed / non-distributed operating systems – a distributed operating system manages a group of computers, rather than a single one, and makes these computers appear as a single more powerful machine. The advantage is that computations can be carried out on multiple computers at the same time.
Our model answer will focus on designing a single-user, multi-tasking, non-distributed operating system for desktop computers (PC, Mac, laptop). Here is a list of design principles you may wish to discuss with the interviewer when asked this question, along with some important points for each:
- Security – in terms of the security of a new operating system, perhaps the most important aspect to mention is that users should not have the right to access files that are not meant to be accessed by them. In this sense, the separation between processes that belong to the operation system (those initiated by system calls, for example) and those initiated by the action of users is crucial and should not be missed.
- Simplicity – the simplicity of an operating system is usually defined by how easy it is for the user to find exactly what they are looking for. An example is choosing the right name for file managers (‘My computer’ and ‘Computer’ are good examples that are already used by the world’s biggest OS manufacturers)
- Robustness – the design of an operating system is robust if the addition of new features does not cause any unexpected problems with the ones that are already implemented.
- Extensibility – Generally, an operating system that can be easily extended is regarded as a good operating system. Take, for example, Linux. The fact that made this operating system so popular is its customizability. Experienced users can build their own features or even write their own Linux distributions using the libraries provided.
- Uniformity – A uniform design for a new operating system is a design in which most components of the operating system are consistent. This may include choosing an appropriate color scheme and similar graphics for components with the same functionality.
- Predictability – This principle is about how easily a user can predict where bits of functionality of the operating system are located. For example, considering the trends that are already established, we can predict our users would expect to find the properties of a file by right-clicking on it.
- Reversibility – It may sometimes happen that the users of an operating system perform an operation that they want to cancel or undo. In this sense, a good design for a new operating system should be reversible, allowing this to happen easily.
- Support for multiple platforms – Last but not least, we live in a world where mobile platforms have become an absolute necessity. Therefore, any operating system that can be extended to such devices, or at least offer support for remotely logging in from these has a clear advantage.
To sum up, the key thing to remember is that open ended questions will always be open-ended and there are perhaps an infinite number of answers for them. As long as you keep asking questions and clearly establish the kind of operating system the interviewer is looking for, you will eventually be able to produce a good answer. Mobile operating systems differ greatly from desktop ones, for example, so it is important not to miss this step.