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

Ch.Operating System

Uploaded by

075bei042
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Ch.Operating System

Uploaded by

075bei042
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Chapter 2 : Operating System

2.1. Introduction, Types and Functions of operating systems,


Here’s a brief overview of operating systems, their types, and their functions:

Introduction to Operating Systems

An operating system (OS) is system software that manages computer hardware and
software resources and provides common services for computer programs. It acts as an
intermediary between users and the computer hardware. The OS ensures that different
programs and users running on the computer do not interfere with each other and that
resources are allocated efficiently.

Types of Operating Systems

1. Batch Operating Systems: These systems handle tasks in batches without user
interaction. Jobs are processed sequentially, and users submit their tasks to a
queue. Examples include early systems like IBM's OS/360.
2. Time-Sharing Operating Systems: Also known as multitasking OS, they allow
multiple users to interact with the computer simultaneously. Examples include
Unix and its variants, such as Linux.
3. Distributed Operating Systems: These systems manage a group of separate
computers as if they were a single system. They enable resource sharing and
communication between multiple machines. Examples include modern
cloud-based operating systems.
4. Network Operating Systems: Designed to manage network resources and
services. They handle network tasks and provide services like file sharing and
printer access. Examples include Windows Server and Novell NetWare.
5. Real-Time Operating Systems (RTOS): These are used in systems where timely
and predictable responses are crucial, such as in embedded systems. Examples
include VxWorks and QNX.
6. Mobile Operating Systems: These are specifically designed for mobile devices.
Examples include Android and iOS.
7. Desktop Operating Systems: These are designed for personal computers and
workstations. Examples include Windows, macOS, and various Linux
distributions.

Functions of Operating Systems


1. Process Management: Handles the creation, scheduling, and termination of
processes. It ensures that processes are executed efficiently and fairly.
2. Memory Management: Manages the computer's memory, including RAM and
cache. It keeps track of each byte in a computer’s memory and allocates space as
needed.
3. File System Management: Manages files on the computer, including their
creation, deletion, and access. It organizes files into directories and handles file
permissions.
4. Device Management: Controls and manages hardware devices like printers, disks,
and keyboards. It provides a way for software to communicate with hardware.
5. User Interface: Provides a way for users to interact with the computer. This can
be a graphical user interface (GUI) or a command-line interface (CLI).
6. Security and Access Control: Protects data and system resources from
unauthorized access. It includes user authentication, file permissions, and
encryption.
7. Networking: Manages network connections and communication between
computers. It includes managing protocols, data transmission, and network
services.
8. Error Detection and Handling: Monitors the system for errors and provides
mechanisms for handling and recovering from faults.

These functions work together to provide a stable and efficient computing environment,
making it easier for users and applications to interact with the hardware.

2.2. Input Output and Files: I/O devices and its organization, Principles of I/O
software and hardware, Disks, Files and directories organization, File System
Implementation

Certainly! Here’s a detailed look at input/output (I/O) and file management in operating
systems:

I/O Devices and Their Organization

1. I/O Devices: These are hardware components used to input data into or output data
from a computer. Common I/O devices include:

● Input Devices: Keyboard, mouse, scanner, microphone.


● Output Devices: Monitor, printer, speakers.
● Storage Devices: Hard drives, SSDs, USB drives.

2. Device Organization: I/O devices can be classified based on their communication


methods:

● Character Devices: Handle data as a stream of characters. Examples include


keyboards and serial ports.
● Block Devices: Handle data in blocks or chunks. Examples include hard drives
and SSDs.
● Network Devices: Facilitate network communication. Examples include network
cards and modems.

Principles of I/O Software and Hardware

1. I/O Hardware: The hardware for I/O devices includes:

● Controllers: Manage communication between the OS and the device. Each device
typically has a corresponding controller.
● Buses: Facilitate data transfer between the CPU, memory, and I/O devices.
● Ports: Physical or logical interfaces for connecting devices to the system.

2. I/O Software: This includes:

● Device Drivers: Software components that provide an interface between the OS


and hardware devices. They translate OS commands into device-specific
operations.
● I/O Scheduling: Determines the order in which I/O requests are processed to
optimize performance and fairness.
● Buffering: Temporary storage of data while it is being transferred between devices
and applications, helping to manage differences in data processing speeds.

Disks, Files, and Directories Organization

1. Disks: Disk storage is organized into:

● Tracks: Circular paths on the surface of the disk.


● Sectors: Subdivisions of tracks where data is stored.
● Blocks: The smallest unit of data storage on a disk.
Disks use file allocation tables (FAT) or inode structures to manage the storage of files.

2. Files and Directories:

● Files: Collections of related data stored on disk. Each file has a name and may
have attributes such as size, permissions, and timestamps.
● Directories: Containers that organize files and other directories. They provide a
hierarchical structure to manage files.

3. File System Implementation:

● File Allocation: Methods for allocating disk space to files include contiguous
allocation, linked allocation, and indexed allocation.
○ Contiguous Allocation: Files are stored in contiguous blocks. It is simple
but can lead to fragmentation.
○ Linked Allocation: Files are stored in linked blocks scattered across the
disk. It reduces fragmentation but can lead to slower access times.
○ Indexed Allocation: Uses an index block that contains pointers to the file’s
data blocks. It provides efficient access and reduces fragmentation.
● Directory Structures: File systems use various structures to manage directories,
such as:
○ Single-Level Directory: All files are in a single directory.
○ Two-Level Directory: Separate directories for users or groups.
○ Hierarchical Directory: A tree-like structure with directories and
subdirectories.
● File System Metadata: Includes information about files and directories, such as
file names, sizes, permissions, and creation/modification dates. This metadata is
stored in structures like inode tables or file allocation tables.
● File System Integrity: Techniques to ensure data integrity include journaling
(recording changes before they are applied), checksums, and redundant data
storage.

Together, these elements of I/O and file management ensure that data can be efficiently
read from and written to storage devices, while also providing a structured way to
organize and access files.
2.3. Common Operating Systems:

2.3.1. Installation, backup, recovery and optimization of operating systems:


MS-DOS, Windows Family of Products, Unix Family of Products, Linux Family of
Products,

Here’s an overview of installation, backup, recovery, and optimization for different


operating systems:

MS-DOS

1. Installation:

● Setup: MS-DOS was typically installed from floppy disks or, in later versions,
from a CD-ROM. The installation involved booting from the disk and running the
installation program.
● Configuration: After installation, the CONFIG.SYS and AUTOEXEC.BAT files
were configured to set up system settings and load drivers.

2. Backup:

● Tools: MS-DOS provided basic backup utilities like BACKUP and RESTORE.
● Method: Backups were usually done to external media like floppy disks or tape
drives.

3. Recovery:

● Tools: MS-DOS had limited recovery tools. Users often relied on third-party
software for data recovery.
● Recovery: The process usually involved restoring from backups or reinstalling the
OS.

4. Optimization:

● Configuration: Optimization involved adjusting the CONFIG.SYS and


AUTOEXEC.BAT files to improve performance, such as configuring memory
management.
● Defragmentation: While not as advanced as modern systems, some basic
defragmentation tools were available.

Windows Family of Products

1. Installation:

● Setup: Windows installation typically involves booting from an installation media


(USB/DVD), running the setup program, and following the graphical installation
wizard.
● Configuration: Post-installation, Windows Setup includes configuring system
settings, user accounts, and network configurations.

2. Backup:

● Tools: Windows offers built-in tools like File History, Backup and Restore
(Windows 7), and Windows Backup.
● Method: Backups can be scheduled and stored on external drives, network
locations, or cloud storage.

3. Recovery:

● Tools: Windows provides recovery options like System Restore, Startup Repair,
and Recovery Drive.
● Recovery: Users can restore their system to a previous state, repair startup issues,
or perform a clean installation using recovery media.

4. Optimization:

● Tools: Windows includes tools such as Disk Cleanup, Defragment and Optimize
Drives, and Performance Monitor.
● Configuration: Optimization involves managing startup programs, updating
drivers, and ensuring efficient disk usage.

Unix Family of Products

1. Installation:

● Setup: Unix installations vary by distribution. Installation often involves booting


from installation media and following a text-based or graphical setup process.
● Configuration: Post-installation, configuration involves setting up user accounts,
network settings, and system services.

2. Backup:

● Tools: Unix systems use tools like tar, cpio, and rsync for backups. There are
also more advanced tools like dump and restore.
● Method: Backups are usually stored on external media or network storage.
Automation is often achieved with cron jobs.

3. Recovery:

● Tools: Unix provides tools like fsck for filesystem checking and repair.
Recovery can involve restoring from backups or using live CDs for emergency
repair.
● Recovery: Users may perform system repairs manually or use pre-configured
recovery environments.

4. Optimization:

● Tools: Unix systems use tools like top, vmstat, and iostat for performance
monitoring.
● Configuration: Optimization involves tuning kernel parameters, managing
processes, and ensuring efficient disk usage.

Linux Family of Products

1. Installation:

● Setup: Linux installation is typically performed from bootable media


(USB/DVD), using an installation wizard provided by the distribution (e.g.,
Ubuntu’s Ubiquity or Fedora’s Anaconda).
● Configuration: Post-installation configuration includes setting up users, network
settings, and additional software.

2. Backup:

● Tools: Linux provides tools like rsync, tar, dd, and graphical tools like Deja
Dup and Timeshift.
● Method: Backups can be scheduled with cron jobs and stored on local drives,
external media, or cloud storage.

3. Recovery:

● Tools: Linux offers recovery tools like fsck for filesystem checks, grub for boot
issues, and recovery distributions like SystemRescue.
● Recovery: Recovery involves restoring from backups, using live CDs to repair
filesystems, or reinstalling the OS.

4. Optimization:

● Tools: Linux includes tools like top, htop, iotop, and sysctl for
performance monitoring and tuning.
● Configuration: Optimization involves configuring system services, tuning kernel
parameters, and managing resources effectively.

Each operating system family has its tools and methods for installation, backup, recovery,
and optimization, catering to its unique architecture and user needs.

2.3.2. Windows Networking, Windows Architecture, Linux Architecture,


Troubleshooting Windows, & Linux, Managing Network Printing, Managing Hard
Disks and Partitions, Monitoring and Troubleshooting Windows, Users, Groups and
Permission on Linux and Windows. Sharing file, folder, printer, application, etc.

Here’s a comprehensive overview of the topics related to Windows and Linux


networking, architecture, troubleshooting, and management:

Windows Networking

1. Networking Overview:

● Protocols: Windows uses TCP/IP as the primary networking protocol suite. Other
protocols include NetBIOS and SMB (Server Message Block) for file and printer
sharing.
● Network Configuration: Windows offers a graphical interface and command-line
tools (ipconfig, netsh) for network configuration.
2. Network Services:

● DNS: Windows integrates with DNS for name resolution.


● DHCP: Dynamic Host Configuration Protocol assigns IP addresses automatically.
● Active Directory: Provides directory services for managing network resources
and user authentication.

Windows Architecture

1. Core Components:

● Kernel: Manages hardware and system resources.


● User Mode: Includes applications, services, and the Windows API.
● System Services: Background services that perform tasks such as printing,
networking, and system management.

2. File System:

● NTFS: The default file system for Windows, offering features like file
permissions, encryption, and compression.

3. Registry:

● Registry: A hierarchical database that stores configuration settings and options.

Linux Architecture

1. Core Components:

● Kernel: Manages hardware and system resources, handling tasks like process
management, memory management, and device drivers.
● Shell: The command-line interface that allows users to interact with the OS.
● File System: Linux uses ext4, XFS, and other file systems with features like
journaling and permissions.

2. System Services:

● init/systemd: Manages system startup and services.


● Daemons: Background processes that provide system and network services.

Troubleshooting Windows
1. Common Issues:

● Startup Problems: Use Safe Mode, System Restore, or Startup Repair tools.
● Performance Issues: Use Task Manager, Resource Monitor, and Performance
Monitor.
● Network Issues: Check IP configuration, use ping and tracert commands,
and troubleshoot using Network and Sharing Center.

2. Tools:

● Event Viewer: Logs system and application events.


● Reliability Monitor: Provides a timeline of system events and issues.

Troubleshooting Linux

1. Common Issues:

● Boot Problems: Use recovery mode or live CDs to troubleshoot.


● Performance Issues: Use tools like top, htop, and iotop to diagnose
performance problems.
● Network Issues: Check network configuration with ifconfig or ip, use ping,
traceroute, and netstat for diagnostics.

2. Tools:

● dmesg: Displays system messages and hardware-related logs.


● syslog: General system logging facility.

Managing Network Printing

1. Windows:

● Add Printers: Use the Devices and Printers control panel to add and manage
printers.
● Printer Sharing: Configure printer sharing in the printer properties to allow
network access.

2. Linux:

● CUPS: Common Unix Printing System manages print jobs and queues.
● Configuration: Use lpadmin to add printers and system-config-printer
for a graphical interface.

Managing Hard Disks and Partitions

1. Windows:

● Disk Management: Use Disk Management console (diskmgmt.msc) to create,


format, and manage partitions.
● Tools: Disk Cleanup, Disk Defragmenter.

2. Linux:

● Partitioning: Use tools like fdisk, parted, or gparted for disk partitioning.
● File Systems: Manage file systems with commands like mkfs, fsck, and
mount.

Monitoring and Troubleshooting Windows

1. Tools:

● Task Manager: Monitor processes and system performance.


● Performance Monitor: Detailed performance metrics and alerts.
● Event Viewer: Check system, security, and application logs.

2. Techniques:

● Check for Updates: Ensure the system is up-to-date with the latest patches.
● Run Diagnostics: Use built-in diagnostics and troubleshooting wizards.

Users, Groups, and Permissions

1. Windows:

● Users and Groups: Managed through the Local Users and Groups console
(lusrmgr.msc) or Active Directory for networked environments.
● Permissions: Set file and folder permissions using the Security tab in file
properties.

2. Linux:
● Users and Groups: Managed with commands like useradd, usermod,
groupadd, and gpasswd.
● Permissions: Set permissions using chmod, chown, and chgrp. File
permissions include read (r), write (w), and execute (x) for user, group, and others.

Sharing Files, Folders, Printers, and Applications

1. Windows:

● File and Folder Sharing: Configure sharing via file or folder properties. Set
permissions for network users.
● Printer Sharing: Enable sharing in printer properties.
● Application Sharing: Use Remote Desktop Services or similar tools for
application sharing.

2. Linux:

● File and Folder Sharing: Use Samba for sharing with Windows networks, or
NFS for sharing with Unix/Linux systems.
● Printer Sharing: Use CUPS to manage and share printers.
● Application Sharing: Use remote desktop solutions like VNC or SSH with X11
forwarding.

These topics cover a broad range of administrative tasks and troubleshooting techniques
for both Windows and Linux systems, providing a foundation for managing and
maintaining these operating systems effectively.

2.3.3. Identifying and managing Security Threats to Operating Systems

Identifying and managing security threats to operating systems is crucial to maintaining


the integrity, confidentiality, and availability of data and system resources. Here’s a
detailed overview:

Identifying Security Threats

1. Types of Security Threats:


● Malware: Includes viruses, worms, trojans, ransomware, and spyware. These
malicious programs can damage or steal data, or disrupt system operations.
● Phishing: Fraudulent attempts to obtain sensitive information, often through
deceptive emails or websites.
● Ransomware: Encrypts files on a system and demands payment for the decryption
key.
● Man-in-the-Middle Attacks: Intercept and possibly alter communication between
two parties without their knowledge.
● Denial-of-Service (DoS) Attacks: Overwhelm a system or network, rendering it
unavailable to legitimate users.
● Exploits: Take advantage of vulnerabilities in software or hardware to gain
unauthorized access or control.

2. Tools and Techniques for Identifying Threats:

● Antivirus and Anti-Malware Software: Detect and remove known threats.


Examples include Windows Defender, McAfee, and ClamAV.
● Intrusion Detection Systems (IDS): Monitor network and system activity for
suspicious behavior. Examples include Snort and Suricata.
● Firewalls: Monitor and control incoming and outgoing network traffic based on
predetermined security rules. Examples include pfSense and Windows Firewall.
● Vulnerability Scanners: Identify weaknesses in systems and applications.
Examples include Nessus and OpenVAS.
● Log Analysis: Regularly review system and application logs to detect unusual or
unauthorized activity. Tools like Splunk and ELK Stack can assist with log
management.

Managing Security Threats

1. Preventive Measures:

● Regular Updates: Keep the operating system and applications up-to-date with the
latest security patches and updates.
● Strong Authentication: Implement strong passwords and multi-factor
authentication (MFA) to enhance security.
● Access Controls: Implement least privilege principles, restricting user permissions
to the minimum necessary.
● Encryption: Encrypt sensitive data both at rest and in transit to protect against
unauthorized access.
● Network Segmentation: Divide the network into segments to limit the spread of
potential threats.
● Security Policies: Develop and enforce security policies and procedures,
including guidelines for password management, data handling, and incident
response.

2. Detection and Response:

● Incident Response Plan: Develop a plan for responding to security incidents,


including steps for containment, eradication, recovery, and communication.
● Regular Audits: Conduct regular security audits and vulnerability assessments to
identify and address potential weaknesses.
● User Education: Train users on security best practices, recognizing phishing
attempts, and safe computing habits.
● Backup and Recovery: Implement regular backups and test recovery procedures
to ensure data can be restored in the event of an attack or failure.

3. Tools for Managing Security:

● Endpoint Protection: Solutions like CrowdStrike and Sophos provide


comprehensive protection for individual devices.
● Security Information and Event Management (SIEM): Platforms like Splunk
and QRadar aggregate and analyze security data from various sources for threat
detection and response.
● Patch Management: Tools like WSUS (Windows Server Update Services) and
Patch My PC automate the process of applying updates and patches.

4. Specific Considerations for Different Operating Systems:

Windows:

● Windows Defender: Built-in antivirus and anti-malware protection.


● Group Policy: Configure security settings across multiple Windows machines.
● Windows Update: Ensure timely application of security patches.

Linux:

● SELinux/AppArmor: Provide mandatory access control to limit the actions that


processes can perform.
● iptables/nftables: Manage network traffic and implement firewall rules.
● Logwatch/Fail2Ban: Monitor logs and protect against brute-force attacks.

Conclusion

Effective security management involves a combination of identifying potential threats,


implementing preventive measures, and having robust detection and response strategies
in place. Regular updates, strong authentication, and user education are fundamental to
protecting operating systems from security threats. Additionally, leveraging appropriate
tools and technologies tailored to the specific operating system can enhance overall
security posture.

You might also like