Operating system structure and system calls Flashcards
What is the stack?
List of all/part of instructions from a program that are loaded from the Hard Disk Drive into the RAM.
It is slow to access data from Hard Drive, and so when you open a program, part of that program is loaded into the RAM.
What are registers?
Small memory in the CPU. It can only hold small amounts of data. CPU would only load the necessary data from RAM to registers. CPU uses it as it is faster to access data from registers than from RAM.
What is single task operation?
Running a single process at a time in the main memory
What are multitask multiprocesses?
Running multiple processes at a time in the main memory
What is a system call?
Programming interface (commands) to the services provided by the OS. You use it to interact with the kernel.
What is a system program?
Software which provides services to the computer hardware, e.g. Disk Defragmenter, System Task Manager, etc. It may include more than one system call.
What is an application program?
Software which provides services to the users, e.g. Chrome, Microsoft Word.
What structure does MSDOS use?
Simple Kernel structure
What are the disadvantages of using MSDOS?
Program can connect straight away to the device drivers, making it prone to malicious attacks. Kernel does everything and everything is bundled up together which means that it is harder to find problems, and harder to implement and maintain as it needs to keep recompiling the whole program when the kernel or the program is modified.
Describe the UNIX Monolithic structure.
Consists of 2 separate parts: system programs and kernels. Kernel is located between the system call interface and the hardware. It is more secure than the MSDOS structure.
What are the disadvantages of the monolithic structure?
Because all kernel functionality is stored in one level, we must compile all procedures used into one file; making it hard to implement and maintain. We need to keep recompiling the whole program when the kernel or the program is modified. There is no information hiding, every procedure can call all other procedures.
What is the layered approach to operating system design?
The OS is divided into a number of layers, each built on top of lower layers. The bottom layer is the hardware. The highest is the user interface.
What are the advantages of the layered approach?
The layered approach benefit is in easy debugging (finding a problem); as the high layer does not need to know how the lower layer is implemented and we can check the program layer by the layer to find out in which layer the problem occurs.
What are the disadvantages of the layered approach?
The layered approach is less efficient than the monolithic structure because a program has to go through every layer, even the layers that are not needed, and each layer adds overheads to the system call.
Describe the microkernel design?
Making the kernel as small as possible by moving all the non-essentials into the user space: uses object oriented approach and divides the kernels into modules. Each core component is separate. Communication between each modules are done through message passing.