100% found this document useful (1 vote)
88 views42 pages

Operating System Administration Overview

If it requires a password try "mahindra1" or "mahindra"
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
100% found this document useful (1 vote)
88 views42 pages

Operating System Administration Overview

If it requires a password try "mahindra1" or "mahindra"
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

blackgift00@gmail.

com
“Nothing is as good or as bad as it seems.”

blackgift00@[Link]
LEARINING 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
1

hardware.

Goals:
• Efficiency: Maximize the utilization of system resources, including CPU,
memory, and I/O devices. 3

• Convenience: Provide a user-friendly interface and simplify interactions with


the computer. 4

• Reliability: Ensure the system's stability and minimize crashes or data loss.
• Responsiveness: Deliver timely responses to user requests and system
events.
• Security: Protect system resources and user data from unauthorized access
and malicious attacks.

Functions:
• Process Management: Handles the creation, scheduling, and termination of
processes, allocating CPU time to each process. 5

• Memory Management: Allocates and deallocates memory to processes,


optimizing memory usage and preventing conflicts. 6

• File System Management: Organizes and manages files on storage devices,


providing operations like creating, deleting, and modifying files. 7

• Input/Output (I/O) Management: Controls and coordinates I/O devices, such


as keyboards, mice, printers, and disk drives. 8

• Device Management: Manages hardware devices, including their


initialization, configuration, and data transfer. 9

• Security Management: Implements security measures to protect system


resources and user data from unauthorized access and attacks. 10

blackgift00@[Link]
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
11

command-line based, requiring users to type commands to interact with the


computer. Later, graphical user interfaces (GUIs) were introduced, making it easier
12

for users to interact with computers visually. Modern operating systems support a
13

wide range of features, including networking, multitasking, and security.

Types of Operating Systems:


• Batch Operating Systems: Process jobs in batches, without direct user
interaction. 14

• Multiprogramming Operating Systems: Execute multiple programs


concurrently, improving system utilization. 15

• Multitasking Operating Systems: Allow multiple tasks to run simultaneously


on a single processor, providing a more responsive user experience. 16

• Multi-user Operating Systems: Support multiple users to access and use


the system simultaneously.
• Real-Time Operating Systems (RTOS): Prioritize tasks based on deadlines,
ensuring timely responses to events. 17

• Distributed Operating Systems: Manage multiple computers as a single


system, sharing resources and coordinating tasks. 18

Examples of Operating Systems:


• Windows: A popular desktop and server operating system developed by
Microsoft. 19

• macOS: A desktop operating system developed by Apple for its Macintosh


computers. 20

• Linux: A versatile open-source operating system available in various


distributions, including Ubuntu, Fedora, and Debian. 21

• Android: A mobile operating system developed by Google for smartphones


and tablets. 22

• iOS: A mobile operating system developed by Apple for iPhones and iPads. 23

blackgift00@[Link]
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.

blackgift00@[Link]
Basic Structure of a Computer System
A computer system consists of three main components:

• Processor: The brain of the computer, responsible for executing instructions


and performing calculations.
• Memory: Stores data and instructions for the processor to use. It includes
1

primary memory (RAM) and secondary memory (hard drives, SSDs).


• Peripheral Devices: Devices that interact with the computer, such as
keyboards, mice, monitors, printers, and network interfaces.

Registers and Memory:


• Registers: High-speed storage locations within the processor that hold data
and instructions being processed. They are used to store intermediate results
of calculations, addresses of memory locations, and other important
information.
• Memory: Stores data and instructions for the processor to use. It is organized
into cells, each with a unique address. The processor accesses memory by
specifying the address of the desired cell.

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


• Hardware Interrupts: These are generated by external devices like
keyboards, mice, or hard drives. For example, when you press a key on your
keyboard, the keyboard sends an interrupt signal to the CPU to inform it of the
keystroke.

blackgift00@[Link]
• Software Interrupts: These are generated by software instructions within the
CPU itself. They are used to trigger specific actions, such as system calls or
exceptions.

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.

blackgift00@[Link]
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.

blackgift00@[Link]
LEARNING OUTCOME 2

Process Management

Process Definition
A process is an instance of a program in execution. It's a dynamic entity that
1

requires system resources like CPU time, memory, and I/O devices to perform its
tasks. Key characteristics of a process include:
2

• Program Counter: Points to the next instruction to be executed. 3

• Registers: Stores temporary data used in calculations.


• Stack: Manages function calls and local variables. 4

• Heap: Dynamically allocates memory during program execution. 5

Process Creation and Termination


• Process Creation:
o System call: A program requests the OS to create a new process.

o OS allocates resources: Memory, CPU time, and other resources are


assigned. 6

o New process is created: A new process control block (PCB) is created


to manage the process's state.

• Process Termination:
o Normal termination: The process completes its execution.

o Abnormal termination: The process crashes or is killed by the OS. 7

o OS reclaims resources: The OS deallocates the resources used by the


terminated process. 8

Process Control Block (PCB)


The PCB is a data structure that contains information about a process, including:

• Process ID (PID): A unique identifier.


• Process State: Current state (running, ready, waiting, etc.). 9

• Program Counter: Points to the next instruction. 10

• Registers: Stores the process's registers. 11

blackgift00@[Link]
• Memory Limits: Defines the memory allocated to the process. 12

• Open Files: List of open files.


• Parent Process: The process that created the current process.
• Child Processes: List of child processes.
• Priority: Determines the process's importance.

Process Life Cycle


A process goes through different states during its lifetime: 13

1. New: The process is being created.


2. Ready: The process is waiting to be assigned to a CPU. 14

3. Running: The process is currently executing on a CPU.


15 16

4. Waiting: The process is waiting for an event (e.g., I/O operation). 17

5. Terminated: The process has finished execution.

Process Management in Windows and Linux


• Windows:
o Task Manager: Visualizes running processes, CPU usage, memory
usage, and network activity.
o Command Prompt: Uses commands like tasklist, taskkill, and
start to manage processes.

o PowerShell: A more powerful command-line interface for advanced


process management tasks. 18

• Linux:
o Terminal: Uses commands like ps, top, kill, and nice to manage
processes.
o Graphical User Interface (GUI): Provides a visual interface for
process management (e.g., GNOME, KDE).

Commonly Used Commands and Tools


• ps: Lists running processes. 19

• top: Displays real-time system information, including process usage. 20

• kill: Terminates a process. 21

• nice: Changes a process's priority. 22

blackgift00@[Link]
• renice: Changes the priority of running processes. 23

• tasklist: Lists running processes in Windows. 24

• taskkill: Terminates a process in Windows. 25

• Task Manager: Visualizes and manages processes in Windows. 26

• Activity Monitor: Visualizes and manages processes in macOS.

CPU Scheduling

CPU scheduling is the process of determining which process should be executed


next on a CPU. The goal is to optimize resource utilization and system performance.

Types of Scheduling
• Long-term scheduling: Determines which processes are admitted into the
system.
• Short-term scheduling: Selects the next process to be executed by the
CPU.
• Medium-term scheduling: Swaps out processes to secondary storage to
free up memory.

Process Scheduling Algorithms


1. First-Come, First-Served (FCFS): Processes are executed in the order they
arrive in the ready queue. Simple but can lead to inefficient scheduling,
especially if a long process arrives first.
2. Shortest Job First (SJF): The process with the shortest estimated burst time
is executed first. Can lead to optimal performance but requires accurate burst
time predictions.
3. Priority Scheduling: Processes are assigned priorities, and the highest-
priority process is executed first. Can lead to starvation if low-priority
processes are constantly preempted.
4. Round Robin: Each process is allocated a fixed time slice. If a process
doesn't finish within its time slice, it's preempted and added to the end of the

blackgift00@[Link]
ready queue. Ensures fairness but can introduce overhead due to context
switching.
5. Shortest Remaining Time First (SRTF): Similar to SJF but considers the
remaining burst time of processes. Can lead to optimal performance but
requires dynamic updates of remaining burst times.

Inter-Process Communication (IPC)


Inter-process communication (IPC) is a mechanism that allows different processes to
communicate and synchronize their activities. This is essential for coordinating the
execution of multiple processes and sharing resources.

Common IPC Mechanisms:


1. Pipes: A unidirectional communication channel that allows data to flow from
one process to another.
2. Message Queues: A queue of messages that can be accessed by multiple
processes. Processes can send and receive messages to and from the
queue.
3. Shared Memory: A block of memory that can be accessed by multiple
processes. Processes can read from and write to the shared memory to
exchange data.
4. Semaphores: A synchronization mechanism that controls access to shared
resources. Semaphores can be used to prevent race conditions and
deadlocks.
5. Sockets: A network programming interface that allows processes to
communicate over a network. Sockets can be used for inter-process
communication between processes on different machines.
6.

Process Synchronization
Process synchronization is the coordination of multiple processes or threads that
access shared resources to ensure data consistency and prevent race conditions.
Race conditions occur when two or more processes access and modify shared data
concurrently, leading to unpredictable and often incorrect results.

blackgift00@[Link]
Types of Process Synchronization
1. Mutual Exclusion: Ensures that only one process can access a shared
resource at a time, preventing conflicts.
2. Cooperation: Involves coordination among processes to achieve a common
goal, such as producer-consumer synchronization.

Critical Section
A critical section is a code segment that accesses shared resources. It's crucial to
ensure that only one process enters the critical section at a time to avoid race
conditions.

Synchronization Mechanisms
Several mechanisms are used to achieve process synchronization:

1. Semaphores: A semaphore is an integer variable that can be accessed only


through two atomic operations: wait and signal.
o wait: Decrements the semaphore value. If the value becomes

negative, the process is blocked.


o signal: Increments the semaphore value. If the value was negative, a

blocked process is awakened.


2. Mutexes: A mutex (mutual exclusion) is a synchronization primitive that
allows only one thread to access a shared resource at a time. It's similar to a
binary semaphore.
3. Monitors: A high-level synchronization construct that encapsulates shared
data and the procedures that operate on it. It provides automatic mutual
exclusion and condition variables for synchronization.
4. Spinlocks: A low-level synchronization primitive that continuously checks a
lock variable until it becomes available. It's suitable for short critical sections,
but can waste CPU cycles if the lock is held for a long time.

blackgift00@[Link]
Deadlock in Operating Systems
Deadlock is a situation in which two or more processes are blocked indefinitely,
waiting for each other to release resources. This can occur when processes compete
for shared resources and the system fails to allocate resources in a way that
prevents circular waiting.

Conditions for Deadlock


Four necessary conditions must hold for a deadlock to occur:

1. Mutual Exclusion: At least one resource must be held in a non-sharable


mode, meaning only one process can use it at a time.
2. Hold and Wait: A process must hold at least one resource and be waiting to
1

acquire additional resources held by other processes. 2

3. No Preemption: Resources cannot be forcibly taken away from a process 3

holding them.
4. Circular Wait: A circular chain of two or more processes exists, where each
process is waiting for a resource held by the next process in the chain. 4

Strategies for Handling Deadlock


1. Deadlock Prevention:
o Resource Ordering: Impose an ordering on resources and require
processes to request resources in increasing order.
o Resource Allocation: Implement a resource allocation policy that
prevents circular wait conditions.
2. Deadlock Avoidance:
o Banker's Algorithm: A complex algorithm that analyzes resource
allocation requests to ensure that a safe state can always be reached.
3. Deadlock Detection:
o Resource Allocation Graph: A graphical representation of processes
and resources to detect cycles that indicate potential deadlock.
4. Deadlock Recovery:
o Process Termination: Terminate one or more processes to break the
deadlock cycle.

blackgift00@[Link]
o Resource Preemption: Forcibly take away resources from processes
to break the deadlock cycle.

blackgift00@[Link]
LEARNING OUTCOME 3

Memory Management
Memory management is the process of allocating and deallocating memory to
various programs and processes in a computer system. It ensures efficient utilization
of memory resources, preventing conflicts and maximizing system performance.

Importance of Memory Management


1. Efficient Resource Utilization: Proper memory management ensures that
memory is allocated to processes as needed and reclaimed when no longer
required.
2. Process Isolation: Memory management isolates processes from each
other, preventing one process from interfering with the memory of another.
3. Security: It helps protect sensitive information by controlling access to
memory regions.
4. Performance: Efficient memory management can significantly improve
system performance by reducing memory access time and minimizing page
faults.
5. Stability: It helps prevent system crashes by avoiding memory leaks and
other memory-related issues.
6. Flexibility: Memory management allows for dynamic allocation and
deallocation of memory, enabling flexible and efficient use of resources.
7. Multitasking: It enables multiple processes to run concurrently by allocating
and managing memory for each process.

Memory Management Techniques


1. Fixed Partitioning: Memory is divided into fixed-size partitions. Each partition
can hold only one process at a time.
2. Dynamic Partitioning: Memory is allocated to processes as needed, creating
partitions of various sizes.
3. Paging: Memory is divided into fixed-size pages, and processes are divided
into equal-sized segments. Pages are loaded into physical memory as
needed.

blackgift00@[Link]
4. Segmentation: Memory is divided into variable-sized segments, and
processes are divided into logical segments. Segments are loaded into
physical memory as needed.
5. Virtual Memory: An illusion of a larger memory space than physically
available. It combines paging and segmentation techniques to efficiently
manage memory.

Memory Swapping
Memory swapping, also known as paging or swapping, is a memory management
technique used by operating systems to temporarily move inactive processes or
parts of processes from main memory (RAM) to secondary storage (like a hard disk)
to free up physical memory for active processes.

Benefits of Memory Swapping


• Increased Physical Memory: By moving inactive processes to secondary
storage, more physical memory becomes available for active processes,
improving system performance.
• Enhanced Multitasking: Memory swapping allows the system to run more
processes concurrently than would be possible with the physical memory
alone.
• Efficient Resource Utilization: By dynamically allocating and deallocating
memory, memory swapping helps optimize resource utilization.

Process of Memory Swapping


1. Process Selection: The operating system selects a process to be swapped
out, typically based on factors like memory usage, priority, and recent activity.
2. Page Table Update: The operating system updates the page table of the
selected process to indicate that the pages have been swapped out to
secondary storage.
3. Page Transfer: The pages of the selected process are transferred from main
memory to secondary storage.

blackgift00@[Link]
4. Frame Allocation: The freed memory frames are allocated to other
processes that require additional memory.
5. Page Fault: When a process attempts to access a page that has been
swapped out, a page fault occurs.
6. Page Retrieval: The operating system retrieves the required page from
secondary storage and loads it into a free memory frame.
7. Page Table Update: The page table of the process is updated to reflect the
new location of the page in main memory.
8. Process Resumption: The process can now continue its execution,
accessing the required page from main memory.

Memory Allocation
Memory allocation is the process of assigning memory space to programs and data
structures during program execution. It ensures that processes have the necessary
memory to operate correctly and efficiently.

Memory Allocation Techniques


Several memory allocation techniques are commonly used:

1. Static Memory Allocation:


o Memory is allocated at compile time.

o The size of memory blocks is fixed and known in advance.

o Simple to implement but less flexible.

o Used for variables declared with fixed sizes like arrays and structures.

2. Stack Memory Allocation:


o Memory is allocated on a stack data structure.

o Functions allocate memory for local variables when they are called.

o Memory is automatically deallocated when the function returns.

o Efficient but limited in size.

3. Heap Memory Allocation:

blackgift00@[Link]
o Memory is allocated dynamically at runtime using functions like malloc
or new.
o More flexible than stack allocation but requires manual memory
management.

o Can lead to memory leaks if memory is not deallocated properly.

Memory Allocation Strategies


Different strategies are used to allocate memory from the heap:

1. First-Fit: The allocator searches the free memory list for the first block that is
large enough to satisfy the request.
2. Best-Fit: The allocator searches the free memory list for the smallest block
that is large enough to satisfy the request.
3. Worst-Fit: The allocator searches the free memory list for the largest block
and allocates it to the request.
4. Buddy System: The allocator divides memory into blocks of equal size.
When a request is made, the allocator finds the smallest block that can satisfy
the request and splits it into two equal-sized blocks.

Memory Deallocation
Memory deallocation is the process of releasing memory that is no longer needed. It
is crucial to avoid memory leaks, which occur when memory is allocated but not
deallocated, leading to wasted resources.

Memory Management Considerations


• Fragmentation: Over time, memory allocation can lead to fragmentation,
where small blocks of free memory are scattered throughout the heap.
• Memory Leaks: Failure to deallocate memory can lead to memory leaks,
reducing available memory.
• Performance: The choice of memory allocation technique can impact system
performance.

blackgift00@[Link]
Memory Paging
Memory paging is a memory management technique where physical memory is
divided into fixed-size blocks called frames, and logical memory is divided into equal-
sized blocks called pages. When a process needs to access a particular memory
location, the operating system translates the logical address into a physical address.
If the required page is not present in physical memory (a page fault occurs), the
operating system loads the page from secondary storage (like a hard disk) into a free
frame.

Memory Fragmentation
Memory fragmentation occurs when memory is allocated and deallocated in a way
that leaves small, unusable blocks of memory scattered throughout the memory
1

space. This can significantly impact system performance.


There are two main types of fragmentation:

• Internal fragmentation: This occurs when a process is allocated a larger


block of memory than it actually needs. The unused portion of the block is
wasted.
• External fragmentation: This occurs when there is enough free memory to
satisfy a request but it is not contiguous. The free memory is fragmented into
small, non-contiguous blocks.

Memory Segmentation
Memory segmentation is a variable-sized segments, each containing a specific
logical unit of a program. These segments can be of different sizes and can be
loaded into non-contiguous physical memory locations.

Swapping vs. Paging


Feature Swapping Paging
Basic Unit Entire process Fixed-size pages
Memory Allocation Contiguous blocks of memory Non-contiguous pages
Page Table Not required Required for address translation
Performance Higher overhead due to larger Lower overhead due to smaller data
Overhead data transfers transfers
Memory Utilization Less efficient, as entire More efficient, as only the necessary
processes are swapped pages are swapped

blackgift00@[Link]
Fragmentation External fragmentation Internal fragmentation
Complexity Simpler to implement More complex to implement

Segmentation vs. Paging


Feature Segmentation Paging
Memory Division Variable-sized segments Fixed-size pages
Address Segment table and page table Page table only
Translation
Memory Contiguous or non-contiguous Non-contiguous
Allocation
Fragmentation External fragmentation Internal fragmentation
Flexibility More flexible for program structure Less flexible for program
structure
Performance Can be less efficient due to larger More efficient due to smaller
page table page table

Fragmentation and System Performance


Fragmentation can significantly impact system performance in the following ways:

• Increased memory access time: When memory is fragmented, the


operating system may need to search through multiple non-contiguous
memory blocks to find the required data, increasing access time.
• Reduced memory utilization: Fragmentation can lead to wasted memory, as
small, non-contiguous blocks of memory may not be usable for larger
processes.
• Increased overhead: The operating system may need to spend more time
managing fragmented memory, reducing system responsiveness.

Virtual Memory
Virtual memory is a memory management technique that gives an application the
illusion of having more memory than is physically available. It achieves this by
storing parts of a program in secondary storage (like a hard disk) and swapping them
into physical memory as needed.

blackgift00@[Link]
Demand Paging
Demand paging is a memory management technique that loads pages into physical
memory only when they are needed. This approach improves system performance
by reducing the amount of physical memory required for each process.

Page Swapping
Page swapping is the process of moving pages between physical memory and
secondary storage. When a page fault occurs (i.e., a page is accessed that is not
currently in physical memory), the operating system selects a page to be swapped
out and loads the required page into the freed frame.

Thrashing
Thrashing occurs when the system spends more time swapping pages between
physical memory and secondary storage than executing processes. This can
significantly degrade system performance. Thrashing can occur due to excessive
process swapping, insufficient physical memory, or poor page replacement
algorithms.

To avoid thrashing, the operating system can use various techniques, such as:

• Page Replacement Algorithms: These algorithms determine which page to


swap out when a page fault occurs. Common algorithms include First-In-First-
Out (FIFO), Least Recently Used (LRU), and Optimal Page Replacement.
• Increasing the Amount of Physical Memory: Adding more physical memory
can reduce the frequency of page faults and improve system performance.
• Reducing the Degree of Multiprogramming: By reducing the number of
processes running concurrently, the demand for physical memory can be
reduced.

blackgift00@[Link]
LEARNING OUTCOME 4

Linux Operating System

Organization and Components


Linux is a kernel-based operating system. The kernel is the core component that
manages system resources and provides essential services. Other key components
include:

• Shell: A command-line interface used to interact with the system.


• System Utilities: Tools for system administration, file management, network
configuration, and other tasks.
• Application Programs: Software applications like web browsers, text editors,
and media players.

File System Structure


Linux uses a hierarchical file system, organized as a tree-like structure. The root
directory, represented by a forward slash (/) is the top-level directory. All other
directories and files are organized under the root directory.

Linux File System Features


• Case-sensitive: File and directory names are distinguished based on case.
• Permissions: Users and groups can have specific permissions (read, write,
execute) for files and directories.
• Symbolic Links: Create shortcuts to files and directories.
• Device Files: Represent hardware devices like disks, printers, and network
interfaces.
• Special Files: Used for communication and system control.

Types of Linux File Systems


• Ext2, Ext3, and Ext4: Widely used file systems, offering good performance
and reliability.
• XFS: High-performance file system, often used on servers.

blackgift00@[Link]
• NTFS: Microsoft's file system, can be used on Linux systems with appropriate
drivers.
• Btrfs: A modern file system with features like copy-on-write and
checksumming.

Windows Operating System

Organization and Components


Windows is a monolithic operating system, where all components are tightly
integrated. Key components include:

• Kernel: The core component that manages system resources.


• User Interface: The graphical user interface (GUI) that allows users to
interact with the system.
• System Applications: Built-in applications like File Explorer, Control Panel,
and Internet Explorer.
• Third-Party Applications: Software applications installed by users.

Windows File System


Windows uses a hierarchical file system similar to Linux, with drive letters
representing the root of each drive.

Types of Windows File Systems


• NTFS (New Technology File System): The primary file system used in
modern Windows versions, offering features like security, compression, and
encryption.
• FAT32: Older file system, limited in file size and partition size.
• exFAT: File system designed for flash drives and external hard drives,
supporting larger file sizes and partitions.

blackgift00@[Link]
Installing a Linux Operating System
Installing a Linux operating system typically involves the following steps:

1. Boot Media Creation: Create a bootable USB drive or DVD with the Linux
distribution of your choice. This can be done using tools like Rufus or
BalenaEtcher.
2. System Boot: Restart your computer and boot from the bootable media. This
will start the Linux installation process.
3. Partitioning: Divide your hard drive into partitions for the operating system,
user data, and swap space. You can choose between manual partitioning or
using automated partitioning tools.
4. Installation: Select the desired language, keyboard layout, and other
settings.
5. User Account Creation: Create a root user account and one or more
standard user accounts.
6. Installation Completion: The installer will format the partitions, install the
operating system, and configure basic settings.

Configuring a Linux Operating System


Once the installation is complete, you can configure your Linux system to your
preferences. Here are some common configuration tasks:

1. User Account Setup: Create additional user accounts and set passwords.
2. Software Installation: Use package managers like apt (Debian/Ubuntu) or
dnf (Fedora/CentOS) to install software packages.

3. Network Configuration: Configure network settings, including IP address,


subnet mask, gateway, and DNS servers.
4. Hardware Configuration: Configure hardware devices like printers,
scanners, and sound cards.
5. Security Configuration: Set up firewalls, user permissions, and other
security measures.
6. Customization: Customize the desktop environment, themes, and other
settings to your liking.

blackgift00@[Link]
Installing a Windows Operating System

Windows Installation
1. Boot Media Creation: Create a bootable USB drive or DVD with the
Windows installation media.
2. System Boot: Restart your computer and boot from the installation media.
3. Language and Keyboard Selection: Choose your preferred language and
keyboard layout.
4. Installation Type: Select the desired installation type, such as a clean install
or an upgrade.
5. Product Key: Enter your Windows product key.
6. License Terms: Accept the license terms.
7. Custom Installation: Choose the drive partition where you want to install
Windows.
8. Installation Progress: The installer will format the selected partition and
install Windows.
9. Regional Settings: Configure your region, time zone, and currency format.
10. User Account Creation: Create a user account with a password.
11. Finalization: The installer will complete the installation process and restart
your computer.

Windows Server Installation


The installation process for Windows Server is similar to Windows, but it involves
additional configuration options for server roles and features.

Configuring a Windows Operating System


Windows Configuration
1. Driver Installation: Install any necessary device drivers for hardware
components.
2. Windows Update: Keep Windows updated with the latest security patches
and features.
3. Software Installation: Install required software applications.

blackgift00@[Link]
4. Network Configuration: Configure network settings, including IP address,
subnet mask, gateway, and DNS servers.
5. User Accounts: Create additional user accounts with appropriate
permissions.
6. Security Settings: Configure security settings, such as firewall, user
accounts, and password policies.

Windows Server Configuration


1. Server Roles and Features: Install and configure server roles (e.g., Active
Directory, File Server, Print Server) and features (e.g., IIS, SQL Server) as
needed.
2. Network Configuration: Configure network settings, including static IP
addresses, DNS, and DHCP.
3. Active Directory: Set up Active Directory for domain-based network
management.
4. Security Policies: Implement security policies, including password policies,
group policies, and security audits.
5. Backup and Recovery: Configure backup and recovery strategies to protect
data and system integrity.

Evolution of Windows Operating Systems


Windows has evolved significantly over the years, with each new version introducing
new features and improvements. Some major versions include:

• Windows 95: Introduced the Start menu and taskbar.


• Windows XP: A popular and stable version, offering a user-friendly interface.
• Windows Vista: Introduced Aero Glass visual effects and improved security
features.
• Windows 7: A refined version with performance improvements and a
streamlined interface.
• Windows 8: Introduced a touch-friendly interface and the Start screen.
• Windows 10: Combined the traditional desktop interface with modern app
features.

blackgift00@[Link]
• Windows 11: The latest version, focusing on performance, security, and a
redesigned user interface.

Operating System Version Compatibility


It's important to consider compatibility when upgrading or installing different versions
of Windows. Older software may not be compatible with newer versions of Windows,
and vice versa. Additionally, hardware drivers may require updates to work with
newer operating systems.

Setting Up a Linux Environment


Setting up a Linux environment involves installing a Linux distribution (like Ubuntu,
Fedora, or Debian) on your computer. This can be done by creating a bootable USB
drive or DVD and booting from it. The installation process usually involves
partitioning your hard drive, selecting a file system, and creating user accounts.

Linux File Permissions, Processes, User Account Management, Linux

Networking or Software Management

File Permissions Linux uses a permission system based on three types of access:
read, write, and execute. These permissions can be granted to three categories of
users: the file owner, the group that owns the file, and others.

Processes A process is an instance of a program in execution. Linux uses a


process scheduler to manage the execution of processes. You can use commands
like ps, top, and kill to view and manage processes.

User Account Management Linux allows you to create and manage user accounts.
You can use the useradd command to create a new user and the passwd command

blackgift00@[Link]
to set a password. User accounts can be assigned different levels of privileges, with
the root user having the highest level of privilege.

Linux Networking Linux provides tools for configuring network interfaces, setting up
network services, and managing network connections. You can use commands like
ifconfig, ip, and netstat to configure network interfaces and troubleshoot network

problems.

Software Management Linux uses package managers to install, update, and


remove software packages. Common package managers include apt
(Debian/Ubuntu) and dnf (Fedora/CentOS).

Linux Terminal

Terminals, Consoles, Shells, and Commands


• Terminal: A text-based interface for interacting with the system.
• Console: A physical terminal or virtual terminal.
• Shell: A command-line interpreter that processes user input.
• Commands: Instructions given to the shell to perform tasks.

Linux Command Structure Linux commands typically follow the format: command
options arguments.

Tab Key and Keyboard Shortcuts The Tab key can be used for autocompletion of
commands and filenames. Keyboard shortcuts like Ctrl+C to interrupt a command
and Ctrl+Z to suspend a process are commonly used.

Root vs. Non-Privileged Users The root user has full access to the system and can
perform any operation. Non-privileged users have limited privileges and cannot
perform certain actions without root privileges. It's generally recommended to use a
non-privileged user account for most tasks and switch to the root user only when
necessary.

blackgift00@[Link]
Linux File System
Linux uses a hierarchical file system, with the root directory (/) at the top. Files and
directories are organized in a tree-like structure. You can use commands like ls, cd,
mkdir, and rm to navigate and manage files and directories.

User Account Management


User accounts can be managed using the useradd, userdel, and passwd
commands. You can set user passwords, assign user groups, and define
permissions for each user.

Additional Linux Concepts


• Cron Jobs: Scheduled tasks that run automatically at specific times.
• Bash Scripting: Creating scripts to automate tasks.
• Regular Expressions: Pattern matching for searching and manipulating text.
• System Logging: Monitoring system events and troubleshooting issues.
• Security: Configuring firewalls, user permissions, and other security
measures.

Virtualization and Hyper-V


Virtualization is a technology that allows multiple operating systems to run on a
single physical machine. This is achieved by creating virtual machines (VMs), each
1

with its own virtual hardware resources. Hyper-V is Microsoft's virtualization platform
that enables the creation and management of virtual machines on Windows-based
servers.

Administering Group Policy


Group Policy is a powerful tool for managing and configuring user settings and
computer settings within an Active Directory domain. It allows administrators to
enforce security policies, deploy software, and configure network settings. To
administer Group Policy, administrators use the Group Policy Management Console
(GPMC) to create and edit Group Policy Objects (GPOs).

blackgift00@[Link]
Deploying a Virtual Machine-Based Infrastructure
1. Hardware Requirements: Ensure that the physical server meets the
minimum hardware requirements for virtualization, including sufficient CPU,
memory, and storage.
2. Hyper-V Installation: Install Hyper-V on the physical server.
3. Virtual Machine Creation: Create virtual machines with the desired
specifications, including operating system, memory, and storage.
4. Network Configuration: Configure virtual networks to connect virtual
machines to each other and to the physical network.
5. Operating System Installation: Install the desired operating system on each
virtual machine.
6. Configuration: Configure the virtual machines, including network settings,
security policies, and software installation.

Managing User Accounts


In Windows:
1. Open User Accounts: Go to the Control Panel and open the User Accounts
settings.
2. Create a New Account: Click on "Add a new user" to create a new user
account.
3. Set Account Type: Choose the account type (Standard or Administrator).
4. Set Password: Set a strong password for the new user account.
5. Assign Permissions: Assign permissions to the user account, such as
access to specific files and folders.

In Kali Linux:
1. Open Terminal: Open a terminal window.
2. Create a New User: Use the useradd command to create a new user
account. For example, useradd newuser.
3. Set Password: Use the passwd command to set a password for the new user.
For example, passwd newuser.
4. Assign Permissions: Use the chown and chmod commands to assign
permissions to files and directories for the new user.

blackgift00@[Link]
Installing, Upgrading, Repairing, and Backing Up the Operating System and
Components

Windows
• Installation:
o Use the Windows installation media (DVD or USB drive) to boot the
system and follow the on-screen instructions.

o Choose the desired language, keyboard layout, and edition.

o Select the partition where you want to install Windows.

o Enter the product key and accept the license terms.

o Wait for the installation process to complete.

• Upgrade:
o Use Windows Update to check for and install the latest updates,
including service packs.

o For major upgrades, use the Windows Setup tool to upgrade to a


newer version of Windows.

• Repair:
o Use the System File Checker (SFC) tool to scan and repair corrupted
system files.

o Use the Deployment Image Servicing and Management (DISM) tool to


repair Windows Image files.

• Backup:
o Use Windows Backup to create system images, file backups, and
system recovery disks.

o Use third-party backup software for more advanced backup and


recovery options.

blackgift00@[Link]
Linux
• Installation:
o Use a live USB or DVD to boot the system and follow the on-screen
instructions.

o Choose the installation type (desktop, server, etc.) and partition the
disk.

o Select the desired language, keyboard layout, and user account


settings.

o Wait for the installation process to complete.

• Upgrade:
o Use the package manager (apt, yum, dnf, etc.) to update the system
and install software updates.

o For major upgrades, use the distribution's upgrade tool or manual


procedures.

• Repair:
o Use the fsck command to check and repair file systems.
o Use the dpkg or rpm package managers to reinstall or repair packages.
• Backup:
o Use tools like rsync or tar to back up files and directories.
o Use backup software like rsnapshot or bacula for automated backups.

Installing Service Packs

Service packs are cumulative updates that include security fixes, bug fixes, and new
features. They can be installed using Windows Update or a standalone installer.

Configuring Critical Operating System Parameters


Windows:
• Password Policy: Use Group Policy to enforce strong password policies,
including password length, complexity, and expiration.

blackgift00@[Link]
• Access Control: Use User Account Control (UAC) to control user privileges
and prevent unauthorized access.
• Audit Policy: Use Group Policy to configure audit policies to track user
activity and system events.
• Kernel Mode Driver Configuration: Install and configure device drivers
using Device Manager.

Linux:
• Password Policy: Use the passwd command to set password policies for
user accounts.
• Access Control: Use file permissions and user groups to control access to
files and directories.
• Audit Policy: Use tools like auditd to configure auditing and log system
events.
• Kernel Mode Driver Configuration: Use the modprobe command to load and
unload kernel modules.

blackgift00@[Link]
LEARNING OUTCOME 6

Virtualization and Emulation

Definition:
• Virtualization: The creation of a virtual version of a computing resource, such
as a server, storage device, or network. This allows multiple virtual machines
(VMs) to run on a single physical machine.
• Emulation: The imitation of one system by another, often involving the
simulation of hardware and software.

Distinction Between Virtualization and Emulation*********


• Virtualization: Leverages the underlying hardware to create virtual
resources. It's more efficient and offers better performance.
• Emulation: Requires software to simulate the hardware and software of the
target system. It's less efficient but can run software designed for different
architectures.

Importance of Virtualization and Emulation in Modern Computing


• Cost Reduction: Virtualization allows multiple operating systems and
applications to run on a single physical machine, reducing hardware costs.
• Improved Resource Utilization: By consolidating multiple workloads onto
fewer physical servers, virtualization can improve resource utilization.
• Increased Flexibility: Virtualization enables rapid deployment and
configuration of virtual machines, making it easier to test new software and
scale IT resources.
• Enhanced Disaster Recovery: Virtual machines can be easily backed up
and restored, reducing downtime in case of hardware failures.
• Software Compatibility: Emulation allows running legacy software on
modern hardware, ensuring compatibility with older applications.

blackgift00@[Link]
Relationship Between Virtualization and Cloud Computing
Virtualization is a fundamental technology that enables cloud computing. Cloud
providers use virtualization to create and manage virtual servers, storage, and
networking resources. This allows them to offer scalable and flexible computing
resources to their customers.

In essence, virtualization provides the foundation for cloud computing, enabling the
delivery of on-demand computing resources over the internet.

Virtualization Techniques for Desktop and Mobile Systems

Desktop Virtualization:
• PC Virtualization: This involves creating virtual machines on a physical
server to host multiple desktop operating systems. Users can access their
virtual desktops remotely, regardless of their physical location.
• Application Virtualization: This isolates applications from the underlying
operating system, allowing them to run on different platforms without
modification.

Mobile Virtualization:
• Containerization: This technique packages applications and their
dependencies into containers, which can be deployed on different devices.
• App Virtualization: Similar to desktop application virtualization, this allows
apps to run on different mobile platforms without modification.

Types of Virtualization
• Full Virtualization: Creates a complete virtual machine with its own hardware
and operating system.
• Paravirtualization: Modifies the guest operating system to interact directly
with the hypervisor, improving performance.
• Hardware Virtualization: Leverages hardware support to create virtual
machines.

blackgift00@[Link]
• Operating System-Level Virtualization: Virtualizes the operating system
kernel, allowing multiple operating systems to run on a single physical
machine.

Virtualization and Emulation in Mobile Operating Systems


Mobile operating systems like Android and iOS use virtualization and emulation to
enhance their capabilities. For example:

• Android: Uses virtualization to run multiple user profiles and isolate sensitive
applications.
• iOS: Employs virtualization techniques to support legacy applications and
provide a secure environment for running third-party software.

Trends in Virtualization and Emulation


• Cloud-Native Virtualization: Leveraging cloud platforms to deploy and
manage virtual machines and containers.
• Serverless Computing: A type of cloud computing that eliminates the need
to manage servers, allowing developers to focus on writing code.
• Edge Computing: Bringing computing and data storage closer to the source
of data generation to reduce latency and improve performance.
• AI and Machine Learning in Virtualization: Using AI and ML to optimize
resource allocation, predict failures, and automate management tasks.

blackgift00@[Link]
LEARNING OUTCOME 7

The Importance of Security at the OS Level


Operating systems (OS) form the foundation of computer systems, making their
security paramount. A compromised OS can lead to severe consequences, including
data breaches, system failures, and unauthorized access.

Operating System Security and Protection


• Security: A broader concept that encompasses all aspects of protecting a
system from threats, including unauthorized access, malware, and physical
attacks.
• Protection: A specific mechanism within the OS that controls access to
system resources and data, ensuring that only authorized entities can use
them.

Feature Security Protection


Scope Broad, encompassing all aspects of Specific to resource access control
system protection
Mechanisms Firewalls, intrusion detection Access control lists, capabilities,
systems, encryption kernel protection
Goals Prevent unauthorized access, data Ensure resources are used
breaches, and system failures correctly and securely
Focus External threats and internal Internal system mechanisms and
vulnerabilities policies
Implementation Network security, user Memory management, file system
authentication, software updates permissions, kernel protection
Challenges Evolving threats, user behavior, and Balancing security with
system complexity performance and usability
Relationship Protection is a fundamental Security relies on effective
component of security protection mechanisms
Example Installing antivirus software Enforcing file permissions to
prevent unauthorized access

blackgift00@[Link]
Levels of Computer System Protection
A computer system must be protected at multiple levels:

1. Physical Security: Protecting hardware components from physical damage,


theft, and unauthorized access.
2. Network Security: Securing network communications to prevent
unauthorized access and data interception.
3. Operating System Security: Protecting the core functions of the OS from
attacks and vulnerabilities.
4. Application Security: Ensuring the security of individual applications and the
data they process.
5. User Security: Protecting user accounts and data from unauthorized access.
6. Data Security: Protecting sensitive data from unauthorized access,
disclosure, modification, or destruction.

Security Features in Operating Systems


Operating systems incorporate various security features to protect user data and
system integrity. Here are some of the key security features:

User Authentication:
• Password-based Authentication: Users are required to provide a password
to access the system.
• Biometric Authentication: Uses physical characteristics like fingerprints or
facial recognition for authentication.
• Multi-factor Authentication (MFA): Combines multiple authentication
methods (e.g., password, fingerprint, security token) for enhanced security.

Access Control:
• User Accounts and Permissions: Users are assigned specific permissions
to access files and resources.
• Role-Based Access Control (RBAC): Assigns permissions based on user
roles, limiting access to necessary resources.

blackgift00@[Link]
• File System Permissions: Controls who can read, write, and execute files
and directories.

Security Policies:
• Password Policies: Enforce strong password requirements, such as
minimum length, complexity, and expiration.
• Account Lockout Policies: Automatically lock accounts after multiple failed
login attempts.
• Security Audits: Log and monitor system activity to detect and investigate
security incidents.

Security Updates:
• Regular Updates: Keep the operating system and software up-to-date with
the latest security patches.
• Vulnerability Management: Identify and address security vulnerabilities
promptly.

Malware Protection:
• Antivirus Software: Detects and removes malware, such as viruses, worms,
and ransomware.
• Firewall: Protects the system from unauthorized network access.
• Intrusion Detection Systems (IDS): Monitor network traffic for signs of
intrusion attempts.

Data Encryption:
• File and Disk Encryption: Encrypts data to protect it from unauthorized
access.
• Secure Communication: Encrypts network traffic to prevent eavesdropping.

blackgift00@[Link]
Operating System Security Threats and Vulnerabilities
Operating systems are constantly under threat from various vulnerabilities that can
be exploited by malicious actors. Some common threats and vulnerabilities include:

• Malware: Malicious software such as viruses, worms, and ransomware can


infect systems, steal data, and disrupt operations.
• Phishing Attacks: Social engineering attacks that trick users into revealing
sensitive information.
• Network Attacks: Cyberattacks targeting network vulnerabilities, such as
DDoS attacks, port scanning, and man-in-the-middle attacks.
• Zero-Day Exploits: Attacks that exploit vulnerabilities that have not yet been
patched.
• Privilege Escalation: Exploiting system vulnerabilities to gain unauthorized
access to privileged accounts.

Measures to Ensure Security and Protection in Operating Systems


To mitigate these threats and vulnerabilities, several measures can be implemented:

1. Regular Updates:
o Keep the operating system and software up-to-date with the latest
security patches and updates.

o Use automated update tools to ensure timely updates.

2. Strong Password Policies:


o Enforce strong password policies, including password length,
complexity, and expiration.

o Avoid using weak passwords like "password" or "123456".

o Use a password manager to generate and store strong passwords.

3. User Access Controls:


o Implement strong access controls to limit user privileges.

o Use role-based access control (RBAC) to assign permissions based on


user roles.

o Regularly review and update user permissions.

blackgift00@[Link]
4. Firewall Configuration:
o Configure a firewall to block unauthorized network traffic.

o Regularly review and update firewall rules.

5. Malware Protection:
o Install and maintain antivirus and anti-malware software.

o Regularly scan for malware and remove any detected threats.

6. Security Awareness Training:


o Educate users about security best practices, such as recognizing
phishing attempts, avoiding suspicious links, and keeping software
updated.

7. Regular Security Audits:


o Conduct regular security audits to identify vulnerabilities and potential
threats.

o Use vulnerability scanning tools to identify and fix security weaknesses.

8. Incident Response Plan:


o Develop and implement an incident response plan to respond to
security incidents effectively.

o Train staff on how to respond to security incidents.

blackgift00@[Link]

You might also like