Operating system structure and system calls Flashcards

1
Q

What is the stack?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are registers?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is single task operation?

A

Running a single process at a time in the main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are multitask multiprocesses?

A

Running multiple processes at a time in the main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a system call?

A

Programming interface (commands) to the services provided by the OS. You use it to interact with the kernel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a system program?

A

Software which provides services to the computer hardware, e.g. Disk Defragmenter, System Task Manager, etc. It may include more than one system call.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an application program?

A

Software which provides services to the users, e.g. Chrome, Microsoft Word.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What structure does MSDOS use?

A

Simple Kernel structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the disadvantages of using MSDOS?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the UNIX Monolithic structure.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the disadvantages of the monolithic structure?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the layered approach to operating system design?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the advantages of the layered approach?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the disadvantages of the layered approach?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe the microkernel design?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

describe the advantages of the microkernel design

A

Easier to extend microkernel, to port the OS to new architectures, more reliable and secure. It is easy to construct and debug as we can test each module to know in which the problem occurs. When a module is updated, we would only need to update/recompile programs that use that module.

17
Q

describe the disadvantyages of the microkernel design

A

There are lots of performance overhead for user space to kernel space communication. All modules are loaded even when they are not required.

18
Q

describe loadable kernel modules design

A

Just like Microkernel, however each module would only be loaded within the kernel when it is required.

19
Q

What are the advantages of loadable kernel design

A

The kernel becomes smaller than microkernel because we would only load modules that are required.

20
Q

What makes up the MAC OS?

A

Consists of Aqua UI (for GUI), Cocoa (for programming environment), Mach (microkernel) and BSD Unix (monolithic kernel).

21
Q

Describe the booting process

A

When the computer power is turned on, the booting process is started in CPU real mode by BIOS reading the firmware ROM of each device to see whether the device is working properly and set their initial settings. After everything is OK, the OS is started and the CPU switches to protected model

22
Q

What is GRUB?

A

Common bootstrap loader, which allows user to select the type of OS/kernel that user wants to use.