OS Kernel Presentation
OS Kernel Presentation
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
• 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.
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).