0% found this document useful (0 votes)
27 views9 pages

OS Aasignment 01 Maria

Uploaded by

rehmankhansa9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views9 pages

OS Aasignment 01 Maria

Uploaded by

rehmankhansa9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Operating system

Operating System Structure

Submitted By Maria Zaman


Roll NO 22-Arid-4372
Assignment# “01”
Submitted To Mam Iqra

OCTOBER 22, 2024


HP
Question#01

Explain the main components of an operating system

Including;
 The kernel, process management, memory management, file system management,
device management, and security and protection.
 Discuss the types of kernels and their roles
 How the OS handles process and memory management, the structure and types of file
systems, the interaction with hardware devices, and the mechanisms for ensuring
security and protecting resources.

 Operating System:
An operating system is a critical component that manages hardware and software resources
on a computer, providing an interface between users, applications, and the hardware.

 Main Components of an Operating System:

1. The Kernel:

The kernel is the core part of the OS, managing communication between hardware
and software.

 Example: In Linux, the kernel manages CPU, memory, and peripheral devices like
keyboards and printers.

2. Process Management

The OS handles the creation, scheduling, and termination of processes.

 Example: When you open multiple applications on Windows, the OS manages how
much CPU time each app gets using scheduling algorithms.

3. Memory Management

The OS allocates memory to processes and manages swapping between physical


memory (RAM) and disk.

 Example: When you open many browser tabs, the OS moves inactive tabs to disk
(virtual memory) to free up RAM.

4. File System Management

The OS organizes and controls data storage in files and directories, managing access
and permissions.
 Example: In Linux, the Ext4 file system organizes files into folders, and the OS
ensures only authorized users can access specific files.

5. Device Management

The OS controls hardware devices through device drivers, ensuring smooth


interaction between software and hardware.

 Example: When you plug in a USB drive, the OS detects it and mounts the drive,
allowing you to read/write files.

6. Security and Protection

The OS ensures that unauthorized users or programs cannot access restricted data or
resources.

 Example: On MacOS, password-based authentication ensures that only the authorized


user can change system settings or access sensitive files.

___________________________________________________________________________

 Discuss the types of kernels and their roles:

1. Monolithic Kernel:

The entire OS (including device drivers, file system management, etc.) runs in a
single address space in kernel mode.

Example: Linux Kernel.

2. Microkernel:

Only essential components (e.g., process management, memory management) run


in kernel mode; other services (e.g., device drivers, file systems) run in user space.

Example: Minix, QNX.

3. Hybrid Kernel

Combines aspects of monolithic and microkernel architectures. Non-essential


components (e.g., device drivers) are moved into user space, but some remain in
kernel mode for efficiency.

Example: Windows NT, macOS.


4. Exokernel

Minimizes the kernel by offloading most responsibilities (such as resource


allocation) to user-space libraries, giving more control to applications.

Example: MIT's Exokernel project.

________________________________________________________________

 How the OS handles process and memory management, the structure


and types of file systems, the interaction with hardware devices, and
the mechanisms for ensuring security and protecting resources.

1. Process Management:

The OS manages multiple processes by scheduling them and allocating CPU time.

 Example: In Windows, when you open a web browser and a text editor, the OS uses
process scheduling to give each app time to execute on the CPU without interfering
with the other. It uses algorithms like Round Robin to switch between them.

2. Memory Management:

The OS allocates and deallocates memory to processes and manages virtual memory
when physical RAM runs out.

 Example: If you open multiple tabs in a browser, the OS might use virtual memory
(on disk) to store inactive tabs, freeing up RAM for active ones.

3. File System Structure and Types:

The OS organizes files on storage devices into structures (directories, files) and uses
different file system types to manage data.

 Example: In Windows, the NTFS file system allows you to organize files into
folders, manage permissions, and ensure data integrity through journaling.

 Types of File Systems:

 FAT (File Allocation Table):

Simple and widely supported but lacks advanced features like journaling.

 NTFS (New Technology File System):

Supports metadata, access control lists (ACLs), and file compression.

 Ext (Extended File System):


Common in Linux. Ext4 is the latest version, offering features like journaling
and large file support.

 ZFS (Zettabyte File System):

Known for data integrity, support for large storage pools, and built-in RAID.

4. Hardware Interaction:

The OS uses device drivers to communicate with and control hardware devices.

 Example: When you connect a printer, the OS loads the printer driver so it can send
print jobs from applications like Word or Excel.

5. Security and Protection Mechanisms:

The OS ensures data security through user authentication, access control, and
encryption.

 Example: In macOS, the OS uses FileVault to encrypt the hard drive, ensuring that
only authorized users can access the data. Access control manages which files a user
can read, write, or execute.

___________________________________________________________________________

Question#02

Describe the different types of operating systems

Including:
 Batch, time-sharing, distributed, network, and real-time operating systems.
 Provide examples of each type, explain their key characteristics, and discuss their
typical applications and advantages.

 Different types of operating systems

Operating systems (OS) can be classified based on their capabilities and how they
manage resources and interact with users.

1. Batch Operating Systems


A batch operating system processes batches of jobs without user interaction. Users
submit jobs to the system, which queues them, and the OS processes them one by one.

 Key Characteristics:

 Jobs are collected in batches and processed sequentially.


 There is no direct interaction between the user and the computer during processing.
 Each job is processed completely before moving to the next job.
 Utilizes job control language (JCL) for job scheduling.

Examples:

 IBM’s OS/360
 Hercules (mainframe emulator)

 Applications:

 Used in environments where similar tasks are repeated regularly, such as payroll
systems, banking systems, or data processing centers.

 Advantages:

 Efficient use of system resources.


 Suitable for repetitive tasks requiring minimal user interaction.

 Disadvantages:

 No real-time interaction with the system.


 Long turnaround times for individual jobs since jobs are processed sequentially.

2. Time-Sharing Operating Systems

A time-sharing operating system allows multiple users to interact with the


computer simultaneously by dividing CPU time among multiple tasks. It uses multitasking
to switch between processes so that each user perceives that they have full access to the
system.

 Key Characteristics:

 Multitasking: Allows several programs to run simultaneously.


 Time slices: CPU time is divided into small time slices, allowing multiple users to
share system resources efficiently.
 Users interact with the system in real-time, receiving quick responses.
Examples:

 Unix and Linux


 Multics (Multiplexed Information and Computing Service)

 Applications:

 Used in environments where multiple users need access to a single system, such as
academic or research institutions.
 Supports online systems like transaction processing and data entry.

 Advantages:

 Better resource utilization by sharing the CPU among users.


 Faster response times for users due to time-slicing.

 Disadvantages:

 Context switching overhead as the system frequently switches between processes.


 Less suitable for real-time applications that require precise timing.

3. Distributed Operating Systems

A distributed operating system manages a group of computers connected via a


network, making them function as a single system. Each computer has its own local memory
and processors, but they work together to complete tasks.

 Key Characteristics:

 Distributed computation and resource sharing across multiple machines.


 Appears to users as a single cohesive system, even though the tasks are distributed.
 Provides fault tolerance; if one machine fails, the others can continue.

Examples:

 Google’s MapReduce framework (used in large-scale distributed computing)


 Apache Hadoop (a distributed computing platform)

 Applications:

 Large-scale computing tasks like data processing, scientific simulations, and cloud
computing platforms (e.g., Amazon Web Services, Microsoft Azure).
 Advantages:

 Scalability: Easily add more machines to the system.


 Fault tolerance: Redundancy in systems ensures that failures in one machine do not
disrupt the entire operation.

 Disadvantages:

 Complex system management: More complicated to manage and maintain compared


to centralized systems.
 Network dependency: Performance is limited by network speed and reliability.

4. Network Operating Systems

A network operating system (NOS) allows computers within a network to


communicate and share resources like files, printers, and applications.

 Key Characteristics:

 Provides networking capabilities like file sharing, printer access, and


communication services over a network.
 Users are aware of multiple machines and manage their own files and access
permissions.
 Centralized control of resources.

Examples:

 Microsoft Windows Server


 Novell NetWare
 Unix/Linux (with networking capabilities)

 Applications:

 Ideal for client-server architectures where resources are managed by a central server
but accessed by clients.
 Common in business networks, allowing resource sharing and collaboration.

 Advantages:

 Resource sharing: Centralized control allows efficient use of resources across the
network.
 Improved security: Centralized management of user access and data.
 Disadvantages:

 Network dependency: Network failures can disrupt access to critical resources.


 Administration overhead: Requires experienced administrators to manage network
security and resource allocation.

5. Real-Time Operating Systems (RTOS)

A real-time operating system is designed to process data and respond to inputs


immediately or within a guaranteed timeframe. These systems are critical in applications
where timing is crucial.

 Key Characteristics:

 Deterministic: Ensures responses occur within a strict time frame.


 Two types:

o Hard real-time systems: Guarantees tasks are completed within the required
deadlines (e.g., medical equipment).
o Soft real-time systems: Tasks are prioritized but missing a deadline
occasionally is acceptable (e.g., multimedia streaming).

Examples:

 VxWorks (used in embedded systems)


 QNX (used in automotive systems)
 RTLinux

 Applications:

 Industrial control systems, air traffic control, medical devices, robotics, and
automobile systems e.g. control.

 Advantages:

 Predictability and reliability: Ensures precise and timely responses.


 Efficient resource utilization for time-sensitive tasks.

 Disadvantages:

 Limited multitasking: Prioritizes real-time processes, so non-critical tasks may be


delayed or interrupted.
 Complex programming: Requires detailed knowledge of hardware and system
behavior.

You might also like