Lecture 2.pptx ca field having brief updates on cs

MadinaKhan6 4 views 32 slides Mar 10, 2025
Slide 1
Slide 1 of 32
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32

About This Presentation

...


Slide Content

Operating System Architecture Teacher: Dr Brekhna

Operating System Structure

OS Structure Goals: Protection: within and across the Users + the OS itself Performance: Time taken to perform their services. Flexibility or Extensibility: not one size fits all. Scalability: Performance goes high if adding more resources Agility: ability to adopt changes Responsiveness: reacting to the external events

System Structure – Simple Approach MS-DOS (Microsoft Disk Operating System) is a command-line operating system that was widely used in personal computers during the 1980s and early 1990s. It played a crucial role in the development of the PC ecosystem. Here’s an overview of its key features, architecture, and historical significance. Key Features of MS-DOS Command-Line Interface : MS-DOS uses a text-based command-line interface (CLI) where users input commands to perform tasks such as file management, program execution, and system configuration. Single-User, Single-Tasking : MS-DOS is designed for single-user operation and does not support multitasking natively. Only one program can run at a time, although some programs could provide limited multitasking capabilities.

File System : Utilizes the FAT (File Allocation Table) file system, which organizes files on disk and manages file storage. The FAT system allows for easy file management and retrieval. Device Drivers : Supports a variety of hardware through device drivers, which are often loaded as needed when the system boots or when a specific device is accessed. Batch Processing : Allows users to create batch files (with a .bat extension) that contain a series of commands to be executed sequentially, automating repetitive tasks.

MS-DOS Layer Structure

Architecture of OS Kernel The core component of the OS, responsible for managing system resources, memory, processes, and hardware interactions. Types of Kernels : Monolithic Kernel : All OS services run in kernel space, providing high performance but making the system complex. Microkernel : Only essential functions run in kernel space; other services run in user space, improving modularity and stability. Hybrid Kernel : Combines aspects of both monolithic and microkernels, attempting to balance performance and modularity.

Operating system (OS) architectural models describe the overall structure and organization of an operating system. Different models provide various ways to understand how components interact and manage resources. Here are some common architectural models of operating systems:

Monolithic Architecture 1. Monolithic Architecture Description : In this model, the entire operating system operates in kernel mode, with all services (such as process management, memory management, device drivers, and file systems) running in a single large process. Advantages : High performance due to direct access to hardware. Easier to implement inter-component communication. Disadvantages : Complexity makes debugging and maintenance difficult. A fault in one component can crash the entire system. Example : Linux is often cited as a monolithic kernel.

Monolithic Architecture Figure 1.3 Monolithic operating system kernel architecture.

2. Microkernel Architecture Description : This model aims to minimize the kernel by implementing only essential services (such as low-level address space management, thread management, and inter-process communication). Other services run in user space. Advantages : Enhanced stability and security; faults in user services do not crash the kernel. Easier to extend and maintain. Disadvantages : Potentially lower performance due to increased context switching and communication overhead. Example : The Mach microkernel.

Microkernel Architecture Figure 1.5 Microkernel operating system architecture

System Structure – Layered Approach 3. Layered Architecture Description : The operating system is divided into layers, each built on top of lower layers, with each layer providing specific services. Higher layers use the services of lower layers while remaining independent. Advantages : Modularity allows for easier maintenance and updates. Improved security and abstraction. Disadvantages : Performance overhead due to multiple layers of abstraction. Example : The OSI model in networking can be seen as a layered approach, and some operating systems may adopt a similar structure.

An Operating System Layer

Layered Architecture

4. Client-Server Model Description : In this model, the OS architecture is designed around a set of clients that request services from servers. The servers handle requests and provide resources or services to clients. Advantages : Scalability and flexibility; clients and servers can be distributed across networks. Improved resource sharing and load balancing. Disadvantages : Complexity in managing communication between clients and servers. Example : Many distributed operating systems use a client-server architecture.

5. Hybrid Architecture Description : Combines elements of both monolithic and microkernel architectures. It includes a microkernel that handles basic services, while additional services run in user space for performance. Advantages : Balances performance and modularity. Provides flexibility in managing various components. Disadvantages : Increased complexity in design and implementation. Example : Windows NT and modern versions of macOS.

Windows operating systems utilize a hybrid architecture, which incorporates elements of both monolithic and microkernel designs. This architecture allows Windows to balance performance, modularity, and maintainability. Here are some key features and characteristics of Windows architecture: Key Features of Windows Architecture Hybrid Kernel: Windows features a hybrid kernel, known as the Windows NT kernel, which includes components that run in kernel mode and user mode. Core services, such as memory management, process management, and device drivers, are implemented in the kernel for performance. Modular Design : While the kernel handles essential services, Windows supports a modular design that allows additional services (like device drivers and file systems) to run in separate modules. This modularity enables easier updates and enhancements without needing to modify the entire kernel.

User Mode and Kernel Mode: Windows operates with two main execution modes: user mode and kernel mode. User mode is where applications run, isolated from direct hardware access, while kernel mode has unrestricted access to hardware resources. Device Drivers: Windows uses a variety of device drivers that can run in kernel mode or user mode, providing flexibility in how hardware interacts with the OS. This allows for better stability, as user-mode drivers can fail without crashing the entire system.

Inter-process Communication (IPC): Windows provides various IPC mechanisms (such as named pipes, message queues, and shared memory) that facilitate communication between processes running in user mode and kernel mode. Graphical User Interface (GUI): Windows is well-known for its GUI, which allows users to interact with the system through visual elements like windows, icons, and menus. Security Features: Windows includes various security features, such as User Account Control (UAC), which helps manage permissions and access control for applications and users.

Advantages Performance: The hybrid architecture allows for efficient resource management and high performance, especially for system-level operations. Flexibility: The modular design enables easier updates and enhancements to individual components without requiring a complete system overhaul. Stability: User-mode drivers reduce the risk of system crashes caused by faulty hardware drivers. Disadvantages Complexity: The hybrid architecture can lead to increased complexity in system design and maintenance. Resource Overhead: Some modular components might introduce overhead, potentially impacting performance in some scenarios.

Networked and Distributed Operating Systems Network operating system Runs on one computer Allows its processes to access resources on remote computers Distributed operating system Single operating system Manages resources on more than one computer system Goals include: Transparent performance Scalability Fault tolerance Consistency

Networked and Distributed Operating Systems Figure 1.6 Client/server networked operating system model.

What do we want?? Thin (like a Microkernel) only mechanism not polices Access to resources without crossing the border(like DOS) Flexibility for resource management (like Microkernel) without sacrificing Protection and performance like Monolithic.

Operating-System Generation Operating systems can be designed for specific machines or to run on a class of machines with various peripheral configurations. System generation (SYSGEN) is the process of configuring or generating an operating system for a specific computer site. SYSGEN involves determining information such as CPU type and options, boot disk formatting, memory availability, device characteristics, and desired options or parameter values. The generated system can be tailored by modifying the source code, selecting modules from a precompiled library, or constructing a table-driven system.

Tailoring the generated system affects its size, generality, and ease of modification as hardware configurations change. Modifying a system to support new hardware can be costly, but it depends on the frequency of such changes. Operating systems are distributed on disk, CD/DVD-ROM, or as an ISO image. SYSGEN programs read from a file, probe the hardware directly, or ask the system operator for information to generate a system. Generated systems can be fully compiled, linked from precompiled modules, or constructed as a table-driven system.

System Boot Booting is the process of loading an operating system into the computer's memory. A small piece of code called the bootstrap program or bootstrap loader locates the kernel, loads it into main memory, and starts its execution. The bootstrap program is stored in read-only memory (ROM) and performs tasks such as running diagnostics and initializing system components.

Some systems store the entire operating system in ROM, while others store the operating system on disk. For systems that store the operating system on disk, the bootstrap loader is stored in firmware and reads a single block at a fixed location from disk into memory. The program stored in the boot block may be sophisticated enough to load the entire operating system into memory, or it may be simple code that knows only the address on disk and length of the remainder of the bootstrap program.

Once the full bootstrap program is loaded, it can traverse the file system to find the operating system kernel, load it into memory, and start its execution. The system is said to be running only after the operating system kernel has been loaded into memory and its execution has started. Disk that has a boot partition is called a boot disk or system disk

END
Tags