0% found this document useful (0 votes)
12 views4 pages

Understanding Operating Systems Functions

Nice notes

Uploaded by

Subham Garain
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
0% found this document useful (0 votes)
12 views4 pages

Understanding Operating Systems Functions

Nice notes

Uploaded by

Subham Garain
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

ESP (OS)

What is an Operating System (OS)?

• An Operating System (OS) is system software that manages hardware and software
resources on a computer.

• It acts as an interface between the user and the computer hardware.

Functions of an Operating System

1. Process Management:

o Manages processes (programs in execution) by scheduling them for CPU time.

o Handles creation, termination, and synchronization of processes.

2. Memory Management:

o Allocates and deallocates memory to processes.

o Uses techniques like paging, segmentation, and virtual memory.

3. File System Management:

o Manages data storage and retrieval in files.

o Ensures efficient storage, retrieval, and protection of data.

4. Device Management:

o Manages input/output devices like printers, keyboards, and hard drives.

o Uses device drivers to communicate with hardware.

5. Security and Access Control:

o Protects data and resources from unauthorized access.

o Implements authentication and permissions.

6. Job Scheduling:

o Determines the order in which processes are executed to maximize CPU utilization.
Types of Operating Systems

1. Batch OS:

o Executes jobs in batches without user interaction.

o Example: Early IBM systems.

2. Time-Sharing OS:

o Provides multiple users access to the system by allocating small time slots.

o Example: UNIX.

3. Distributed OS:

o Distributes computation across multiple machines.

o Example: Google File System (GFS).

4. Real-Time OS:

o Processes tasks within a strict time limit.

o Example: Embedded systems like aircraft controls.

5. Network OS:

o Manages network resources and communication.

o Example: Novell NetWare.

6. Mobile OS:

o Designed for mobile devices.

o Example: Android, iOS.


Key Concepts in Operating Systems

1. Process vs. Thread

• Process:

o An independent program in execution.

o Requires its own memory space.

• Thread:

o A lightweight sub-process.

o Shares the process's memory but can run independently.

2. Process Scheduling

• Determines which process gets to use the CPU.

• Scheduling Types:

o FCFS (First Come First Serve): Executes processes in arrival order.

o SJF (Shortest Job First): Executes the shortest process next.

o Round Robin (RR): Assigns time slices to processes in a cyclic order.

o Priority Scheduling: Executes the process with the highest priority.

3. Deadlocks

• A situation where two or more processes are waiting for resources held by each other, and
none can proceed.

• Deadlock Conditions (Coffman Conditions):

1. Mutual Exclusion: At least one resource is non-shareable.

2. Hold and Wait: A process is holding one resource and waiting for another.

3. No Preemption: Resources cannot be forcibly taken.

4. Circular Wait: Processes are waiting in a circular chain.

• Deadlock Prevention: Remove one of the Coffman conditions.

4. Memory Management

• Paging:

o Divides memory into fixed-size blocks called pages.

o Pages are mapped to physical memory using a page table.

• Segmentation:

o Divides memory into logical segments based on functionality.

o Example: Code segment, data segment, stack segment.


5. Virtual Memory

• Extends the apparent memory capacity using disk storage.

• Allows programs to run even if they exceed the physical memory size.

• Uses techniques like demand paging and page replacement algorithms.

6. File Systems

• A file system organizes and stores files on storage devices.

• Common File System Operations:

o Create, read, write, delete, and update files.

• Directory Structures:

o Single-Level: All files in one directory.

o Two-Level: Each user has their own directory.

o Hierarchical: Tree-like structure.

7. I/O Management

• Manages the communication between hardware devices and the system.

• Implements techniques like spooling (e.g., for printers).

Common questions

Powered by AI

Virtual memory allows operating systems to use disk storage as an extension of physical memory, enabling programs to execute even if they exceed the physical memory limits. This is done using techniques like demand paging and page replacement algorithms, which optimize memory usage and minimize the performance loss from physical memory constraints .

Network operating systems manage and facilitate network communications and resource sharing among computers, focusing on network services. Distributed operating systems manage resources and computation across multiple physical machines, treating them as a single system, and aim to optimize computational tasks distribution .

Process management enhances CPU utilization by scheduling processes efficiently, ensuring that the CPU is always occupied with a task. Techniques such as job scheduling prioritize and manage the order of process execution, allowing the CPU to switch between tasks in a way that minimizes idle time and maximizes throughput .

Authentication and access control are critical as they ensure that only authorized users can access system resources, thus protecting against unauthorized access and potential breaches. They enforce permissions that limit the capabilities of users, thereby securing sensitive data and system operations .

A hierarchical directory structure improves file system efficiency by organizing files in a tree-like format, which makes file retrieval faster and more intuitive. This structure allows for better system organization, easier navigation, and more efficient storage management compared to single or two-level directories .

Real-time operating systems (RTOS) provide predictable response times to critical tasks, which is crucial in applications like aircraft controls where timing precision is essential. However, the limitations include the complexity in designing such systems to ensure they meet strict timing constraints and the potential higher cost compared to non-real-time systems .

Paging divides memory into fixed-size units, allowing for predictable memory access and reducing fragmentation, but can lead to internal fragmentation if page sizes don't match data size. Segmentation divides memory into variable-size units based on logical divisions, reducing overhead from unnecessary fragmentation, but complicates memory management and requires more complex hardware support .

Deadlock conditions can severely affect system reliability as they lead to resource standstills, preventing process completion. The Coffman conditions define the specific scenarios under which deadlocks occur. Prevention strategies include breaking one of these conditions, such as deploying dynamic resource allocation (breaking mutual exclusion) or preemption (interrupting hold and wait).

Batch operating systems execute jobs in batches without user interaction, which can improve throughput but lacks interactivity and responsiveness. Time-sharing OS, on the other hand, allocates small time slots to multiple users, enhancing interactivity and making the system feel responsive at the cost of more complex scheduling and potential inefficiencies due to context switching .

Different scheduling algorithms impact system performance and user experience by influencing how quickly and efficiently processes are executed. For instance, FCFS is simple but can lead to long wait times, SJF minimizes wait time but requires precise process length prediction, Round Robin improves fairness but can result in frequent context switching, and Priority Scheduling requires careful management to avoid starvation. The choice of algorithm should match the system's goals, balancing performance with user experience .

You might also like