OS
INTRODUCTION TO OPERATING SYSTEMS
WHAT IS OPERATING SYSTEM?
Definition: A system software that acts as an interface between computer user and computer hardware.
Functions:
Manages and controls the hardware and software resources of a computer system.
Provides a common platform for software applications to run on and enables user interaction with the computer.
COMPUTER SYSTEM STRUCTURE
Main Components:
Hardware: Physical components like CPU, memory, storage devices, input devices (keyboard, mouse), output devices (monitor, printer), and communication devices (network cards, modems).
Operating System: Coordinates the use of hardware among various applications and users.
Application Software: Software designed for specific tasks or functions for end-users (e.g., word processing, web browsers, gaming software).
COMPONENTS OF A COMPUTER SYSTEM (CONTINUED)
Firmware: Specialized software stored in non-volatile memory on hardware components, e.g., BIOS.
Data: Information processed and stored, including text, images, audio, video, etc.
Users: Individuals who interact with the computer system, providing input and receiving output.
ABSTRACT VIEW OF A COMPUTER SYSTEM
Diagram Overview: Illustrate various types of users and processes interacting with the OS and hardware.
DEFINITION OF OS
Resource Allocator: Fundamental software managing computer hardware resources and providing services to application software.
Control Program: Controls and coordinates activities within the computer system involving hardware, software, and user interactions.
COMPONENTS OF OS
Kernel: Core component that manages hardware and software resources and provides services to programs.
User Interface: Enables user interaction with the system through commands and graphical interfaces.
SHELL
Definition: Outer layer of the OS that interprets user commands and translates them into kernel executables through system calls.
Types of Shells:
Command Line Shell: Interacts through commands (e.g., Terminal in Linux, Command Prompt in Windows).
Graphical Shell (GUI): Uses graphical icons for user interaction.
KERNEL FUNCTIONS
Manages process, memory, file, disk, and I/O management.
MODES OF OS OPERATION
User Mode: Non-privileged mode with restricted access to system resources.
Kernel Mode: Privileged mode allowing full access to all system resources.
MODE BIT
Hardware flag indicating processor’s current mode (user or kernel).
DUAL MODE OPERATION
Transitioning user processes between user and kernel modes during system calls.
INTERACTION WITH HARDWARE
Illustrate how user processes interact with system components through device drivers and controllers for input/output operations.
DEVICE DRIVERS AND DEVICE CONTROLLERS
Device Controllers: Physical components controlling hardware devices, integrated into the hardware itself.
Device Drivers: Software that interfaces between device controllers and the OS, providing instructions for communication.
FUNCTIONS OF OS
User Interface Management: Provides GUIs or CLIs for user interaction.
Resource Management: Efficiently manages CPU time, memory, and I/O devices for processes.
Process Management: Creates, schedules, and terminates processes, providing inter-process communication.
Memory Management: Allocates memory to processes and manages memory-related tasks.
File Management: Handles file creation, access control, and organization in directories.
Security Management: Protects resources, manages user accounts and permissions.
OPERATING SYSTEM SERVICES
User Services: Interface for user interactions, program execution, I/O operations, file-system manipulation, communications, error detection.
System Efficiency Services: Resource allocation, accounting, protection, and security for the system itself.
SYSTEM CALLS
Programming interfaces that allow user-level processes to request services from the kernel, typically accessed via APIs like Win32, POSIX, and Java APIs.
TYPES OF SYSTEM CALLS
Process Control: Manage process states (create, terminate, wait).
File Management: Handle file operations (create, delete, read, write).
Device Management: Control hardware devices through requests and releases.
Information Maintenance: Get/set system data and attributes.
Communications: Manage connections and data transfer between processes.
Protection: Control access to resources and manage permissions.
OPERATING SYSTEM BOOTING
Implementation starts with firmware that locates and loads the OS kernel into memory, possibly using a bootstrap loader like GRUB.
SUMMARY OF OPERATING SYSTEMS
Definitions and functions of OS, structure, services provided to users, types of system calls, and the booting process.
PROCESSES
Process Concept: Definition, lifecycle (states: new, running, waiting, ready, terminated), and PCB (process control block) details such as state, program counter, and memory allocation.
Process Scheduling: Mechanisms to maximize CPU utilization through various scheduling algorithms such as FCFS, SJF, Round Robin, and Priority Scheduling. Each algorithm has specific criteria and characteristics to manage process execution effectively, balancing response time and resource availability.
CONTEXT SWITCHING
Mechanism for switching between processes, involving saving and loading process states, which introduces overhead.
PROCESS CREATION AND CONTROL
Hierarchical process management through parent-child relationships, with IPC mechanisms and resource sharing discussions.
SYNCHRONIZATION
Problems of concurrency in processes communicating and sharing resources.
The critical section problem and solutions like semaphores and monitors to manage access and ensure data integrity.
SEMAPHORES
Synchronization tool to control access, with operations defined for wait and signal.
MONITORS
High-level abstractions for synchronizing processes using condition variables to manage active processes securely.
PRECEDENCE GRAPHS
Directed acyclic graphs showing execution order of processes, crucial for understanding dependencies in concurrent environments.