0% found this document useful (0 votes)
3 views

OS Kernel Presentation

The document provides an overview of operating system kernels, detailing their role as the core component that manages system resources and facilitates communication between hardware and software. It discusses different types of kernels, including monolithic and microkernels, along with their advantages and disadvantages. Additionally, it covers various operating system types, their uses, and the importance of Process Control Blocks (PCBs) in managing processes.

Uploaded by

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

OS Kernel Presentation

The document provides an overview of operating system kernels, detailing their role as the core component that manages system resources and facilitates communication between hardware and software. It discusses different types of kernels, including monolithic and microkernels, along with their advantages and disadvantages. Additionally, it covers various operating system types, their uses, and the importance of Process Control Blocks (PCBs) in managing processes.

Uploaded by

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

OS KERNEL

PRESENTATION
Amabo Favour
Bokekeh chinnida
Piam Yimo Theodore
Tanga Frank
Vanmu Valentine
kamdem Nick
Amaya Mbeke
Wiylilaka Stercy
LAHFEN BRANDY
OS
KERNEL
The kernel is the core part of an operating
system. It acts as a bridge between software
applications and the hardware of a computer.
• The kernel manages system resources, such
as the CPU, memory, and devices, ensuring
everything works together smoothly and
efficiently.
• It handles tasks like running programs,
accessing files, and connecting to devices
like printers and keyboards.
• Facilitates communication between
hardware and user applications.
• Ensures efficient and secure multitasking.
• Manages system stability and prevents
unauthorized resource access
• Kernel Space: • User Space:
The memory area where the The memory area where
kernel code and data reside. user-level applications run.
Access to kernel space is Applications have limited
restricted to the kernel itself. access to system resources
and must rely on the kernel
to provide services.
Types of Kernel
The kernel manages the system’s resources and facilitates communication between
hardware and software components. These kernels are of different types let’s discuss
each type along with its advantages and disadvantages with some examples

1. Monolithic Kernel • Advantages


It is a type of kernel where all operating system services operate in
kernel space. It has dependencies between systems components. It • Efficiency: Monolithic kernels are generally faster than
has huge lines of code which is complex. other types of kernels because they don’t have to switch
between user and kernel modes for every system call,
• Characteristics: which can cause overhead.
• Large Code Size:
• Simplicity: Monolithic kernels are simpler to design,
Monolithic kernels tend to be very large because they contain a
implement, and debug than other types of kernels
significant amount of code.
because they have a unified structure that makes it easier
• Direct Hardware Access: to manage the code.
Components within the kernel can directly access hardware resources.
• Lower latency: Monolithic kernels have lower latency
• Single Address Space:
than other types of kernels because system calls and
The entire kernel runs in a single address space, meaning that all kernel interrupts can be handled directly by the kernel
components share the same memory space.
• Performance: • Disadvantages
Generally, monolithic kernels can offer better performance than
microkernels because there is less overhead for inter-process • Stability Issues: Any bug in the kernel service can
communication. potentially crash the ntire system.

Example: • Security Vulnerabilities: Since all the operating


system services are running in kernel space, any security
Unix, Linux, Open VMS, XTS-400 etc. vulnerability in one of the services can compromise the
entire system
2. Micro kernels
A microkernel is a kernel architecture where only the most essential OS functions (e.g.,
inter-process communication, memory management, basic scheduling) are implemented
within the kernel itself. Other OS services (e.g., device drivers, file systems) are
implemented as user-level processes that communicate with the kernel through messages.

• Advantages
• Characteristics:
• Reliability: Microkernel architecture is designed to be more
• Small Code Size: reliable than monolithic kernels. Since most of the operating
Microkernels are much smaller than monolithic kernels. system services run outside the kernel space, any bug or security
vulnerability in a service won’t affect the entire system.
• Limited Hardware Access:
• Flexibility: Microkernel architecture is more flexible than
User-level processes do not have direct access to hardware resources. monolithic kernels because it allows different operating system
They must request services from the kernel.
services to be added or removed without affecting the entire
• Multiple Address Spaces: system.
Different parts of the OS (e.g., device drivers, file systems) run in
separate address spaces.
• Disadvantages
• Inter-Process Communication (IPC):
• Performance: Microkernel architecture can be slower than
Communication between different parts of the OS is done through
monolithic kernels because it requires more context switches
message passing
between user space and kernel space.
Example :
• Complexity: Microkernel architecture can be more complex
Mach, L4, AmigaOS, Minix, K42 etc. than monolithic kernels because it requires more communication
and synchronization mechanisms between the different operating
system services
MONOLITHIC KERNEL MICRO-KERNEL
HOW IT WORKS
SYSTEM CALLS
• Application Request:
• system call is a programmatic way in which a computer An application makes a request for a system service (e.g., reading from a
program requests a service from the kernel of the operating file) by calling a library function (e.g., fread() in C).
system it is executed on..
• Library Function:
• A system call is a way for programs to interact with the
The library function prepares the system call and puts the required
operating system. arguments (e.g., file descriptor, buffer address, number of bytes to read) into
• It is the primary way that applications interact with the specific registers or memory locations.
kernel to request services that require privileged access to • Trap (Interrupt):
hardware or system resources.
The library function then executes a special instruction called a "trap" or
• Features "software interrupt" (e.g., int 0x80 in x86 assembly). This instruction
switches the CPU from user mode to kernel mode and transfers control to
• Protection Mechanism: the kernel.

System calls are a crucial protection mechanism in operating • Kernel Handler:


systems. They allow applications to access system resources in a The kernel receives the interrupt and uses the system call number (passed in
controlled and secure manner. Applications cannot directly access a register) to identify the requested service. It then calls the appropriate
the hardware or memory; they must go through the kernel's system kernel function (system call handler) to fulfill the request.
call interface.
• Privileged Execution:
• ABI (Application Binary Interface):
The kernel function executes with privileged access to hardware and system
The system call interface defines a specific ABI that applications resources. It performs the requested operation (e.g., reading data from the
must adhere to. This includes the calling convention (how file).
arguments are passed), the system call numbers, and the format of • Return to User Space:
the return values.
After the operation is complete, the kernel function prepares the return
Types of Operating Systems with
Examples and Use Cases
Batch Operating System
Mobile Operating System
• Description:

Executes a batch of jobs without user interaction during execution. • Fescription:


Example :IBM OS/360

Use Case: Used in early mainframe computers for payroll or bank processing jobs. Designed specifically for mobile devices.
Example: Android, iOS
Time-Sharing (Multitasking) Operating System
• Description: Use Case: Smartphones, tablets, wearable devices.
Allows multiple users to access the system simultaneously by sharing time slices of the CPU.

Example: UNIX
Use Case: Academic and research institutions where many users need to access a powerful system remotely.
Embedded Operating System
Distributed Operating System
• Description
• Description:
Manages a group of distinct computers and makes them appear as a single system to users. Lightweight OS designed for embedded systems.
Example: Amoeba, Google’s Chrome OS (in cloud environments)

Use Case: Data centers and cloud computing (e.g., Google's internal systems). Example: Embedded Linux, RTEMS
Use Case: Smart TVs, IoT devices, industrial machines.
Network Operating System
• Description:
Provides services to computers connected over a network.

Example: Microsoft Windows Server Graphical User Interface (GUI) Operating System
Use Case: Businesses that need to manage file sharing, printer access, and security across a network.
• Description:
Real-Time Operating System (RTOS)
Uses graphical elements like windows and icons for interaction.
• Description:
Responds to input immediately; often used in embedded systems. Example: Microsoft Windows, macOS
Example: VxWorks, FreeRTOS
Use Case: Automotive systems, robotics, and medical devices where timing is critical.
Use Case: General-purpose use by individuals and businesses
Uses of Operating Systems
some uses of operating systems include;
5. Providing Security
1. Managing Computer Hardware
The OS helps your computer's hardware work together. Think The OS helps keep your computer safe from bad
of it like a conductor in an orchestra, making sure all the guys who might try to harm it. It's like a superhero
instruments play together nicely.
who protects the city from villains.
2. Providing a Platform for Software
6. Managing Files and Folders
The OS allows you to run different software applications, like
games or word processors. Imagine a playground where kids The OS helps you keep your files and folders
can play different games together.
organized. Imagine a file cabinet where you can
3. Managing Memory and Storage store and find your papers easily.
The OS helps your computer remember things, like what
you're working on. It's like a librarian who keeps track of all 7. Providing a User Interface
the books on the shelves.
The OS gives you a way to interact with your
4. Controlling Input/Output Devices
computer, like a desktop or command line. Think of
The OS helps your computer talk to other devices, like your it like a menu at a restaurant that helps you order
keyboard or mouse. Think of it like a translator who helps
people who speak different languages communicate. what you want.
Process Control Block
• Scheduling Information: Information used for scheduling the process, such as:

• Priority
Definition:
• Scheduling queue pointers (pointers to other PCBs in scheduling queues)
• A Process Control Block (PCB) is a data structure used by the operating system to store all
the information needed to manage a particular process.
• Parent Process ID: The PID of the process that created this process (if applicable).
• It is a record for each running process, containing everything the OS needs to know to keep
track of the process's state, resources, and execution context. • List of Open Files: A list of files the process currently has open.

• The PCB is crucial for multitasking and process management in modern operating systems • Security Information: Security credentials associated with the process.

Key Information Stored in a PCB: • Context Data: This may include kernel stack pointer and other data required for context switching
Information that a PCB typically holds include ;

• Process ID (PID): A unique identifier for the process. This allows the OS to easily distinguish between different
processes. Why PCBs are Important:
• Process State: The current state of the process (e.g., new, ready, running, waiting, terminated). This indicates what
the process is currently doing. • Multitasking:
• Program Counter (PC): The address of the next instruction to be executed by the processor. This is essential for PCBs enable the OS to perform multitasking. By storing the context of each process in its PCB, the OS can
resuming execution after an interrupt or context switch. quickly switch between processes without losing any data. This gives the illusion that multiple processes
• CPU Registers: The values of all the CPU registers (e.g., accumulator, index registers, stack pointer) when the are running concurrently.
process was last running. This allows the OS to restore the process's execution context.
• Context Switching:
• Memory Management Information
When the OS switches from one process to another (a context switch), it saves the state of the current
• I/O Status Information: Information about the I/O devices allocated to the process and open files. process in its PCB and loads the state of the next process from its PCB. This allows the new process to
resume execution exactly where it left off.
• Accounting Information: Information used for resource accounting, such as:
• CPU time used • Resource Management:

• Real time used PCBs allow the OS to track the resources allocated to each process (memory, I/O devices, etc.). This helps
the OS manage resources efficiently and prevent conflicts.
• Account number
• Process Management:
• Limits
PCBs provide a central location for all information about a process, making it easier for the OS to manage
processes (e.g., create, terminate, suspend, resume).

You might also like