0% found this document useful (0 votes)
14 views3 pages

OS

An operating system (OS) is system software that manages hardware resources and provides services for application programs, including process management, memory allocation, and user interfaces. Key functions of an OS include scheduling processes, managing memory and files, controlling devices, and ensuring security. Various OS structures exist, such as monolithic, layered, microkernel, modular, and client-server, with system calls serving as the interface for applications to request OS services.

Uploaded by

silverff073
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)
14 views3 pages

OS

An operating system (OS) is system software that manages hardware resources and provides services for application programs, including process management, memory allocation, and user interfaces. Key functions of an OS include scheduling processes, managing memory and files, controlling devices, and ensuring security. Various OS structures exist, such as monolithic, layered, microkernel, modular, and client-server, with system calls serving as the interface for applications to request OS services.

Uploaded by

silverff073
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
You are on page 1/ 3

OS

1. What is an operating system?


An operating system (OS) is system software that acts as an intermediary between computer
hardware and users. It manages hardware resources (CPU, memory, storage, etc.) and
provides common services for application programs. Key roles include process management,
memory allocation, file system handling, device control, and user interface provision (e.g.,
GUI or CLI). Examples include Windows, Linux, and macOS.

2. Objective and functions of operating system


Objectives:

• Ensure efficient and convenient use of hardware.

• Provide a user-friendly environment.

• Enable system evolution without disruption.

Functions:

• Process Management: Scheduling and terminating processes.

• Memory Management: Allocating/deallocating memory.

• File Management: Organizing and accessing files.

• Device Management: Controlling I/O devices via drivers.

• Security: Protecting data and resources from unauthorized access.

3. Services provided by operating system

• User Interface: CLI, GUI, or batch interfaces.

• Program Execution: Loading and running applications.

• I/O Operations: Managing input/output devices.

• File System Manipulation: Creating, deleting, and modifying files.

• Communication: Inter-process or network communication.

• Error Handling: Detecting and resolving errors.

• Resource Allocation: Distributing CPU time, memory, etc.

4. Explain the terms

1. Process: A program in execution, including its current activity (code, data, stack,
registers).

2. Shell: A command-line interpreter allowing users to interact with the OS (e.g., Bash
in Linux).
OS

3. File: A named collection of data stored on secondary storage (e.g., documents,


binaries).

5. Operating system structures

• Monolithic: All OS components (kernel, drivers) are in a single address space (e.g.,
MS-DOS).

• Layered: Hierarchical layers with defined functions (lower layers handle hardware).

• Microkernel: Minimal kernel with user-space services (e.g., Mach).

• Modular: Kernel modules loaded dynamically (e.g., Linux).

• Client-Server: Services run in user processes; clients request via messages.

6. System call and types


A system call is a programming interface for applications to request OS services. Types
include:

• Process Control: fork(), exit().

• File Management: open(), read().

• Device Management: ioctl(), read().

• Information Maintenance: getpid(), time().

• Communication: pipe(), send().

7. Process
A process is an instance of a running program. It includes the executable code, data, stack,
heap, and process control block (PCB). Processes are isolated and managed by the OS for
multitasking.

8. Five-state process model


States:

1. New: Process is being created.

2. Ready: Process is waiting for CPU.

3. Running: Instructions are executed.

4. Waiting: Process awaits an event (e.g., I/O).

5. Terminated: Process finishes execution.

Transitions:

• New → Ready (Admitted).


OS

• Ready → Running (Scheduled).

• Running → Ready (Interrupted).

• Running → Waiting (I/O request).

• Waiting → Ready (Event occurs).

9. Process Control Block (PCB)


PCB is a data structure containing process-specific information:

• Process State: Current state (e.g., running).

• Program Counter: Address of next instruction.

• Registers: CPU register values.

• PID: Unique process identifier.

• Memory Limits: Address space details.

• Open Files: List of accessed files.

• Scheduling Info: Priority, CPU time.


Essential for context switching and process management.

You might also like