Operating Systems Fundamentals Flashcards

(35 cards)

1
Q

What is an Operating System (OS)?

A

An OS controls hardware and software, working between the user and the computer

It manages hardware resources, processes, memory, files, and I/O devices.

Lets users and applications to interact with the computer system effectively.

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

What are the main objectives of an operating system?

A

Easy to use, works fast, and can improve over time.

Objectives: Resource management, user interface, security, and hardware abstraction.

Maximizes system performance and user productivity

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

What are the four key components of a computer system?

A

Hardware
Operating System
Application Programs
Users

OS controls hardware and provides services to applications.

Separates user-level interaction from hardware complexity.

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

What are the main stages in the evolution of operating systems?

A

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

Each stage aimed to improve efficiency, usability, and multitasking.

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

What is serial processing in operating systems?

A

Jobs run one after another, with no overlap

No OS or automation, manual setup and execution.

Inefficient due to long setup times and idle CPU.

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

What is the primary feature of a batch processing system?

A

Jobs are grouped and run one after another, with a monitor guiding the order

The OS manages job scheduling, spooling, and sequential execution.

Increases throughput and reduces idle time compared to serial processing.

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

What is multiprogramming in an OS?

A

Several programs stay in memory at once so the CPU is always busy

The OS switches between programs to keep the CPU busy during I/O waits.

Improves CPU utilization and system efficiency.

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

What is time-sharing in an operating system?

A

CPU time is shared between users, so it feels like everything runs at once

The CPU is shared between users via time slices, enabling fast switching.

Users experience the system as responsive and concurrent.

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

What is process management in an operating system?

A

Managing how processes start, run, and stop

Involves creation, scheduling, and termination of processes.

Ensures fairness, efficiency, and isolation among processes.

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

What are the five states of a process in an OS?

A

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.

OS moves processes between these states based on execution and I/O needs.

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

What is a Process Control Block (PCB)?

A

Stores process info like state, program counter, and memory details

Contains process ID, state, registers, memory limits, scheduling info, etc.

Used during context switching and process management.

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

What is context switching in an OS?

A

Saving the state of a running process and loading the state of another

Involves storing the PCB of the current process and loading the PCB of the next.

Enables multitasking, but adds overhead.

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

What is the goal of CPU scheduling?

A

Choosing which processes to run to make the CPU and system work efficiently

Aims to maximize CPU utilization and throughput, and minimize waiting and response time.

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

Name three common CPU scheduling algorithms.

A

First Come, First Served (FCFS)
Shortest Job First (SJF)
Round Robin (RR)

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

What is the main drawback of FCFS scheduling?

A

It can lead to the convoy effect, where short tasks wait for long ones to finish

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

What is the advantage of SJF scheduling?

A

It reduces average wait time, but guessing the next CPU burst is hard

17
Q

What is the key feature of Round Robin scheduling?

A

Each process gets a set time to run, improving how quickly the system responds

18
Q

How does priority scheduling work?

A

Processes run based on priority, with higher-priority ones going first.

Can cause starvation if low-priority processes are indefinitely postponed.

19
Q

What is a deadlock in an operating system?

A

A situation where processes are stuck waiting for each other to release resources

System becomes stuck unless external intervention occurs

20
Q

How can deadlocks be prevented?

A

By making sure one of the key conditions for deadlock doesn’t happen

Prevents system-wide halt but may reduce efficiency.

21
Q

What is the primary goal of memory management?

A

To manage and use the computer’s main memory efficiently

Includes tasks like paging, segmentation, swapping, and protection.

22
Q

What is paging in memory management?

A

Memory is split into fixed-size pages to reduce fragmentation

OS maps pages to frames via page tables, avoiding fragmentation.

Efficient memory use; causes overhead in managing page tables.

23
Q

What is virtual memory?

A

Uses disk space to make it seem like there’s more memory than actually available.

Inactive pages are swapped to disk (page file), allowing larger or more programs to run.

Enables multitasking; slower than RAM, may cause thrashing.

24
Q

What is I/O management in an OS?

A

Controls devices and handles data transfer between them and the CPU

Handles buffering, caching, scheduling, and error handling for I/O.

25
What is the purpose of a device driver?
It connects the OS to hardware devices so they can work together Translates generic OS requests into device-specific commands.
26
What is Direct Memory Access (DMA)?
Moves data between devices and memory without using the CPU Improves I/O speed and frees the CPU for other tasks
27
What is a system call?
When an app asks the OS to do something low-level, like accessing hardware Used for file access, memory allocation, and I/O.
28
What does file system management involve?
Stores and organizes files, keeps info about them, and controls who can access them Includes structures like directories, inodes, and file descriptors.
29
What is bootstrapping in an OS?
Loading the OS into memory when the computer starts up Starts with BIOS/UEFI, then loads the bootloader and kernel.
30
What is the kernel in an OS?
The main part of the OS that controls system resources and helps hardware and software communicate Handles scheduling, memory, I/O, and system calls.
31
Why use an API wrapper instead of direct system calls?
To make it easier to move and access system functions Reduces complexity, enhances readability, and hides OS-specific details.
32
What are virtual machines (VMs)?
Software that acts like a hardware, allowing multiple OSes to run on one computer Run multiple OSs on one hardware platform using a hypervisor. Enables testing, isolation, and resource utilization.
33
What are the two modes in dual-mode operation?
User Mode and Kernel Mode help protect the OS from harmful or buggy programs Ensures security and stability by protecting critical OS functions.
34
What is IPC?
Sharing data between different processes Can be done via shared memory, message passing, or sockets
35
Why is process synchronization important?
Making sure processes using the same resources don’t conflict with each other Prevents race conditions and inconsistent states