Loading...

OPERATING SYSTEMS ADMINISTRATION  

>

LEARNING OUTCOME 1

Operating System

Definition: An operating system (OS) is a software program that manages computer hardware and software resources, providing a user interface and platform for running applications. It acts as an intermediary between the user and the computer's hardware.

Goals:

Functions:

Evolution of Operating Systems:

Operating systems have evolved significantly over time, from simple batch systems to complex multi-user and multitasking systems. Early operating systems were command-line based, requiring users to type commands to interact with the computer. Later, graphical user interfaces (GUIs) were introduced, making it easier for users to interact with computers visually. Modern operating systems support a wide range of features, including networking, multitasking, and security.

Types of Operating Systems:

Examples of Operating Systems:

Operating System Structures:

Simple Structure: This is the most basic structure, where all the system components are tightly integrated into a single program. It's simple to design and implement but lacks modularity and flexibility. If a part of the system fails, the entire system can crash.

Monolithic Structure: In this structure, the entire operating system kernel is a single large program. It offers efficient performance but is difficult to modify and maintain due to its monolithic nature. A bug in one part can affect the entire system.

Layered Structure: This structure divides the operating system into layers, with each layer providing services to the layer above it. It promotes modularity and simplifies development and debugging. However, it can be less efficient than monolithic structures due to the overhead of inter-layer communication.

Micro-Kernel Structure: In this structure, the operating system kernel is minimal, providing only essential services. Other system services, such as file systems and device drivers, are implemented as separate user-level processes. This approach offers better security and modularity, but it can be less efficient due to the overhead of inter-process communication.

Exo-Kernel Structure: This structure is similar to the micro-kernel structure, but it takes the concept further by moving even more system services out of the kernel. This can lead to even greater flexibility and security, but it can also introduce additional performance overhead.

Virtual Machines: Virtual machines create isolated environments within a physical machine, allowing multiple operating systems to run concurrently. This provides flexibility and isolation but can be less efficient than running a single operating system directly on the hardware.

Basic Structure of a Computer System:

A computer system consists of three main components:

Registers and Memory:

Interrupts

What is an Interrupt?

An interrupt is a signal sent to the CPU by hardware or software to request immediate attention. It's like a sudden interruption in a conversation, signaling the need to pause the current task and address the urgent issue.

Hardware and Software Interrupts

How the CPU Responds to Interrupts

  1. Interrupt Signal: The CPU receives the interrupt signal.
  2. Interrupt Handling: The CPU pauses its current task, saves its current state (registers, program counter, etc.), and transfers control to an interrupt handler.
  3. Interrupt Service Routine (ISR): The interrupt handler, also known as the ISR, is a specific piece of code designed to handle the particular type of interrupt. It identifies the source of the interrupt and performs the necessary actions.
  4. Return from Interrupt: Once the ISR finishes its task, it restores the CPU's state to its previous state and returns control to the interrupted task.

Interrupt Handling in Modern Operating Systems

Modern operating systems have sophisticated mechanisms for handling interrupts efficiently. They prioritize interrupts, schedule their execution, and ensure that critical tasks are handled promptly. Operating systems also use techniques like interrupt masking to temporarily disable specific interrupts, allowing the CPU to focus on important tasks without being constantly interrupted.

Interrupt Masking

Interrupt masking is a technique used by operating systems to temporarily disable specific interrupts. This is useful when the CPU needs to focus on a critical task without being interrupted by less important events. For example, an operating system may mask interrupts during a context switch to ensure that the process switch is completed without interference.

Interrupt Prioritization

Interrupt prioritization is a mechanism that allows the operating system to determine the order in which interrupts are handled. This is important because some interrupts may be more critical than others. For example, an interrupt from a device that is about to overflow may be given higher priority than an interrupt from a keyboard.

Interrupt Scheduling

Interrupt scheduling is the process of determining when interrupts are handled. This is important because the CPU can only handle one interrupt at a time. The operating system may delay the handling of low-priority interrupts if the CPU is busy with other tasks.

Context Switching

Context switching is the process of saving the state of one process (or thread) and loading the state of another process. This is essential for multitasking, where the CPU needs to switch between different processes to efficiently utilize its resources. When an interrupt occurs, the OS performs a context switch to save the state of the currently running process and load the state of the interrupt handler. After the interrupt is handled, another context switch may be performed to restore the original process.

End of Outcome Quiz

1 of 20

    Quiz Score

    Percentage: 0%

    Answered Questions: 0

    Correct Answers: 0

    Faults: