Lecture 1.pptx cs field hacing info on machine learning
MadinaKhan6
4 views
38 slides
Mar 10, 2025
Slide 1 of 38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
About This Presentation
...
Size: 1.72 MB
Language: en
Added: Mar 10, 2025
Slides: 38 pages
Slide Content
Advance Operating system Teacher: Dr Brekhna
Contents
What is Operating System? An operating system (OS) is system software that manages computer hardware, software resources, and provides various services for computer programs. It acts as an intermediary between the hardware and software, allowing users and applications to interact with the computer's hardware without needing to understand the intricate details of the hardware.
. Evolution of Operating Systems
Modern operating systems (OS) provides a stable environment for applications to run and offer a variety of services to users and developers. Here are some key characteristics of modern operating systems:
1. Multitasking Definition : The ability to run multiple processes simultaneously. Types : Preemptive (OS controls CPU allocation) and cooperative (processes voluntarily yield control). 2. Multi-user Support Definition : Allows multiple users to access the system concurrently. Features : User account management, permissions, and resource allocation to maintain security and isolation. 3. Virtual Memory Definition : Extends physical memory onto disk storage, allowing more applications to run than physical memory would allow. Benefits : Improved system responsiveness and efficient memory management.
4. Device Management Function : Manages hardware devices through drivers and provides abstraction layers. Types : Supports various devices, including printers, disk drives, and network interfaces. 5. File System Management Features : Organizes data into files and directories, manages permissions and access rights. Types : Supports various file systems (e.g., NTFS, ext4, FAT32). 6. Security and Access Control Aspects : Implements user authentication, data encryption, and access control mechanisms to protect resources. Importance : Safeguards against unauthorized access and data breaches. 7. Networking Capabilities Definition : Allows communication between computers and devices over networks. Protocols : Supports various networking protocols (e.g., TCP/IP) and services (e.g., web servers, file sharing).
8. User Interface Types : Can be command-line (CLI) or graphical (GUI). Importance : User experience and accessibility for different types of users. 9. Resource Management Function : Efficiently allocates CPU time, memory space, and I/O devices among processes. Techniques : Includes scheduling algorithms and load balancing. 10. Inter-process Communication (IPC) Definition : Mechanisms that allow processes to communicate and synchronize their actions. Methods : Pipes, message queues, shared memory, and sockets. 11. Modularity and Extensibility Features : Modern OS are often designed with a modular architecture, allowing for easy updates and integration of new features. Advantages : Facilitates maintenance and development of new functionalities. 12. Virtualization Support Definition : Enables the creation of virtual machines, allowing multiple OS instances to run on a single physical machine. Use Cases : Enhances resource utilization and isolation for development and testing environments.
File Systems What is a File System? : A file system is a method for storing and organizing files on a storage device. It provides a way to manage files, directories, and permissions. Types of File Systems : NTFS (New Technology File System) : Developed by Microsoft, NTFS supports large files, file permissions, compression, and encryption. FAT32 (File Allocation Table 32) : A simpler file system that supports smaller volumes and files up to 4GB, widely used for uSb drives. ext4 (Fourth Extended File System) : Commonly used in Linux, ext4 supports large volumes and files, journaling, and improved performance.
File System Structure : File systems are organized hierarchically with directories (folders) containing files. The root directory is the top-level directory, and all other directories branch from it. File System Operations : Create : Making new files or directories. Read : Accessing files to retrieve data. Write : Modifying existing files or adding new data. Delete : Removing files or directories. Rename : Changing the name of files or directories. Metadata in File Systems : Metadata includes details about files such as size, type, permissions, owner, and timestamps (creation, modification, last access). Journaling File Systems : These file systems log changes before committing them, which helps prevent corruption from system crashes. If a crash occurs, the system can recover to a consistent state using the journal. Distributed File Systems : These allow users to access and share files across multiple machines over a network. Examples include NFS (Network File System) and AFS (Andrew File System), enabling seamless file access in distributed computing environments
Memory Management Techniques Introduction to Memory Management : Memory management is the process of coordinating and handling computer memory resources. It ensures that programs have enough memory to execute, and that memory is allocated and freed efficiently. Memory Hierarchy : Memory is structured in a hierarchy to balance speed and cost: Registers : Small, fast storage locations within the CPU. Cache : High-speed memory that stores frequently accessed data. RAM (Random Access Memory) : Volatile memory used by the CPU to store data temporarily while programs run.. Secondary Storage : Non-volatile storage (e.g., HDD, SSD) that retains data even when powered off. Paging : Paging divides memory into fixed-size blocks called pages. When a program is executed, its pages are loaded into any available physical memory frames. This allows non-contiguous memory allocation and simplifies memory management. Segmentation : Unlike paging, segmentation divides memory into variable-sized segments based on logical divisions of a program (e.g., code segment, stack segment). Each segment can grow or shrink independently.
Virtual Memory : Virtual memory extends the apparent memory capacity of a system by using disk space as additional memory. The OS swaps pages between physical memory and disk storage, allowing programs to run even if they exceed physical memory limits. Memory Allocation Strategies : Contiguous Allocation : Assigns a single contiguous block of memory to a process Paging : Allocates fixed-size pages from a pool of available memory. Segmentation : Allocates variable-size segments based on program requirements. Fragmentation : Internal Fragmentation : When allocated memory is larger than needed, causing wasted space within allocated blocks. External Fragmentation : Occurs when free memory is divided into small, non-contiguous blocks, making it difficult to allocate larger requests. Memory Management in Modern OS : Modern operating systems implement advanced techniques like demand paging, page replacement algorithms (e.g., LRU, FIFO), and memory compaction to optimize memory usage and reduce fragmentation.
Process Scheduling Introduction to Process Scheduling : Process scheduling is the method by which the OS decides the order of execution for processes. It is crucial for multitasking environments to ensure responsiveness and efficient CPU utilization. Process States : Processes go through various states during their lifecycle: New : The process is being created. Ready : The process is waiting for CPU time. Running : The process is currently being executed by the CPU. Waiting : The process is waiting for an event (e.g., I/O operation) to complete. Terminated : The process has completed execution.
Scheduling Algorithms : FCFS (First-Come, First-Served) : The simplest scheduling algorithm where processes are executed in the order they arrive. It can lead to the "convoy effect," where short processes wait for long ones. SJF (Shortest Job First) : Prioritizes processes with the shortest execution time, reducing average waiting time but can lead to starvation for longer processes.
Round Robin : Each process is given a fixed time slice (quantum); if it does not complete within that time, it is moved to the back of the queue. This approach provides fairness and responsiveness. Priority Scheduling : Processes are assigned priority levels, and the scheduler selects processes based on priority, potentially leading to starvation of lower-priority processes. Multilevel Queue Scheduling : Processes are divided into multiple queues based on different criteria (e.g., priority, type), each with its scheduling algorithm. This allows for differentiated treatment of processes. Real-time Scheduling : Used in systems where timely processing is critical (e.g., embedded systems). Real-time scheduling ensures that high-priority tasks are completed within specified time constraints. Context Switching : The process of saving the state of a currently running process and loading the state of the next scheduled process. Context switching introduces overhead, but it is essential for multitasking.
Resource Management Resource management involves coordinating the use of hardware and software resources efficiently among competing processes. Types of Resources : CPU : The central processing unit, which executes instructions and manages tasks. Memory : Temporary storage for running processes, including RAM and cache.
I/O Devices : Hardware used for input (e.g., keyboards, mice) and output (e.g., monitors, printers). Network Resources : Bandwidth and network connections that facilitate data transfer. Resource Allocation Strategies : Techniques to allocate resources include: Fixed Allocation : Predefined allocation of resources to specific processes. Dynamic Allocation : Resources are allocated on-the-fly based on current demand and availability. Deadlock : A deadlock occurs when two or more processes are unable to proceed because each is waiting for a resource held by another. The classic deadlock conditions include: Mutual Exclusion : At least one resource must be held in a nonshareable mode.
Hold and Wait : Processes holding resources are waiting for additional resources. No Preemption : Resources cannot be forcibly taken from processes holding them. Circular Wait : A circular chain of processes exists where each process is waiting for a resource held by the next process in the chain. Deadlock Prevention and Avoidance: Strategies to handle deadlocks include: Resource Allocation Graph: A graphical representation of processes and resources to detect potential deadlocks. Banker’s Algorithm : A deadlock avoidance algorithm that checks resource availability before allocation to ensure that a safe state is maintained. Resource Monitoring: Tools and techniques (like performance monitoring software) are used to track resource usage, identify bottlenecks, and ensure efficient operation.
Advanced Topics Virtualization : Virtualization technology allows multiple virtual machines (VMs) to run on a single physical machine, each with its own OS and resources. This improves resource utilization and isolation. Cloud Computing and OS : In cloud computing, OS play a crucial role in managing virtualized resources, ensuring that applications can scale dynamically based on demand.
Security in Modern Operating Systems : Modern OS implement various security measures, including: Access Controls : Permissions that determine which users can access or modify files. Encryption : Protecting data stored on disk or transmitted over networks. Regular Updates : Patching security vulnerabilities to protect against exploits.
Mobile Operating Systems : Mobile OS are designed for smartphones and tablets, focusing on touch interfaces, energy efficiency, and app ecosystems. They often include features like: App Sandboxing : Isolating apps to prevent unauthorized access to system resources. Battery Management : Optimizing power consumption for extended battery life.
Real-time Operating Systems : RTOS are designed for applications that require immediate processing and response times, such as in embedded systems for automotive or industrial applications. Open Source vs. Proprietary Operating Systems : Open Source : Software whose source code is available for anyone to view, modify, and distribute, fostering community collaboration (e.g., Linux). Proprietary : Software developed and sold by companies, with restrictions on use and modification (e.g., Windows, macOS).
Types of operating system
Types of Operating Systems Desktop Operating System Server Operating System Mobile Operating System Embedded Operating System Network Operating System Mainframe Operating System Distributed Operating System Multi-User Operating System Real-Time Operating System Single User Operating System
Desktop Operating Systems:
Server Operating Systems
Linux Victoria
Unix 3.0
Mobile Operating Systems:
Embedded Operating Systems:
Network Operating Systems:
Mainframe Operating Systems: IBM z/OS: Designed for IBM mainframes, providing scalability, reliability, and security for large-scale enterprise computing.
Distributed Operating Systems: Linux Cluster and Distributed Computing: Various Linux distributions support clustering and distributed computing for high-performance and fault-tolerant systems.
Multi-User Operating Systems: Unix-like Systems: Unix and Unix-like operating systems are known for their multi-user and multi-tasking capabilities
Real-Time Operating Systems (RTOS):
Single-User Operating Systems: Single-User Single-Tasking: These simple operating systems can run only one task at a time and are typically found in older or specialized computing devices.