Operating Systems Part 1 Flashcards
What is TAT?
Turn-around time = Waiting Time + Burst Time + I/O Time
What are the states of a process?
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 to determine the size of a single process?
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
What are the different types of OS?
1) Batch OS
2) Multiprogramming OS
3) Multiprocessing OS
How to calculate CPU efficiency?
Useful time of CPU / Total time of CPU
What is parallel processing?
a mode of computer operation in which a process is split into parts that execute simultaneously on different processors attached to the same computer.
What is the PCB?
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
What is the context of a process?
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).
What is SJF?
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.
What is SRTF?
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.
What is Response Time?
Time spent waiting for CPU initial access.
In Non-preemptive scheduling algorithms, RT is the same as Waiting Time.
What is FCFS?
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.
What is the starvation problem?
Big process waiting on smaller. Waiting indefinitely, time for CPU access will continue to grow; no upper bound.
SJF -> Yes
SRTF -> Yes
FCFS -> No
Convoy Effect Problem?
Smaller process waiting on bigger. FCFS -> Yes SJF -> Yes SRTF -> No * Higher WT and TAT
What is sys call?
User’s request to OS software interrupt.