Operating System and Information Systems [ Note of RBB (Rastriya Banijya Bank) ] | Note of Rastriya Banijya Bank

Anil Pandit
0

Operating System (OS)

  • An Operating System (OS) is system software that manages computer hardware and software resources.
  • It acts as an interface between the user and the computer hardware.
  • It controls the execution of programs and coordinates all computer activities.
  • It manages system resources such as the CPU, memory, storage, and input/output devices.
  • It provides an environment for running application software.
  • It allocates resources efficiently to different programs and users.
  • It manages files and directories by creating, deleting, renaming, and organizing them.
  • It controls and coordinates input and output devices using device drivers.
  • It provides security through user authentication, passwords, and access control.
  • It supports multitasking by allowing multiple programs to run simultaneously.
  • It detects and handles system errors to improve reliability.
  • It provides networking capabilities for communication and resource sharing.
  • It offers user interfaces such as Graphical User Interface (GUI) and Command Line Interface (CLI).
  • It improves the overall performance and efficiency of the computer system.

Functions of Operating System

1.      Process Management

·         Creates and manages processes.

·         Schedules CPU time for different processes.

·         Supports multitasking by running multiple programs simultaneously.

·         Terminates processes after execution.

·         Synchronizes and coordinates processes.

2.      Memory Management

·         Allocates memory to programs and processes.

·         Deallocates memory after program completion.

·         Keeps track of used and free memory.

·         Manages virtual memory for efficient execution.

3.      File Management

·         Creates, deletes, copies, and renames files.

·         Organizes files into directories (folders).

·         Controls file access and permissions.

·         Maintains data storage and retrieval.

4.      Device Management

·         Manages input and output devices.

·         Uses device drivers to communicate with hardware.

·         Allocates devices to different programs.

·         Monitors the status of connected devices.

5.      Secondary Storage Management

·         Manages hard disks, SSDs, and other storage devices.

·         Allocates and deallocates disk space.

·         Organizes stored data efficiently.

·         Performs disk scheduling and formatting.

6.      Security and Protection

·         Provides user authentication through usernames and passwords.

·         Protects files and data from unauthorized access.

·         Manages user permissions and access rights.

·         Supports encryption and system security features.

7.      User Interface

·         Provides a Graphical User Interface (GUI) with windows, icons, and menus.

·         Provides a Command Line Interface (CLI) for text-based commands.

·         Enables users to interact easily with the computer.

8.      Resource Allocation

·         Allocates CPU time, memory, storage, and I/O devices.

·         Ensures efficient use of system resources.

·         Prevents resource conflicts among programs.

9.      Error Detection and Handling

·         Detects hardware and software errors.

·         Reports system failures and errors.

·         Helps recover from system crashes.

·         Maintains system stability.

10.  Networking

·         Enables communication between computers over a network.

·         Supports file and printer sharing.

·         Provides Internet connectivity.

·         Manages network resources and communication protocols.

11.  Performance Monitoring

·         Records CPU and memory usage.

·         Monitors system performance.

·         Keeps track of resource utilization.

·         Generates usage reports for system administration.

 

Types of Operating System

1. Based on User Interface

a. Command Line Interface (CLI) Operating System

·         Allows users to interact with the computer by typing commands.

·         Requires knowledge of specific commands.

·         Uses fewer system resources.

·         Users type commands using a keyboard.

·         Faster for experienced users.

·         Example: MS-DOS, Linux Terminal.

b. Graphical User Interface (GUI) Operating System

·         Allows users to interact using icons, windows, menus, and buttons.

·         Easy to use and does not require command knowledge.

·         Provides a user-friendly environment.

·         Supports multitasking with graphical applications.

·         Example: Windows, macOS.

2. Based on Tasking

a. Single-Tasking Operating System

·         Allows only one program to run at a time.

·         Uses fewer system resources.

·         Simple and requires fewer resources.

·         One program must finish before another starts.

·         Example: MS-DOS.

b. Multi-Tasking Operating System

·         Allows multiple programs to run simultaneously.

·         Improves efficiency and user productivity.

·         Shares CPU time among different programs.

·         Improves productivity.

·         Example: Windows, Linux, macOS.

3. Based on Number of Users

a. Single-User Operating System

·         Supports only one user at a time.

·         Designed for personal computers.

·         Example: Windows, macOS.

b. Multi-User Operating System

·         Allows multiple users to access system resources simultaneously.

·         Commonly used in servers and large systems.

·         Example: Linux, UNIX.

4. Other Type of Operating System

a. Batch Operating System

·         A Batch Operating System processes a group (batch) of similar jobs together without direct user interaction.

·         Users submit jobs, and the operating system executes them one by one automatically.

·         Jobs with similar requirements are collected into batches.

·         It does not require user intervention during execution.

·         Suitable for repetitive and large-scale data processing tasks.

·         Improves CPU utilization by processing multiple jobs continuously.

·         Reduces idle time of the processor.

b. Real-Time Operating System (RTOS)

·         A Real-Time Operating System (RTOS) provides immediate and predictable responses to events within a specified time limit.

·         It is designed for applications where timing is critical.

·         Ensures that tasks are completed before their deadlines.

·         Provides high reliability and stability.

·         Supports fast interrupt handling.

·         Offers deterministic scheduling for time-sensitive tasks.

·         Used in systems where delays can cause failures or safety risks.

c. Distributed Operating System

·         A Distributed Operating System manages multiple interconnected computers and makes them appear as a single system.

·         Resources such as memory, storage, and processors are shared among connected computers.

·         Supports communication between computers over a network.

·         Improves overall system performance through parallel processing.

·         Increases reliability by allowing one computer to continue if another fails.

·         Provides transparency so users see the system as one computer.

·         Enables resource sharing and load balancing.

d. Network Operating System

·         A Network Operating System (NOS) manages and coordinates computers connected through a network.

·         Allows multiple computers to communicate and share resources.

·         Provides centralized management of users and network resources.

·         Supports file sharing, printer sharing, and remote access.

·         Controls user authentication and access permissions.

·         Enables secure communication between network devices.

·         Manages network traffic and connected devices.

·         Used in client-server environments.

Process Management

  • Process management is a function of the operating system that manages the execution of programs.
  • A process is a program that is currently running in the computer system.
  • It creates, schedules, executes, and terminates processes.
  • It manages CPU allocation among different processes.
  • It ensures efficient use of system resources and smooth multitasking.

Objectives of Process Management

  • Execute multiple programs efficiently.
  • Maximize CPU utilization.
  • Ensure fair allocation of CPU time.
  • Prevent conflicts between processes.
  • Improve system responsiveness.
  • Support multitasking and multiprocessing.

Functions of Process Management

1.      Process Creation

  • Creates a new process when a program is executed.
  • Assigns a unique Process ID (PID) to each process.
  • Allocates the necessary memory and system resources.
  • Initializes the process before execution.

2.      Process Scheduling

  • Decides which process should use the CPU next.
  • Maintains a queue of ready processes.
  • Allocates CPU time fairly among processes.
  • Uses scheduling algorithms such as:

·         First Come First Served (FCFS)

·         Shortest Job First (SJF)

·         Priority Scheduling

·         Round Robin (RR)

3.      Process Execution

  • Loads the selected process into the CPU.
  • Executes the program instructions.
  • Switches between processes during multitasking.
  • Monitors the execution status.

4.      Process Synchronization

  • Coordinates multiple processes that share resources.
  • Prevents data inconsistency.
  • Ensures processes execute in the correct order.
  • Uses synchronization techniques such as semaphores and mutexes.

5.      Inter-Process Communication (IPC)

  • Allows processes to exchange data and information.
  • Enables cooperation between different processes.
  • Methods of IPC include:

·         Shared Memory

·         Message Passing

·         Pipes

·         Sockets

6.      Deadlock Management

  • Detects situations where processes are waiting indefinitely for resources.
  • Prevents deadlocks whenever possible.
  • Recovers the system if a deadlock occurs.
  • Ensures continuous execution of processes.

7.      Process Termination

  • Ends a process after it completes its task.
  • Releases memory, CPU time, and other allocated resources.
  • Removes the process from the system.
  • Updates system information.


Process States

·         New: The process is being created.

·         Ready: The process is ready to run and waiting for CPU time.

·         Running: The CPU is executing the process.

·         Waiting (Blocked): The process is waiting for an event, such as input/output completion.

·         Terminated: The process has finished execution and exits the system.


Advantages of Process Management

  • Supports multitasking.
  • Improves CPU utilization.
  • Increases system performance.
  • Ensures efficient resource allocation.
  • Prevents process conflicts.
  • Enables multiple users and applications to run simultaneously.
  • Improves response time.

Disadvantages of Process Management

  • Context switching introduces overhead.
  • Poor scheduling may reduce performance.
  • Synchronization can be complex.
  • Deadlocks may occur if resources are not managed properly.
  • Requires additional memory and CPU resources.

 

Process Scheduling

  • Process Scheduling is a function of the operating system that selects which process should be executed by the CPU at a particular time.
  • It manages the order of execution of processes waiting in the ready queue.
  • It ensures efficient use of CPU resources and improves system performance.
  • The component of the OS responsible for scheduling is called the Process Scheduler.
  • Process scheduling is essential in multitasking and multiprogramming operating systems.

Types of Process Scheduling

1. Long-Term Scheduler (Job Scheduler)

  • Selects processes from the job pool stored on secondary storage.
  • Loads selected processes into main memory.
  • Controls the degree of multi programming.
  • Runs less frequently compared to other schedulers.
  • Maintains a balance between CPU-bound and I/O-bound processes.

Example: Selecting programs from a hard disk to load into RAM.

2. Short-Term Scheduler (CPU Scheduler)

  • Selects a process from the ready queue and assigns the CPU.
  • Runs very frequently.
  • Performs fast decision-making.
  • Responsible for CPU allocation.
  • Directly affects system performance.

Example: Choosing which application gets CPU time next.

3. Medium-Term Scheduler

  • Temporarily removes processes from memory.
  • Performs swapping of processes between RAM and disk.
  • Helps reduce memory load.
  • Improves system performance.
  • Used in time-sharing systems.

 

Process Scheduling Algorithms

1. First Come First Served (FCFS)

  • Processes are executed in the order they arrive.
  • It follows the FIFO (First In First Out) principle.
  • Simple and easy to implement.
  • Non-preemptive scheduling algorithm.

            Advantages:

·         Easy to understand.

·         Fair execution order.

Disadvantages:

·         High waiting time.

·         Poor performance for short processes.

2. Shortest Job First (SJF)

  • Executes the process with the smallest execution time first.
  • Reduces average waiting time.
  • Can be preemptive or non-preemptive.

Advantages:

·         Minimum average waiting time.

Disadvantages:

·         Difficult to predict process execution time.

·         Long processes may suffer starvation.

3. Priority Scheduling

  • Each process is assigned a priority value.
  • The CPU executes the highest-priority process first.
  • Can be preemptive or non-preemptive.

Advantages:

·         Important tasks get faster execution.

Disadvantages:

·         Low-priority processes may wait indefinitely.

4. Round Robin (RR)

  • Designed for time-sharing systems.
  • Each process receives a fixed CPU time called a time quantum.
  • After the time quantum expires, the process moves back to the ready queue.

Advantages:

·         Fair CPU allocation.

·         Good response time.

Disadvantages:

·         Too small time quantum causes more context switching.

·         Too large time quantum behaves like FCFS.

5. Shortest Remaining Time First (SRTF)

  • Preemptive version of SJF.
  • The process with the shortest remaining execution time gets CPU priority.
  • A newly arrived shorter process can interrupt the running process.

Advantages:

·  Faster execution of short processes.

Disadvantages:

  • More context switching.
  • Starvation may occur.

6. Multilevel Queue Scheduling

  • Divides processes into different queues.
  • Each queue has its own scheduling algorithm.
  • Processes are assigned based on priority or type.

 

7. Multilevel Feedback Queue Scheduling

  • Similar to multilevel queue scheduling.
  • Allows processes to move between queues.
  • Provides flexibility in scheduling.
  • Prevents starvation.

Advantages of Process Scheduling

  • Efficient CPU utilization.
  • Supports multitasking.
  • Reduces waiting time.
  • Improves system performance.
  • Provides fair resource allocation.
  • Allows multiple applications to run smoothly.

 

1. DOS (Disk Operating System)

  • DOS is a single-user, single-tasking operating system developed for personal computers.
  • It uses a Command Line Interface (CLI) to interact with users.
  • It manages files, memory, and input/output devices.
  • It requires users to type commands to perform tasks.
  • It was widely used before graphical operating systems became popular.

Types of DOS Commands

DOS commands are mainly divided into two types:

·         Internal Commands

·         External Commands

1. Internal DOS Commands

·         Internal commands are built into the DOS command processor (COMMAND.COM).

·         They are loaded into memory when DOS starts.

·         They do not require separate program files.

·         They are available immediately after starting the system.

·         Common Internal DOS Commands

1. DIR (Directory)

2. CD / CHDIR (Change Directory)

3. MD / MKDIR (Make Directory)

4. RD / RMDIR (Remove Directory)

5. COPY

6. DEL / ERASE

7. REN / RENAME

8. TYPE

9. CLS (Clear Screen)

10. DATE

11. TIME

12. VER (Version)

2. External DOS Commands

  • External commands are stored as separate program files on the disk.
  • They are loaded into memory only when required.
  • They provide advanced system functions.

·         Common External DOS Commands

1. FORMAT

2. CHKDSK (Check Disk)

3. DISKCOPY

4. XCOPY

5. TREE

6. EDIT

7. ATTRIB

8. BACKUP

9. RESTORE

10. FDISK

Features of DOS

·         Uses a Command Line Interface (CLI).

·         Supports single-user operation.

·         Supports single-tasking (one program at a time).

·         Provides file and directory management.

·         Manages disk storage and memory.

·         Requires fewer system resources.

·         Provides basic system commands for managing files.

Advantages of DOS

·         Simple and easy to understand.

·         Requires less memory and processing power.

·         Fast execution for basic tasks.

·         Suitable for older computers.

Disadvantages of DOS

·         No graphical user interface.

·         Supports only one user at a time.

·         Limited multitasking capability.

·         Limited security features.

·         Cannot efficiently handle modern applications.

2. UNIX Operating System

  • UNIX is a powerful multi-user and multi-tasking operating system.
  • It provides a secure and stable environment for servers and workstations.
  • It supports multiple users accessing system resources at the same time.
  • It uses both command-line and graphical interfaces.
  • It is widely used in servers, networking systems, and software development.

Features of UNIX

·         Supports multiple users at the same time.

·         Supports multitasking and multiprocessing.

·         Provides strong security and user permissions.

·         Uses a command-line interface (Shell).

·         Supports networking and communication.

·         Provides a hierarchical file management system.

·         Highly stable and reliable.

·         Portable across different hardware platforms.

Advantages of UNIX

·         Highly secure.

·         Very stable and reliable.

·         Supports multiple users.

·         Efficient resource management.

·         Excellent networking capabilities.

·         Suitable for servers and enterprise systems.

Disadvantages of UNIX

·         Difficult for beginners.

·         Requires knowledge of commands.

·         Limited support for some commercial applications.

·         Installation and administration can be complex.

3. Windows Operating System

  • Windows is a popular graphical user interface (GUI)-based operating system developed for personal computers.
  • It supports multitasking and provides an easy-to-use environment.
  • It manages hardware, software, files, and user applications.
  • It supports networking, multimedia, and security features.
  • It is widely used in desktops, laptops, and business systems.

Features of Windows

·         Provides a graphical user interface (GUI).

·         Supports multitasking.

·         Supports multiple users and user accounts.

·         Provides file and folder management.

·         Supports a wide range of hardware devices.

·         Provides security features such as passwords and permissions.

·         Supports networking and Internet connectivity.

·         Compatible with many software applications.

·         Provides automatic updates and system maintenance tools.

Advantages of Windows

·         Easy to use.

·         Large software and hardware support.

·         User-friendly interface.

·         Good multimedia support.

·         Regular security updates.

·         Suitable for home and business users.

Disadvantages of Windows

·         Requires more hardware resources.

·         More vulnerable to viruses and malware compared to some systems.

·         Licensed versions can be expensive.

·         Frequent updates may affect performance.

·         Less customizable than some open-source systems.

 

Identifying and Managing Security Threats in OS

  • Security threats in an operating system are risks that can damage data, affect system performance, or allow unauthorized access.
  • Identifying and managing these threats helps protect the operating system and user information.

Common Security Threats in Operating Systems

1. Malware

  • Malware (Malicious Software) is software designed to damage, disrupt, or gain unauthorized access to a system.
  • It can steal data, modify files, or slow down system performance.

Types of Malware:

·         Virus: Attaches itself to files and spreads when the file is executed.

·         Worm: Self-replicates and spreads through networks without user action.

·         Trojan Horse: Appears as legitimate software but performs malicious activities.

·         Spyware: Secretly monitors user activities and collects information.

·         Ransomware: Encrypts files and demands payment for recovery.

Management:

·         Install antivirus software.

·         Avoid downloading files from unknown sources.

·         Keep the OS and applications updated.

·         Perform regular malware scans.

2. Unauthorized Access

  • Occurs when an unauthorized person gains access to a computer system.
  • Attackers may steal data or modify system settings.

Causes:

·         Weak passwords.

·         Stolen user credentials.

·         Poor access control.

Management:

·         Use strong passwords.

·         Enable multi-factor authentication (MFA).

·         Apply user access permissions.

·         Disable unused accounts.

3. Password Attacks

  • Attackers attempt to discover user passwords to gain system access.

Types:

·         Brute-force attacks.

·         Dictionary attacks.

·         Password guessing.

Management:

·         Use complex passwords.

·         Change passwords regularly.

·         Enable account lockout after failed attempts.

·         Use password managers.

4. Phishing Attacks

  • Phishing is a social engineering attack where attackers trick users into revealing sensitive information.
  • Usually performed through fake emails, websites, or messages.

Management:

·         Avoid clicking unknown links.

·         Verify email senders.

·         Use email security filters.

·         Educate users about phishing techniques.

5. Denial of Service (DoS) Attack

  • A DoS attack attempts to make a system or service unavailable by overwhelming it with requests.
  • It reduces system performance and prevents legitimate users from accessing services.

Management:

·         Use firewalls.

·         Monitor network traffic.

·         Use intrusion detection systems.

·         Apply security updates.

6. Buffer Overflow Attack

  • Occurs when a program receives more data than it can store in memory.
  • Attackers may use it to execute unauthorized code.

Management:

·         Keep software updated.

·         Use secure programming practices.

·         Enable memory protection features.

7. Rootkits

  • Rootkits are malicious programs that hide their presence while providing attackers with administrator-level access.

Management:

·         Use rootkit detection tools.

·         Perform regular system scans.

·         Keep security software updated.

8. Spyware and Keyloggers

  • Spyware monitors user activities without permission.
  • Keyloggers record keyboard inputs to steal passwords and sensitive information.

Management:

·         Install trusted security software.

·         Avoid suspicious applications.

·         Monitor unusual system behavior.

9. Insider Threats

  • Security risks caused by authorized users within an organization.
  • Users may intentionally or accidentally damage systems.

Management:

·         Apply least privilege access.

·         Monitor user activities.

·         Maintain security policies.

·         Provide security awareness training.

 

Methods for Managing OS Security Threats

1. Authentication

·         Verifies the identity of users before allowing access.

Uses:

·         Passwords

·         Biometrics

·         Smart cards

·         Multi-factor authentication

2. Authorization and Access Control

  • Determines what actions users are allowed to perform.
  • Controls access to files, applications, and system resources.

Uses permissions such as:

Read

Write

Execute

3. Antivirus and Anti-Malware Protection

  • Detects and removes malicious software.
  • Provides real-time system protection.
  • Performs regular security scans.

4. Firewall Protection

  • Monitors incoming and outgoing network traffic.
  • Blocks unauthorized connections.
  • Prevents network-based attacks.

5. Regular Software Updates

  • Updates fix security vulnerabilities.
  • Improves system stability.
  • Protects against newly discovered threats.

6. Data Encryption

  • Converts data into an unreadable format.
  • Prevents unauthorized users from accessing information.
  • Protects stored and transmitted data.

7. Backup and Recovery

  • Creates copies of important data.
  • Helps recover information after attacks or failures.
  • Protects against ransomware and data loss.

8. Security Auditing and Monitoring

  • Regularly checks system activities.
  • Detects suspicious behavior.
  • Maintains security logs.
  • Helps identify attacks early.

Methods to Identify Security Threats

  • Monitoring system activities and unusual behaviour.
  • Using antivirus and anti-malware software.
  • Checking system logs and security alerts.
  • Performing regular security scans and updates.

Methods to Manage Security Threats

  • Install and regularly update antivirus software.
  • Use strong passwords and user authentication.
  • Keep the operating system and applications updated.
  • Enable firewalls and access control.
  • Regularly back up important data.
  • Avoid downloading files from unknown sources.

Post a Comment

0Comments

Post a Comment (0)