Institution: School of Computer Sciences and Engineering
Department: Computer Science and Engineering
Semester: 5th
Subject Name: Operating System
Subject Code: 17YCT502
Faculty: Dr. M. Juned
Definition: An Operating System (OS) is a system software that acts as an intermediary/interface between users and computer hardware.
Components of a Computer System:
Hardware
Software (includes Application Software and System Software/OS)
Execute user programs to solve user problems
Make the computer system convenient to use
Efficient utilization of computer hardware
Modern operating systems are complex and provide many services, supporting various hardware and software.
Architectural Types:
Monolithic Architecture
Layered Architecture
Microkernel Architecture
All components are contained within a single kernel.
Pros: Efficient communication among components
Cons: Hard to detect subtle errors
Groups similar function components into layers.
Each layer communicates only with adjacent layers.
Challenges: Can lead to decreased system throughput.
Minimal services provided to keep the kernel small and scalable.
Pros: Highly modular and portable.
Cons: Can affect system performance due to increased intermodule communication.
Definition: Management of Primary Memory or Main Memory
Activities:
Tracking memory usage
Allocating and deallocating memory for processes
Definition: Management of process scheduling in a multiprogramming environment.
Activities:
Tracking processor status
Allocating processor to processes
Definition: Manages device communication via drivers.
Activities:
Tracking devices
Allocating devices efficiently
Organizes files in directories; manages file access and resources.
Security, Control over system performance, and Coordination between software and users
First Generation (1940s - Early 1950s)
No OS; programming in machine language
Second Generation (1955 - 1965)
Introduction of GMOS, a single-stream batch processing OS
Third Generation (1965 - 1980)
Development of multiprogramming
Fourth Generation (1980-Present)
Rise of PCs and graphical OS like Windows/Mac OS, including more sophisticated features
Does not directly interact with users; processes jobs in batches.
Advantages:
Efficient processing for similar jobs
Disadvantages:
Debugging can be difficult; jobs may wait indefinitely if one fails.
Allows multiple users to access the system simultaneously by splitting CPU time among processes.
Advantages:
Efficient CPU utilization and less idle time
Coordinating multiple interconnected computers for resource sharing and remote access.
Advantages:
Fault tolerance and scalability
Manages data, users, and security across a network of machines.
Advantages:
Centralized management and remote access capabilities
Responds to input within specific time constraints.
Divided into Hard (strict timing) and Soft (less strict timing)
Built directly into devices (e.g., medical equipment, cars).
Executes multiple jobs at once by managing job scheduling.
Simulates a physical computer environment, allowing multiple OS instances on single hardware.
A process is a program in execution and represents a unit of work.
Sections of a Process: Stack, Heap, Text, Data
Contains information necessary for process management including state, number, and resources being used
Long-term Scheduler: Chooses which process to bring to the ready state.
Short-term Scheduler: Selects which process from the ready queue to execute.
Medium-term Scheduler: Swaps processes in and out of memory, optimizing multiprogramming.
CPU Utilization
Throughput
Turnaround Time
Waiting Time
Response Time
First-Come, First-Serve (FCFS): Processes scheduled in order of arrival.
Shortest Job Next (SJN): Prioritizes tasks with the shortest execution times.
Priority Scheduling: Based on process priority; potential starvation risk.
Round Robin: Each process gets a fixed time to execute, promotes fairness.
Multilevel Feedback Queue: Processes can move between queues as needed.
Mechanism that allows processes to communicate and synchronize their actions.
Race Condition: Occurs when processes access shared data concurrently.
Critical Section: Code section where shared resources are accessed, requiring synchronization.
Mutexes, Semaphores, Monitors, and Condition Variables.
Contiguous Allocation: Each process requires a contiguous memory allocation.
Paging: Divides memory into fixed-size pages to avoid fragmentation.
Segmentation: Divides memory into segments based on logical divisions of programs.
Internal Fragmentation: Memory allocated but not used within a block.
External Fragmentation: Free memory is available but not contiguous.
Process of managing input and output devices and operations.
FCFS: Serves requests in order of arrival.
SSTF: Shortest seek time first.
SCAN: Moves in one direction satisfying requests and returns.
C-SCAN: Similar to SCAN but jumps to the opposite end once it reaches one end.
LOOK: Stops moving when no more requests exist in the current direction.
Temporary data storage to speed up data access.
Advantages: Faster than main memory, reduces access times.
Disadvantages: Expensive and limited capacity.
A named collection of related information stored on secondary storage.
Attributes: Name, Identifier, Type, Location, Size, Protection.
Operations: Creating, Writing, Reading, Repositioning, Deleting, and Protection.
Single-level: All files in one directory.
Two-level: Each user has a directory.
Tree-structured: Hierarchical structure for better organization.
Protecting systems from unauthorized access and maintaining confidentiality and integrity of data.
Malware, Phishing, Spoofing, Eavesdropping, Social Engineering.
Regular updates, using secure networks, strong passwords, and user education.