I/O SoftwareLayers (User Level, Device Drivers, Kernel)
Threats andAttacks (Virus, Worms, Trojan, DoS)
Case Study: Modern Operating Systems
I/O (Input/Output) software is typically organized into layers so that each level handles a specific part of the communication between applications and hardware. The three main layers are User Level, Device Drivers, and the Kernel Level. Here’s how they work together:
1. User-Level I/O Software
This is the top layer, closest to the user and
applications.
What it includes:
Application programs (e.g., text editors,
browsers)
I/O libraries (like standard C library
functions: printf, scanf)
System call interfaces
Responsibilities:
Provides a user-friendly way to perform I/O
operations
Converts high-level requests into system calls
Handles buffering and formatting (e.g.,
converting numbers to text)
Example:
When you use printf() in C, it’s part of
user-level I/O. It doesn’t directly access hardware—it passes the request down
to the kernel.
2. Kernel-Level I/O Software
This is the core of the operating system and
acts as a bridge between user programs and hardware.
What it includes:
Device-independent I/O services
Interrupt handlers
Buffering, caching, and spooling mechanisms
I/O scheduling
Responsibilities:
Manages communication between software and
hardware
Provides uniform interfaces for different
devices
Handles errors and device protection
Controls access to devices (security and
sharing)
Example:
When a program requests to read a file, the
kernel determines which device to use and how to access it.
3. Device Drivers
These are specialized programs for specific
hardware devices.
What they do:
Translate generic I/O commands into
device-specific operations
Control the hardware directly
Handle device-specific interrupts
Responsibilities:
Communicate with hardware controllers
Execute low-level instructions required by the
device
Provide a consistent interface to the kernel
Example:
A printer driver knows exactly how to send
data to a specific printer model, even though the kernel gives it a generic
“print” command.
How They Work Together
A user program makes an I/O request (e.g.,
read/write file).
The user-level software converts it into a
system call.
The kernel processes the request and decides
how to handle it.
The device driver interacts with the hardware
to perform the operation.
The result travels back up through the layers
to the user.
Simple Analogy
Think of it like ordering food:
User Level → You place an order from the menu
Kernel → The waiter manages the request and
coordinates
Device Driver → The chef prepares the food
using specific tools
Hardware → The kitchen equipment
Security & Protection:
“Security” and “Protection” are closely
related concepts in operating systems, but they focus on different aspects of
safeguarding a system.
Protection
Protection is about controlling access to
system resources within the system.
Goal:
Ensure that each process or user accesses only what it is permitted to.
Key ideas:
Defines who can access what
Enforces rules inside the system
Focuses on internal control mechanisms
Mechanisms:
Access control (read, write, execute
permissions)
Memory protection (separating process address
spaces)
File permissions
CPU protection (dual mode: user mode vs kernel
mode)
Example:
A user cannot modify system files without
proper permissions.
Security
Security is broader and deals with protecting
the system from external and internal threats.
Goal: Prevent unauthorized access, attacks,
and data breaches.
Key ideas:
Concerned with threats and attacks
Includes both prevention and detection
Covers authentication and encryption
Mechanisms:
User authentication (passwords, biometrics)
Encryption (protecting data)
Firewalls and intrusion detection systems
Malware protection
Example:
Preventing hackers from accessing a system
over a network.
Difference Between Security and
Protection
|
Aspect |
Protection |
Security |
|
Focus |
Internal access control |
Overall system safety |
|
Scope |
Specific resources |
Entire system |
|
Concern |
“Who can use what?” |
“Who can access the
system?” |
|
Mechanism |
Permissions, memory protection |
Authentication,
encryption, firewalls |
|
Level |
Inside OS |
System + network level |
In Simple Terms
Protection = Rules inside the system
Security = Defense against threats
User Authentication & Access Control
These are two fundamental concepts in operating
systems and security that work together to protect systems and data.
1. User Authentication
Authentication is the process of
verifying the identity of a user.
In simple terms: “Are you really who you claim
to be?”
Common Authentication Methods:
Something you know
Passwords, PINs
Something you have
Smart cards, OTP tokens, mobile devices
Something you are
Biometrics (fingerprint, face recognition,
iris scan)
Advanced Methods:
Multi-Factor Authentication (MFA)
Combines two or more methods (e.g.,
password + OTP)
Single Sign-On (SSO)
Login once, access multiple systems
Example:
When you log into your laptop using a password
or fingerprint, authentication is happening.
2. Access Control
Access Control determines what an
authenticated user is allowed to do.
In simple terms: “Now that we know who you
are, what can you access?”
No comments:
Post a Comment