Operating system Notes

mobiprep (6).png

Introduction of Operating System

mobiprep (6).png

PROCESS: Program to process, Lifecycle of the process, Process control block, IPC

mobiprep (6).png

Scheduling

mobiprep (6).png

Threads

mobiprep (6).png

Memory Management

mobiprep (6).png

File Management

mobiprep (6).png

Synchronization

mobiprep (6).png

Disk Management

mobiprep (6).png

IO Management

mobiprep (6).png

Protection And Security

Heading

Q

1

What is dynamic linking?

LRM_EXPORT_207556595493866_20190724_1939

Ans

1. When one program is dependent on some other program. In such a case, rather than loading all the dependent programs, CPU links the dependent programs to the main executing program when its required. This mechanism is known as Dynamic Linking.
2.Dynamic linking refers to the linking that is done during load or run-time and not when the exe is created.3.Inn case of dynamic linking the linker while creating the exe does minimal work.For the dynamic linker to work it actually has to load the libraries too.Hence it's also called linking loader.

LRM_EXPORT_207556595493866_20190724_1939

Q

2

What is swapping?

LRM_EXPORT_207556595493866_20190724_1939

Ans

Swapping is a memory management scheme in which any process can be temporarily swapped from main memory to secondary memory so that the main memory can be made available for other processes. It is used to improve main memory utilization. In secondary memory, the place where the swapped-out process is stored is called swap space.

The purpose of the swapping in operating system is to access the data present in the hard disk and bring it to RAM so that the application programs can use it. The thing to remember is that swapping is used only when data is not present in RAM.

LRM_EXPORT_207556595493866_20190724_1939

Q

3

What is first fit, worst fit, best fit?

LRM_EXPORT_207556595493866_20190724_1939

Ans

First Fit
In the first fit approach is to allocate the first free partition or hole large enough which can accommodate the process. It finishes after finding the first suitable free partition.

Best Fit
The best fit deals with allocating the smallest free partition which meets the requirement of the requesting process. This algorithm first searches the entire list of free partitions and considers the smallest hole that is adequate. It then tries to find a hole which is close to actual process size needed.

Worst fit
In worst fit approach is to locate largest available free portion so that the portion left will be big enough to be useful. It is the reverse of best fit.

LRM_EXPORT_207556595493866_20190724_1939

Q

4

Define Dynamic Loading.

LRM_EXPORT_207556595493866_20190724_1939

Ans

Dynamic loading is a mechanism by which a computer program can, at run time, load a library (or other binary) into memory, retrieve the addresses of functions and variables contained in the library, execute those functions or access those variables, and unload the library from memory. It is one of the 3 mechanisms by which a computer program can use some other software; the other two are static linking and dynamic linking.

LRM_EXPORT_207556595493866_20190724_1939

Q

5

What are Overlays?

LRM_EXPORT_207556595493866_20190724_1939

Ans

Overlay is a technique to run a program that is bigger than the size of the physical memory by keeping only those instructions and data that are needed at any given time.

Divide the program into modules in such a way that not all modules need to be in the memory at the same time.

The main problem in Fixed partitioning is the size of a process has to be limited by the maximum size of the partition.

LRM_EXPORT_207556595493866_20190724_1939