0% found this document useful (0 votes)
368 views1 page

Operating System CheatSheet (By Love Babbar)

The document provides a comprehensive overview of operating systems, covering key concepts such as types of operating systems, process management, memory management, and synchronization. It discusses various scheduling algorithms, deadlock conditions, and memory allocation strategies, as well as virtualization and containerization. Additionally, it highlights important terms and concepts essential for understanding operating systems, making it a useful cheat sheet for exam preparation.

Uploaded by

Rachit Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
368 views1 page

Operating System CheatSheet (By Love Babbar)

The document provides a comprehensive overview of operating systems, covering key concepts such as types of operating systems, process management, memory management, and synchronization. It discusses various scheduling algorithms, deadlock conditions, and memory allocation strategies, as well as virtualization and containerization. Additionally, it highlights important terms and concepts essential for understanding operating systems, making it a useful cheat sheet for exam preparation.

Uploaded by

Rachit Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Quick Notes to Follow:

What is an Operating System ?

Services provided by an Operating System ?

Batched OS

Time Sharing OS

Types of OS Distributed OS

Network OS

Real Time OS

RAM vs ROM

SRAM & DRAM

Overview PROM, EPROM & EEROM

Virtualisation vs Containerisation

BIOS vs UEFI

MBR vs GPT

Important terms to know: 10

MultiProgramming, MultiProcessing, MultiTasking &


MultiThreading

Monolithic architecture vs MicroKernel arch

Why Windows kernel is more monolithic & not


microkernel ?

What happens when we turn on our Computer ?

Process vs Program

Different State of process

Types of Process ?

PCB structure in detail

How does a process look like in memory?

Process vs Threads

Introduction

Job Queue

Scheduling Queue Ready Queue

Device Queue

Schedulers are special system software which handle


Process Scheduling process scheduling in various ways. Their main task is to
select the jobs to be submitted into the system and to
Process Concept decide which process to run. Schedulers are of three
types
Scheduler
Long-term Scheduler

Short-term Scheduler

Medium term Scheduler

Best Performance system is which have a combination of


CPU Bound Process vs I/O Bound Process
CPU bound and I/O bound process.

What is a Context Switch ?

Introduction

IPC by Shared Memory

by Message Passing

Define Pipe

Maximum number of Zombie process a system can


handle ?

What is a Thread ?

Benefits of Multithreading ?

Example of MultiThreading

Many to One Model

One to One Model


Models:
Thread Concepts Many to Many Model

Best Model: ????

Optimal number of threads required for a process ??

Effect of Multiple cores on MutiThreading ?

Thread vs Process [Again]

Why C++ Static Variables are dangerous in real life OS ?

Process Scheduling is an OS task that schedules


processes of different states like ready, waiting, and
running. Process scheduling allows OS to allocate a time
Why do we need it ? interval of CPU execution for each process. Another
important reason for using a process scheduling system
is that it keeps the CPU busy all the time. This allows you
to get the minimum response time for programs.

[ Everything here and below is covered in the Notes


CPU Burst Cycle
mentioned in topmost point reference ]

Pre-Emptive Scheduling

CPU Scheduler Non-PreEmptive Scheduling

Advantages/DisAdvantages

Role of Dispatcher
Dispatcher
Dispatch Latency

CPU utilisation

Throughput

Process Scheduling Scheduling Criteria TAT [Turn Around Time]

Waiting Time

Response Time

FCFS

SJFS

Priority-based

Scheduling Algo Round-Robin

MLQS

MLFQS

Which Algo is used in the real world OS scenario ?

Starvation
IMP terms to know:
Ageing

How to prevent Starvation ?

Why Process Coordination/Sync is needed ? Data Inconsistency Race Condition

Physical Address Space vs Logical Address Space

Mutual Exclusion
Imp terms to know:
Critical Section

Critical Section Problem, peterson Solution Follow youtube Video: [KNOWLEDGE GATE]

Why PreEmptive Kernel is better than Non-PreEmptive


Kernel ?

Binary Semaphore/ Mutex Locks


Semaphore
Synchronisation Counting Semaphore

Busy Waiting
Imp terms to Know:
Complete Analysis of OS Concepts by GALVIN Operating System CheatSheet
Spin Lock
[RED OS Book] [by Love Babbar]
Example of Busy Waiting & Spin Lock

How to implement Binary Semaphore in real world coding


implementation ?

What is DeadLock & Starvation ?

Bounded Buffer, Reader-Writer Problem & Dining


Follow youtube Video: [KNOWLEDGE GATE]
Philosopher Problem

MultiThreaded programs are good candidates deadlock


What is DeadLock ?
becoz multiple thread can compete for shared resources.

If the operating system has a deadlock prevention or


detection system in place, this will have a negative impact
on performance (slow the system down) because
Effects of DeadLock ?
whenever a process or thread requests a resource, the
system will have to check whether granting this request
could cause a potential deadlock situation.

Mutual Exclusion

Hold & Wait


Necessary Conditions:
No PreEmption

Deadlocks Circular Wait

Mutual Exclusion

Hold & Wait


Prevention or Avoidance Make sure atleast one condition should not meet
No PreEmption

Circular Wait
Methods for Deadlock handling
Banker's Algo Safe State Follow Video[Easy Engineering Classes]

Detection or Recovery Ostrich Algo

Resource PreEmption

Ignorance

CPU can directly access Registers and Main Memory

Protection of Memory space is handled by Hardware.

OS loads Base and Limit registers

Imp Points:
Mapping from Logical to Physical address is done by
MMU[Memory Management Unit]

for the resident of OS


OS memory is categorised into 3 divisions:
User Processes

Logical vs Physical address space

Ex- Priority based Scheduling

Done by Dispatcher
What is Swapping ?
Context Switch time in swapping is very high

OS can't swap process that has pending Input/output.

Address Translation: Base and limit resgister

Fixed Partitioning

Variable Partitioning

Best Fit

Memory-Management Strategies dynamic storage allocation problem Worst Fit


Contiguous Memory Allocation
First Fit

Internal Fragmentation

Compaction

Imp Topic to Cover: Follow KNOWLEDGE GATE Video Memory Allocation External Fragmentation Remedies: Paging
Non-Contiguous Allocation
Segmentation

Page table

page No.
Paging
page Offset

Page table Limit Register, PTLR

Segment table

Segmentation Base register

Limit register

Why Paging increases the context-switch time ?

Page vs Frame ?

What is a TLB miss ?

To keep multiple processes in memory to allow


Goal of mem. Mgmt
multiProgramming.

What ?

Why ?

Where it is physically located ?

How it is Implemented ? Demand Paging Strategy to only load pages when they are needed Paging + Swapping

user can write program for an extremly large virtual


address space

Virtual Memory [CPU Utilisation & Throughput] increases && [Response


Time , Turn around time ,TAT] remains same.

Advantages/benefits: Less I/O would be needed to load or swap user programs


into memory, so each user program would run faster.

Degree of Multiprogramming increases

allows files and memory to be shared by 2 or more


processes through page sharing

If it is used carelessly, it can decrease performance.

paging + swapping

Lazy Swapper
Demand Paging
pager

Virtual-Memory Mgmt page fault access to a page that is not in memory

Pure Demand paging

Section of hard disk used for implementing Virtual Mem.


Swap Space:
is swap space

What is Page Fault ?

FIFO belady's anomaly

Page Replacement Algo: Optimal Page Replacement

LRU

What is Frame rate ?

Low CPU Utilisation -> Degree of Multiprogramming


increases -> More Page Fault -> Cycle Continues ->
What ?
Thrashing occurs -> Page fault occurs tremendously ->
CPU utilisation decrease sharply.

[Most asked Question] Thrashing


Cause of Thrashing ?

use Priority based Replacement Algo


Solution to thrashing ?
Allocate the exact no. of frames that are actually required

Can we replace Physical memory i.e. RAM with Virtual


memory ? [HOMEWORK]

Is performance of Virual memory and Physical memory


same ? [HOMEWORK]

Resource1
Storage Management Optional
Resource2

For College Exam:

You might also like