0% found this document useful (0 votes)
9 views16 pages

1 Operating Systems and Architecture

The document provides an introduction to operating systems (OS), defining their functions, types, and evolution from manual operations to modern mobile and cloud systems. It details the structure and key functions of an OS, including process, memory, storage, and I/O management, as well as various environments in which OS operate. The conclusion emphasizes the OS's role in managing computer resources and the importance of understanding computer architecture.

Uploaded by

nyashamajezah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views16 pages

1 Operating Systems and Architecture

The document provides an introduction to operating systems (OS), defining their functions, types, and evolution from manual operations to modern mobile and cloud systems. It details the structure and key functions of an OS, including process, memory, storage, and I/O management, as well as various environments in which OS operate. The conclusion emphasizes the OS's role in managing computer resources and the importance of understanding computer architecture.

Uploaded by

nyashamajezah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Operating Systems and

Architecture: An Introduction
Understanding the Core of Modern Computing
Mavhemwa P.M
What is an Operating System (OS)?

•Definition: An Operating System (OS) is a software program that manages computer hardware and
•software resources, provides common services for computer programs, and acts as an intermediary
•between the user and the computer hardware.
•Purpose:
•Resource Management: Allocates and deallocates CPU time, memory, storage, and I/O devices.
•Program Execution: Provides an environment for applications to run.
•User Interface: Offers a way for users to interact with the computer (GUI, CLI).
•Error Detection and Handling: Manages and responds to errors in hardware and software.
Types of Operating Systems
•Batch Operating Systems:
•Jobs processed in batches; no direct user interaction during execution.
•Example: Early mainframes for payroll, billing.
•Time-Sharing (Multitasking) Operating Systems:
•Allows multiple users/programs to share a single CPU by rapidly switching between them.
•Example: UNIX, Linux, Windows (desktop versions).
•Real-Time Operating Systems (RTOS):
•Guarantees completion of tasks within specific time constraints.
•Types: Hard real-time (critical, no delays) and soft real-time (tolerates minor delays).
•Example: Industrial control systems, medical imaging, robotics.
•Distributed Operating Systems:
•Manages a group of independent computers and makes them appear as a single coherent system.
•Example: Amoeba, Plan 9.
•Network Operating Systems:
•Runs on a server, providing network services to connected clients (e.g., file sharing, printing).
•Example: Windows Server, Novell NetWare.
•Mobile Operating Systems:
•Designed for smartphones and tablets, emphasizing touch interfaces and power efficiency.
•Example: Android, iOS.
Evolution of Operating Systems
•1940s-1950s: No OS (Manual Operation)
•Programs loaded manually via plugboards or punched cards.
•Extremely inefficient utilization of expensive hardware.
•1950s-1960s: Batch Systems
•Monitors and resident programs automate job sequencing.
•Introduction of job control languages (JCL).
•1960s-1970s: Multiprogramming & Time-Sharing
•Multiple jobs in memory simultaneously, CPU switches between them.
•Emergence of interactive computing. UNIX developed.
•1970s-1980s: Personal Computers & GUIs
•Development of microcomputers. DOS, Macintosh OS with graphical user interfaces.
•1990s-2000s: Networked & Distributed Systems
•Growth of the Internet, client-server models, Windows NT, Linux gains popularity.
•2000s-Present: Mobile, Cloud & Virtualization
•Dominance of mobile OS (Android, iOS), cloud computing, extensive use of virtualization.
Operating System: Structure and Functions
• OS Structure (Common Models):
• Monolithic Structure:
• Entire OS runs in kernel mode as a single program.
• Pros: High performance due to direct function calls.
• Cons: Difficult to debug, extend, and maintain; less stable (a bug can crash the whole system).
• Example: Early UNIX, Linux (hybrid).
• Layered Structure:
• OS divided into layers, each performing specific functions.
• Pros: Modular, easier to debug and modify.
• Cons: Performance overhead due to multiple layer crossings.
• Microkernel Structure:
• Only essential services (process management, memory management, IPC) in the kernel.
• Other services (file system, device drivers) run as user-level processes.
• Pros: High reliability (failure of a service doesn't crash kernel), extensibility.
• Cons: Performance overhead due to inter-process communication.
• Example: Mach, QNX.
Operating System: Structure and Functions (Cont.)
• Key Functions of an OS:
1. Process Management:
1. Creating and deleting processes.
2. Scheduling processes (CPU allocation).
3. Process synchronization and inter-process communication (IPC).
4. Deadlock handling.
2. Memory Management:
1. Allocating and deallocating memory space to processes.
2. Keeping track of which parts of memory are being used by whom.
3. Swapping, paging, and segmentation.
3. Storage Management (File System Management):
1. Creating and deleting files and directories.
2. Mapping files onto secondary storage.
3. File access control and protection.
4. I/O System Management:
1. Managing device drivers.
2. Buffering, caching, and spooling.
3. Providing a device-independent interface.
5. Protection and Security:
1. Controlling access to system resources.
2. Protecting against internal and external threats.
6. Command-Interpreter System (Shell):
1. User interface for interacting with the OS.
File System Structure and Management
•File: A named collection of related information stored on secondary storage.
•Directory (Folder): A collection of files and other directories, organizing the file system hierarchically.
File System Structure:
•Boot Control Block: Information needed to boot the OS.
•Volume Control Block (Superblock): Details about the file system volume (e.g., total blocks, free
blocks).
•Directory Structure: Organizes files (e.g., tree-structured, acyclic-graph).
•File Control Block (Inode): Per-file details (permissions, dates, size, data block pointers).
•File Management Operations:
•Creating/Deleting Files: OS allocates/deallocates space.
•Opening/Closing Files: Prepares/releases file for access.
•Reading/Writing Files: Data transfer between disk and memory.
•Seeking: Moving the read/write pointer within a file.
•Access Control: Permissions (read, write, execute) for users/groups.
•Disk Space Allocation Methods:
•Contiguous allocation, linked allocation, indexed allocation.
OS Selection Considerations
•Hardware Compatibility: Does the OS support the computer's CPU, memory, and peripherals?
•Application Requirements: Are the necessary applications available and compatible with the OS?
•Performance:
•Speed (boot time, application launch).
•Efficiency (resource utilization).
•Responsiveness (UI fluidity).
•Security:
•Robustness against malware and unauthorized access.
•Regular updates and patches.
•Reliability and Stability:
•How often does the system crash or become unresponsive?
•Cost:
•Licensing fees (for commercial OS).
•Maintenance and support costs.
•Ease of Use (Usability):
•User interface intuitiveness.
•Availability of documentation and community support.
•Specific Features:
•Virtualization support, networking capabilities, specific development tools.
Computer System Structures: Organization &
Operations
•Modern Computer System Components:
•CPU (Central Processing Unit): The "brain," executes instructions.
•Memory (RAM): Volatile storage for programs and data currently in use.
•I/O Devices: Peripherals (keyboard, mouse, monitor, disk drives, network cards).
•Buses: Communication pathways connecting components (e.g., data bus, address bus,
control bus).
•Basic Operation Cycle:
1.CPU fetches instruction from memory.
2.CPU decodes instruction.
3.CPU executes instruction.
4.Repeat.
•Bootstrap Program:
•Initial program loaded when the computer starts (firmware in ROM/EEPROM).
•Initializes all aspects of the system, loads the OS kernel into memory, and starts its
execution.
CPU Operations: Interrupts and Handling
•Interrupt: A signal that temporarily suspends the execution of a program and causes control to pass
to a special routine (Interrupt Service Routine - ISR) to handle an event.
•Why Interrupts?
•Efficiency: Allows CPU to do other work while waiting for I/O completion.
•Responsiveness: Enables the system to react quickly to urgent events (e.g., key press,
network packet arrival, hardware error).
•Types of Interrupts:
•Hardware Interrupts: Generated by I/O devices (e.g., disk completion, timer expiration).
•Software Interrupts (Traps/Exceptions): Generated by a program's execution (e.g., division by zero,
•system call, page fault).
•Interrupt Handling Process:
1.Device/program sends an interrupt signal.
2.CPU finishes current instruction.
3.CPU saves the current state (registers, program counter).
4.CPU determines the cause of the interrupt (via Interrupt Vector Table).
5.CPU transfers control to the appropriate Interrupt Service Routine (ISR).
6.ISR handles the event.
7.CPU restores the saved state.
8.CPU resumes the interrupted program.
I/O Methods
•1. Programmed I/O (PIO):
•CPU continuously checks (polls) the status of an I/O device until it's ready for data transfer.
•Pros: Simple to implement.
•Cons: Wastes CPU cycles, inefficient for slow devices.
•2. Interrupt-Driven I/O:
•CPU issues an I/O command and then continues with other tasks.
•The I/O device interrupts the CPU when it completes the operation or needs attention.
•Pros: More efficient than PIO, CPU is not idled.
•Cons: Still involves CPU for data transfer for each word/byte.
•3. Direct Memory Access (DMA):
•Concept: A specialized hardware component (DMA controller) manages data transfer directly between I/O
devices and main memory, without involving the CPU.
•Process:
1.CPU programs the DMA controller (source, destination, size).
2.CPU proceeds with other tasks.
3.DMA controller performs the transfer.
4.DMA controller interrupts CPU upon completion.
•Pros: Highly efficient for large data transfers, frees up CPU for other computations.
•Cons: Requires dedicated DMA controller hardware.
Device Status Table & Storage Organization

•Device Status Table (Device Table):


•A data structure maintained by the OS to keep track of the state of all I/O devices.
•Information stored: Device type, address, status (busy/idle), current operation, process waiting for the
device, etc.
•Purpose: Enables the OS to efficiently manage and schedule I/O requests.
•Storage Organization:
•Primary Storage (Main Memory/RAM):
•Volatile, fast, directly accessible by CPU.
•Stores currently executing programs and their data.
•Secondary Storage (Mass Storage/Disk):
•Non-volatile, slower, larger capacity.
•Stores all programs and data persistently (e.g., Hard Disk Drives, Solid State Drives).
•Tertiary Storage (Archival Storage):
•Very slow, very large capacity, often removable.
•Used for long-term backups (e.g., magnetic tape, optical disks).
•Storage Hierarchy: A multi-level system where faster, smaller, and more expensive storage (e.g., CPU
registers, cache) is at the top, and slower, larger, and cheaper storage (e.g., hard disk) is at the bottom. OS
manages data movement between these levels.
Process, Registers, and Buffers
•Process:
•Definition: A program in execution. It's an active entity, unlike a program (which is a passive entity).
•Components:
•Program code (text section).
•Current activity (Program Counter, registers).
•Stack (temporary data: function parameters, return addresses).
•Data section (global variables).
•Heap (dynamically allocated memory).
•Process States: New, Running, Waiting, Ready, Terminated.
•Registers:
•Definition: Small, very fast storage locations within the CPU.
•Purpose: Hold data and instructions that the CPU is currently processing.
•Examples: Program Counter (PC), Instruction Register (IR), Accumulator, General Purpose Registers,
Stack Pointer.
•Buffers:
•Definition: Temporary storage areas in memory.
•Purpose: Used to hold data during transfer between two devices or between a device and memory that
operate at different speeds.
•Example: When reading from a slow disk, data is read into a buffer, allowing the application to read from
the faster buffer.
Various OS Environments
•Batch Environment:
•Emphasis on maximizing CPU utilization by running jobs sequentially without user interaction.
•Focus on throughput.
•Interactive Environment:
•Direct user interaction with applications.
•Emphasis on responsiveness and quick feedback (e.g., desktop OS).
•Distributed Environment:
•Resources (CPU, memory, storage) are spread across multiple machines, but appear as a single system.
•Challenges: Network latency, fault tolerance, distributed concurrency control.
•Client-Server Environment:
•Clients request services (e.g., file, print, web) from servers.
•Common model for network applications.
•Peer-to-Peer (P2P) Environment:
•Each node can act as both a client and a server.
•No centralized control.
•Example: File sharing networks.
•Clustered Systems:
•Multiple independent computers (nodes) networked together to perform a common task.
•Share storage, provide high availability and scalability.
•Types: Asymmetric (hot standby) and Symmetric (all nodes run applications).
Various OS Environments (Cont)
•Virtualization Environment:
•Allows a single physical computer to run multiple virtual
machines (VMs), each with its own OS.
•Managed by a hypervisor.
•Benefits: Resource isolation, consolidation, disaster recovery,
legacy application support.
Conclusion & Q&A
• Recap:
• The OS is the fundamental software managing all computer resources.
• Different OS types evolved to meet varying computational needs.
• Key OS functions include process, memory, storage, and I/O management.
• Computer architecture involves understanding hardware components and their
interactions (interrupts, DMA).
• Data is fundamentally represented in binary, with specific formats for signed
numbers.
• Questions & Discussion:
• "What are the primary differences you observe between a traditional desktop OS
and a mobile OS?"
• "How does DMA significantly improve system performance compared to
programmed I/O?"
• Thank you!

You might also like