1/49
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
OS
an intermediary interface between user(s), software and
computer hardware.
1940s–1950s
No OS, programs loaded manually with punch cards
1960s
IBM OS/360 introduced batch processing
1970s–1980s
Multiprogramming & Time-Sharing introduced
1980s–1990s
Graphical User Interfaces (GUIs)
IBM OS 360
First family purpose computer & designed to be general purpose
Batch Operating System
Users submit jobs to an operator, who groups similar jobs and runs them together. Users do not interact directly with the computer.
Batch Operating System (—)
➢ Time Consuming
➢ Jobs are collected, grouped, and run sequentially (used in IBM OS/360)
➢ Priority/less priority categorization can’t be done
Multiprogramming Operating System
multiple programs run
in memory at the same time. The CPU switches between
programs, and reduces CPU response time.
Time-Sharing (Multitasking) Operating System
Multiple jobs are executed by the CPU by switching between them, but the
switches occur so frequently. Thus, the user can receive an immediate
response. Time quantum(TQ) introduced.
Example: Linux, MacOS, Windows
Multiprocessing Operating System (DOS)
In Multiprocessing OS, multiple CPU is used to execute multiple jobs.
RTOS
The Real-time Operating System (RTOS) is a type of operating system
that is designed to meet strict time constraints, with a guaranteed response
time for critical tasks.
RTOS are divided into 2 categories:
Soft RTOS:
It is mostly used when execution time(ET) is not so important
Example: Computer games, multimedia devices.
Hard RTOS:
When execution time is strict, and can’t be delayed.
Example: Air traffic, surgery, etc.
Distributed Operating System (DOS)
in this system multiple computers work together and share resources as if they were a single computer.
Network Operating System (NOS)
Network Operating System (NOS) is
a specialized operating system designed to
manage network resources, data, users,
groups, and applications across multiple
computers.
Example: Microsoft Windows Server
NOS and DOS difference
NOS connects separate computers, while DOS makes separate computers appear to be one unified computer system.
CLI
Command-line Interface/console
GUI
Graphical User Interface (Windows, MacOS)
Functions of Operating Systems
Process, Memory, Device, File System Management
Security and Access Control
User Interface (CLI / GUI)
Networking and Communication
32-bit and 64-bit Operating Systems
These types of processors tell us how much memory a processor can access from a CPU register.
For instance,
➢ A 32-bit system can access 2**32 different memory addresses. Ex: 4 GB of RAM or physical memory. Ideally, it can access more than 4 GB of RAM also.
➢ A 64-bit system can access 264 different memory addresses. Ex: 16 million TB (4 billion times more than 32-bit) of RAM. In short, any amount of memory greater than 4 GB can be easily handled by it
Kernel
is a core/heart of any Operating System. (It is the first program that’s loaded by
the bootloader when computer is turned on.)
Monolithic Kernel
OS services run in kernel space as a single large process.
Examples: Unix, Linux
Monolithic Kernel (+ and —)
Advantage: Execution time (ET) & CPU response time are very fast.
Disadvntage: Less reliable (a failure of one task can crash the entire system)
Micro kernel
Micro kernel consists of kernel level and user level tasks.
Note: Micro kernel is not fast as Monolithic kernel, but it is more reliable and
stable.
Hybrid Kernel
Hybrid kernel = Monolithic (speed) + Micro kernel (stable)
Hybrid kernel is both fast like monolithic and stable like Micro kernel.
Exo Kernel
The main idea behind Exo kernel is to let applications directly access to hardware resources Like CPU, I/O devices and memory management, etc.
(+) — fast
(—) — Harder to develop, security can be more difficult
Nano Kernel
➢ minimal kernel with only essential functions
➢ Used in systems requiring extremely small and fast kernel layers
ASCII stands for
“American Standard Code for Information Interchange”.
ASCII is a 7-bit character encoding standard that represents 128 characters using numbers from 0 to 127.
UTF-8
a variable-length character encoding that represents Unicode characters using 1–4 bytes. It is backward-compatible with ASCII.
System call
System call is a mechanism that allows a program to request a service from the operating system (OS). It translates commands into OS-level instructions.
Shell
Shell is a program that provides an interface between user and operating system.
CLI (Command Line) Shells
A CLI shell is a program that allows users to interact with an operating system by typing text commands instead of using a graphical interface.
Examples: Cmd.exe, Powershell, Bash, Sh, Zsh.
GUI (Graphical) Shells
GUI (Graphical) Shells are software interfaces that allow user interact with an operating system using buttons, icons, menus, etc.
Examples: Windows Explorer (File Explorer), macOS Finder, etc.
CPU scheduling
CPU scheduling is a process in which OS will decide which task / process is going to utilize CPU at a particular time.
Non-preemptive
process will leave the CPU with its own will, cannot be interrupted
Preemptive
Preemptive means that a process can be interrupted during execution
Arrival Time
point of time at which process enters Ready state or queue
Burst Time
duration of process inside the CPU
Turn Around Time
CT - AT
Amount of time spent by the process from its arrival till its completion time.
Waiting Time
TAT - BT
Process Lifecycle
Ready → Run
Run → Terminated
Run → Waiting
Waiting → Ready

response ratio
(WT+BT)/BT
diagram of a boot process
Power ON → BIOS/UEFI → POST → GRUB → Operating System

post in boot process
POST in the boot process stands for Power-On Self-Test.
It is the initial hardware check performed by the computer's firmware (BIOS/UEFI) immediately after you turn it on.
BIOS/UEFI
starts the computer and prepares the hardware before the operating system loads.
GRUB
is a bootloader that starts the operating system after BIOS/UEFI has finished its job.
Deadlock
Deadlock is a phenomenon in OS when 2 or more processes are
waiting each other forever (stuck/no progress) and none of them
can be completed
It happens when each process
is holding a resource that needs each other.
4 necessary conditions for Deadlock
1. Mutual Exclusion (only 1 process can use a resource at a time)
2. Hold and Wait (process is holding one resource and waiting for
another)
3. No Preemption (processes can’t be interrupted; must be
released voluntarily)
4. Circular Wait (a circular chain of 2+processes should exist)
Mutual Exclusion + Hold and Wait + No Preemption + Circular Wait = Deadlock
How to handle Deadlocks
1. Break Coffman Condition (avoid at least 1 of the 4 conditions)
2. Deadlock Avoidance (if a process needs 2 resources, it must
request both resources together, aka Banker’s algorithm. Example,
banks giving a loan to good creditors).
3. Eliminate “No Preemption” (OS can take away (preempt) the held
resources and give them to another process)
Example: If Process P1 holds the printer and now requests the scanner
(which is busy),
→ OS takes back the printer from P1 and gives it to someone else.
P1 will retry later.
Resource Allocation Graphs (RAG)
RAG
