Operating Systems Part 1 Flashcards

1
Q

What is TAT?

A

Turn-around time = Waiting Time + Burst Time + I/O Time

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

What are the states of a process?

A

1) New State
2) Ready State
3) Running State
4) I/O State
5) Terminated State
6) Suspend ready state
7) Suspend wait state

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

How to determine the size of a single process?

A
1KB = 2**10
1MB = 2**20
1GB = 2**30
1TB = 2**40
1 Byte = 8 bits
ex: 4GB of Ram, 4KB size of process
4GB = 2**2 * 2**30 => 2**32
4KB = 2**2 * 2**10 => 2**12
2**32 / 2**12 = 2**20 size of a process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the different types of OS?

A

1) Batch OS
2) Multiprogramming OS
3) Multiprocessing OS

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

How to calculate CPU efficiency?

A

Useful time of CPU / Total time of CPU

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

What is parallel processing?

A

a mode of computer operation in which a process is split into parts that execute simultaneously on different processors attached to the same computer.

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

What is the PCB?

A

Process Control Block. A process control block (PCB) is a data structure used by computer operating systems to store all the information about a process. It is also known as a process descriptor.

When a process is created (initialized or installed), the operating system creates a corresponding process control block.
Information in a process control block is updated during the transition of process states.
When the process terminates, its PCB is returned to the pool from which new PCBs are drawn.
Each process has a single PCB

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

What is the context of a process?

A

Each process’s context is described by a task_struct structure. The task_struct holds data such as the scheduling policy, scheduler priority, real time priority, processor allowed time counter, processor registers, file handles (files_struct), virtual memory (mm_struct).

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

What is SJF?

A

Shortest Job First (SJF) is an algorithm in which the process having the smallest execution time is chosen for the next execution. This scheduling method can be preemptive or non-preemptive. It significantly reduces the average waiting time for other processes awaiting execution. The full form of SJF is Shortest Job First.

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

What is SRTF?

A

Shortest remaining time, also known as shortest remaining time first (SRTF), is a scheduling method that is a preemptive version of shortest job next scheduling. In this scheduling algorithm, the process with the smallest amount of time remaining until completion is selected to execute.

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

What is Response Time?

A

Time spent waiting for CPU initial access.

In Non-preemptive scheduling algorithms, RT is the same as Waiting Time.

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

What is FCFS?

A

First Come First Serve (FCFS) is an operating system scheduling algorithm that automatically executes queued requests and processes in order of their arrival. It is the easiest and simplest CPU scheduling algorithm. In this type of algorithm, processes which requests the CPU first get the CPU allocation first. This is managed with a FIFO queue. The full form of FCFS is First Come First Serve.

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

What is the starvation problem?

A

Big process waiting on smaller. Waiting indefinitely, time for CPU access will continue to grow; no upper bound.

SJF -> Yes
SRTF -> Yes
FCFS -> No

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

Convoy Effect Problem?

A
Smaller process waiting on bigger.  
FCFS -> Yes
SJF -> Yes
SRTF -> No
* Higher WT and TAT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is sys call?

A

User’s request to OS software interrupt.

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

What is dual mode?

A

Dual Mode Operation. Two modes are provided by the hardware - user and kernel mode. Mode bit is added to computer hardware to indicate the current mode. … The OS is loaded and then user process is started in user mode. When an interrupt occurs, hardware switches to kernel mode.

17
Q

What is LRTF?

A

LRTF, which stands for Longest Remaining Time First is a scheduling Algorithm used by the operating system to schedule the incoming processes so that they can be executed in a systematic way. … This algorithm can also be called as the preemptive version of the LJF scheduling algorithm.

18
Q

What is Round Robin Scheduling?

A

Round Robin is a CPU scheduling algorithm where each process is assigned a fixed time slot in a cyclic way. It is simple, easy to implement, and starvation-free as all processes get fair share of CPU. … It is preemptive as processes are assigned CPU only for a fixed slice of time at most. TQ (Time Quantum + FCFS)

19
Q

What is Highest Response Ratio Next Scheduling?

A

*Non-preemptive. Highest Response Ratio Next (HRRN) Scheduling
This is a non-preemptive algorithm in which, the scheduling is done on the basis of an extra parameter called Response Ratio. A Response Ratio is calculated for each of the available jobs and the Job with the highest response ratio is given priority over the others.

20
Q

What is fixed partitioning?

A

Fixed partitioning is therefore defined as the system of dividing memory into non-overlapping sizes that are fixed, unmoveable, static. A process may be loaded into a partition of equal or greater size and is confined to its allocated partition.

21
Q

What is First Fit?

A

Traverse RAM for size match, allocate process to first bits in memory that fit?

22
Q

What is Next Fit?

A

Traverse RAM from right where it left off for a size that matches.

23
Q

What is Worst Fit?

A

Traverse entire RAM for largest hole

24
Q

What is Best Fit?

A

Traverse entire RAM for smallest hole that fits.

25
Q

What is Paging?

A

In computer operating systems, paging is a memory management scheme by which a computer stores and retrieves data from secondary storage[a] for use in main memory.[1] In this scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. Paging is an important part of virtual memory implementations in modern operating systems, using secondary storage to let programs exceed the size of available physical memory.

26
Q

What is Segmentation?

A

Paging and segmentation both are the memory management schemes. Paging allows the memory to be divided into fixed sized block whereas the segmentation, divides the memory space into segments of the variable block size

27
Q

What is compaction?

A

Compaction is a process in which the free space is collected in a large memory chunk to make some space available for processes. In memory management, swapping creates multiple fragments in the memory because of the processes moving in and out. Compaction refers to combining all the empty spaces together and processes.