Computer Education B.ed
Computer Education B.ed
An Operating System (OS) is a software that acts as an intermediary between the user and the
computer hardware. It manages hardware resources, provides common services for computer
programs, and allows users to interact with the system without needing to understand the
complexities of the hardware.
1. Resource Management: Allocates CPU, memory, storage, and other hardware resources to
programs.
2. Process Management: Handles the execution of multiple processes, ensuring efficient CPU
utilization.
4. File System Management: Organizes and manages files and directories on storage devices.
5. Device Management: Controls and communicates with hardware devices like printers,
keyboards, and disks.
6. Security and Access Control: Protects data and resources from unauthorized access.
7. User Interface: Provides a way for users to interact with the system (e.g., GUI or command
line).
1. User Mode:
2. Kernel Mode:
1. Hardware
2. Software
Definition: A collection of instructions that tell the hardware how to perform tasks.
Types:
o System Software: Manages hardware and provides a platform for applications (e.g.,
OS, device drivers).
o Application Software: Performs specific tasks for users (e.g., Word processors, web
browsers).
3. Firmware
Examples: BIOS (Basic Input/Output System), UEFI (Unified Extensible Firmware Interface).
Role: Provides low-level control for hardware and acts as a bridge between hardware and
software.
Process Management
1. Introduction
Processes are managed by the OS, which allocates resources, schedules tasks, and ensures
proper execution.
Each process has its own address space, which includes code, data, and stack.
2. Definitions of Process
Process vs. Program: A program becomes a process when it is loaded into memory and
executed.
3. Process States
Waiting/Blocked: The process is waiting for an event (e.g., I/O completion, signal).
New → Ready: The OS initializes the process and moves it to the ready queue.
Running → Waiting: The process requests an event (e.g., I/O) and is blocked.
Waiting → Ready: The event the process was waiting for occurs, and it is moved back to the
ready queue.
Running → Ready: The process is preempted (e.g., time slice expires) and moved back to the
ready queue.
The PCB is a data structure maintained by the OS for each process. It contains all the
information needed to manage and control the process.
Contents of PCB:
o CPU Registers: Contents of the CPU registers (e.g., accumulator, stack pointer).
6. Operations on Processes
Process Creation: A new process is created using system calls like fork() (in Unix/Linux)
or CreateProcess() (in Windows).
Process Termination: A process is terminated using system calls like exit() or due to errors
(e.g., segmentation fault).
Process Switching: The OS saves the state of the current process (context switching) and
loads the state of the next process.
Suspend: A process is moved from memory to disk (swapped out) to free up resources. It
transitions to a suspended state (e.g., "Blocked/Suspend" or "Ready/Suspend").
8. Interrupt Processing
Types of Interrupts:
Interrupt Handling:
1. The CPU saves the state of the current process (registers, program counter).
2. The OS identifies the interrupt and invokes the appropriate interrupt handler.
3. After handling the interrupt, the CPU restores the saved state and resumes the
interrupted process.
Waiting → Ready Event occurs, and the process is moved back to the ready queue.
Running →
Process completes execution or is terminated.
Terminated
Running → Suspended Process is swapped out to disk (e.g., due to low memory).
Suspended → Ready Process is swapped back into memory and resumes execution.
Requirements:
2. Restart the computer and boot from the CD/DVD (may require changing boot order
in BIOS/UEFI).
Wait for the installation to complete (the system may restart several times).
4. After installation, configure initial settings (region, keyboard layout, user account,
etc.).
Requirements:
Steps:
2. Restart the computer and boot from the network (PXE boot).
3. The computer will load the installation files from the network server.
1. Control Panel
Overview:
o The Control Panel is a centralized location for managing system settings and
configurations.
o Accessible via:
Key Features:
o System and Security: Configure firewall, update settings, and view system
information.
o Network and Internet: Manage network connections, Wi-Fi settings, and sharing
options.
Overview:
o Accessible via:
Steps:
1. Automatic Installation:
If drivers are not found, Windows will prompt you to insert the driver CD or
download it from the internet.
2. Manual Installation:
If the device is not recognized, it may appear under "Other devices" with a
yellow exclamation mark.
Choose "Browse my computer for drivers" if you have the driver files.
Run the setup file provided by the manufacturer to install drivers and
utilities.
Troubleshooting:
Unit 3
1. Examples of Deadlock
Real-Life Example:
Types of Resources:
2. Hold and Wait: A process holds at least one resource and waits for
additional resources held by other processes.
5. Deadlock Prevention
Deadlock prevention ensures that at least one of the four necessary conditions
for deadlock is never satisfied. Strategies include:
Banker’s Algorithm:
o Steps:
7. Deadlock Detection
Methods:
8. Deadlock Recovery
1. Process Termination:
2. Resource Preemption:
Summary Table
Concept Description
Unit 4
Memory Management (Real Storage)
Storage Organizations
2. Secondary Storage:
3. Tertiary Storage:
Storage Management
Storage Hierarchy
The storage hierarchy organizes storage devices based on their speed, cost,
and capacity. It is structured as follows:
The hierarchy ensures a balance between speed, cost, and capacity, with faster
storage being more expensive and smaller in size.
o Advantages:
Simple to implement.
o Disadvantages:
o Types:
o Advantages:
No external fragmentation.
o Disadvantages:
Unit 5
Virtual Memory
Storage organizations have evolved significantly over time to meet the growing
demands of computing systems. Early systems relied on simple storage
mechanisms, but as applications became more complex, storage organizations
advanced to improve efficiency, scalability, and performance. Key milestones
include:
1. Virtual Memory:
2. Paging:
3. Segmentation:
Key Principles:
Block Mapping
Block mapping is a technique used in storage systems to manage data
allocation and retrieval. It involves mapping logical blocks (used by
applications) to physical blocks (on storage devices). Key concepts include:
3. Mapping Techniques:
4. Applications:
Segmentation
1. Segment Table:
2. Logical Address:
3. Address Translation:
o The segment number is used to find the base address in the
segment table.
4. Advantages:
5. Disadvantages:
4. Block Mapping: Maps logical blocks to physical blocks for efficient data
management.
Directories:
o Also known as folders, directories are containers used to organize
files and other directories.
o They form a hierarchical structure, often represented as a tree.
o Example: /home/user/documents/
Names:
o Files and directories are identified by names.
o Naming conventions vary by file system (e.g., case sensitivity,
allowed characters, length restrictions).
o Example: report.txt, image.png.
Files:
o Basic units of storage containing data (e.g., text, images,
executables).
Directories:
o Special files that store references to other files and directories.
Symbolic Links (Symlinks):
o Pointers to other files or directories.
Hard Links:
o Multiple directory entries pointing to the same file data.
Special Files:
o Represent devices or system resources (e.g., /dev/null in Unix-like
systems).
Sockets and Pipes:
o Used for inter-process communication.
3. File System Functions
Storage Management:
o Allocate and deallocate space for files.
Metadata Management:
o Store and manage file attributes (e.g., size, permissions,
timestamps).
Access Control:
o Enforce permissions and security policies.
Data Integrity:
o Ensure data consistency (e.g., journaling, checksums).
File Operations:
o Create, read, write, delete, and rename files.
Directory Operations:
o Create, list, and navigate directories.
Search and Indexing:
o Enable efficient file lookup.
File Data:
o The actual content of files.
Metadata:
o Information about files, such as:
1. Application Layer:
o Interfaces with user applications
(e.g., open(), read(), write() system calls).
2. Logical File System:
o Manages metadata, directories, and file paths.
3. File Organization Module:
o Translates logical file blocks to physical blocks.
4. Basic File System:
o Handles physical block allocation and deallocation.
5. I/O Control:
o Manages device drivers and hardware interactions.
6. Storage Devices:
o Physical media (e.g., HDD, SSD, tape).
Hierarchy:
o Tree-like structure for organizing files and directories.
Mounting:
o Attaching a file system to a directory in another file system.
Journaling:
o Logging changes to ensure recovery after crashes.
Fragmentation:
o Files stored in non-contiguous blocks (e.g., external vs. internal
fragmentation).
Permissions and Security:
o Access control lists (ACLs), user/group permissions.
MCQ, s
Unit 1: Introduction to Operating Systems
o a) User Mode
o b) Kernel Mode
o c) Safe Mode
o d) Debug Mode
Answer: b) Kernel Mode
o a) New
o b) Ready
o c) Running
o d) Idle
Answer: d) Idle
o b) The OS saves the state of the current process and loads the state of the next
process
o a) Pipes
o b) Shared Memory
o c) Message Queues
o a) Mutual Exclusion
o b) Hold and Wait
o c) Preemption
o d) Circular Wait
Answer: c) Preemption
o a) To detect deadlock
o b) To prevent deadlock
o c) To avoid deadlock
o a) Process Termination
o b) Resource Preemption
o c) Both a and b
o d) There is no difference
Answer: b) Deadlock is permanent, while indefinite postponement is temporary
o c) RAM
o d) Magnetic Tape
Answer: c) RAM
o a) External fragmentation
o b) Internal fragmentation
o c) Both a and b
o a) Registers
o b) Cache Memory
o c) Main Memory
o d) Cloud Storage
Answer: d) Cloud Storage
o b) Segmentation
o c) Both a and b
o b) No external fragmentation
o d) Easier to implement
Answer: c) Supports dynamic memory allocation
o a) Direct Mapping
o b) Associative Mapping
o c) Set-Associative Mapping
o d) Sequential Mapping
Answer: d) Sequential Mapping
o a) Files
o b) Directories
o c) Symbolic Links
o d) CPU Registers
Answer: d) CPU Registers
o a) NTFS
o b) NFS
o c) F2FS
o d) HDFS
Answer: a) NTFS