Operating Systems Fundamentals Flashcards
What is an Operating System (OS)?
An OS controls hardware and software, working between the user and the computer
What are the main objectives of an operating system?
Easy to use, works fast, and can improve over time.
What are the four key components of a computer system?
Hardware
Operating System
Application Programs
Users
What are the main stages in the evolution of operating systems?
Serial Processing: One job at a time, no OS help
Simple Batch Systems: Jobs run in batches, with little user interaction
Multiprogrammed Batch Systems: Several jobs in memory, CPU switches between them
Time-Sharing Systems: Many users share the system, each gets a short time to run
What is serial processing in operating systems?
Jobs run one after another, with no overlap
What is the primary feature of a batch processing system?
Jobs are grouped and run one after another, with a monitor guiding the order
What is multiprogramming in an OS?
Several programs stay in memory at once so the CPU is always busy
What is time-sharing in an operating system?
CPU time is shared between users, so it feels like everything runs at once
What is process management in an operating system?
Managing how processes start, run, and stop
What are the five states of a process in an OS?
New – Process is being created.
Ready – Process is waiting for CPU time.
Running – Process is being executed.
Waiting (Blocked) – Process is waiting for some resource, like I/O.
Terminated – Process has finished and is no longer running.
What is a Process Control Block (PCB)?
Stores process info like state, program counter, and memory details
What is context switching in an OS?
Saving the state of a running process and loading the state of another
What is the goal of CPU scheduling?
Choosing which processes to run to make the CPU and system work efficiently
Name three common CPU scheduling algorithms.
First Come, First Served (FCFS)
Shortest Job First (SJF)
Round Robin (RR)
What is the main drawback of FCFS scheduling?
It can lead to the convoy effect, where short tasks wait for long ones to finish
What is the advantage of SJF scheduling?
It reduces average wait time, but guessing the next CPU burst is hard
What is the key feature of Round Robin scheduling?
Each process gets a set time to run, improving how quickly the system responds
How does priority scheduling work?
Processes run based on priority, with higher-priority ones going first.
What is a deadlock in an operating system?
A situation where processes are stuck waiting for each other to release resources
How can deadlocks be prevented?
By making sure one of the key conditions for deadlock doesn’t happen
What is the primary goal of memory management?
To manage and use the computer’s main memory efficiently
What is paging in memory management?
Memory is split into fixed-size pages to reduce fragmentation.
What is virtual memory?
Uses disk space to make it seem like there’s more memory than actually available.
What is I/O management in an OS?
Controls devices and handles data transfer between them and the CPU
What is the purpose of a device driver?
It connects the OS to hardware devices so they can work together
What is Direct Memory Access (DMA)?
Moves data between devices and memory without using the CPU
What is a system call?
When an app asks the OS to do something low-level, like accessing hardware
What does file system management involve?
Stores and organizes files, keeps info about them, and controls who can access them
What is bootstrapping in an OS?
Loading the OS into memory when the computer starts up
What is the kernel in an OS?
The main part of the OS that controls system resources and helps hardware and software communicate
Why use an API wrapper instead of direct system calls?
To make it easier to move and access system functions
What are virtual machines (VMs)?
Software that acts like a hardware, allowing multiple OSes to run on one computer
What are the two modes in dual-mode operation?
User Mode and Kernel Mode help protect the OS from harmful or buggy programs
What is IPC?
Sharing data between different processes
Why is process synchronization important?
Making sure processes using the same resources don’t conflict with each other