Ch.Operating System
Ch.Operating System
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.
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.
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:
1. I/O Devices: These are hardware components used to input data into or output data
from a computer. Common I/O devices include:
● 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.
● 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.
● 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:
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:
1. Installation:
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.
1. Installation:
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.
1. Installation:
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.
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:
Windows Architecture
1. Core Components:
2. File System:
● NTFS: The default file system for Windows, offering features like file
permissions, encryption, and compression.
3. Registry:
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:
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:
Troubleshooting Linux
1. Common Issues:
2. Tools:
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.
1. Windows:
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.
1. Tools:
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.
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.
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.
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.
Windows:
Linux:
Conclusion