0% found this document useful (0 votes)
13 views

OS SAQ

The document outlines key concepts in operating systems, including multi-programming terms, process states, and scheduling types. It discusses process control blocks, deadlock characteristics, and various kernel types, along with their functions and advantages. Additionally, it covers user-level threads, context switching, and the importance of load balancing in multi-processor systems.
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)
13 views

OS SAQ

The document outlines key concepts in operating systems, including multi-programming terms, process states, and scheduling types. It discusses process control blocks, deadlock characteristics, and various kernel types, along with their functions and advantages. Additionally, it covers user-level threads, context switching, and the importance of load balancing in multi-processor systems.
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/ 5

SET 1

a) What are the terms of Multi-programming?

 Job Scheduling, CPU Scheduling, Context Switching, Memory Management, I/O


Management.

b) What is Priority?

 Priority is the importance level of a process to decide execution order.

c) What are the general usages of System Software?

 OS, Utility Software, Device Drivers, Compilers, Firmware.

d) What are the different states of a process?

 New, Ready, Running, Waiting, Terminated.

e) What are the differences and similarities between threads and processes?

Differences:

 Process: Independent, more memory, slow.

 Thread: Part of a process, shares memory, fast.

Similarities:

 Both handle multitasking and have execution states.

f) What is a Process Control Block (PCB)?

 A structure storing process info like ID, state, memory, registers, priority, and I/O details.

g) What is a Lightweight Process (LWP)?

 A thread within a process that shares memory, making execution faster.

h) What is Multi-threading?

 Running multiple tasks (threads) in a program to improve performance.

i) What are the characteristics of Deadlock?

 Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait.

j) How can Deadlocks be prevented?

 Avoid Mutual Exclusion, Prevent Hold and Wait, Allow Preemption, Avoid Circular Wait.

SET 2

a) Give examples of microkernel.

 QNX, MINIX, L4, Mach.

b) Write any three differences between Preemptive and Non-Preemptive Scheduling.


Feature Preemptive Scheduling Non-Preemptive Scheduling

Control OS can interrupt a running process. Process runs until completion or waiting state.

Response Time Faster response, better multitasking. Slower response, suitable for batch processing.

Example Round Robin, Priority Scheduling. FCFS (First Come First Serve), Shortest Job First.

c) Write the disadvantages of multi-processor systems.

1. Expensive hardware and complex design.

2. Requires a complex OS for task management.

3. Higher chances of system failures due to dependency.

d) How many layers are present in a layered structure OS?

 Typically, 6 to 8 layers, including Hardware, Kernel, Memory Management, Device


Management, File System, User Interface, etc.

e) Define Process Scheduling.

 It is the mechanism used by the OS to decide which process runs next, ensuring efficient CPU
usage.

g) List out the usage of context switching.

1. Allows multitasking by switching between processes.

2. Saves the current process state for later resumption.

3. Enables efficient CPU utilization.

h) What is meant by a user-level thread?

 A thread managed by the application without OS intervention, making it faster but less
powerful than kernel threads.

i) What is Deadlock?

 A situation where two or more processes are stuck waiting for resources held by each other,
preventing execution.

j) Explain the terms:

a) Time Sharing – A system where multiple users share CPU time, giving an illusion of simultaneous
execution. Example: Cloud computing.

b) Mutual Exclusion – A principle ensuring that only one process accesses a shared resource at a
time to prevent conflicts. Example: Locking a file while editing.

SET 3

a) What is an Operating System? Give the view of OS as a Resource Manager.


 An Operating System (OS) is system software that manages hardware and software
resources while providing services to applications.

OS as a Resource Manager:

 It allocates CPU, memory, storage, and I/O devices efficiently among different users and
processes.

b) Explain Process Control Block (PCB).

 A PCB is a data structure that contains important information about a process, including:

1. Process ID

2. Process State (Ready, Running, Waiting)

3. CPU Registers

4. Memory Allocation

5. Priority Level

c) Define Microkernel.

 A Microkernel is a small core part of the OS that handles essential functions like process
management and communication, while other services run in user space.

d) Describe Multiple-Processor Scheduling.

 Multiple-Processor Scheduling is the method used to allocate tasks to multiple CPUs in a


system.

o Types:

1. Asymmetric Scheduling – One processor manages scheduling, others


execute tasks.

2. Symmetric Scheduling – Each processor handles its own scheduling.

e) What is the purpose of CPU Scheduling?

 CPU Scheduling ensures efficient CPU usage by selecting which process runs next, improving
multitasking and response time.

g) What do you mean by Load Balance?

 Load Balancing is the process of distributing tasks evenly across multiple processors to avoid
overload and improve performance.

h) Write the Dispatcher Functions.

 The Dispatcher is responsible for:

1. Context Switching – Saves and loads process states.

2. Switching to User Mode – Changes mode from kernel to user.

3. Jumping to Process Execution – Starts the selected process.


i) What are the types of Vertex and Edges in RAG?

 RAG (Resource Allocation Graph) represents resource allocation in a system.

o Vertex Types:

1. Process Vertex (Circle) – Represents a process.

2. Resource Vertex (Square/Rectangle) – Represents a resource.

o Edge Types:

1. Request Edge (Arrow from process to resource) – Process requesting a


resource.

2. Assignment Edge (Arrow from resource to process) – Resource assigned to a


process.

j) Define Starvation.

 Starvation happens when a process waits indefinitely because higher-priority tasks keep
getting scheduled before it. Example: A low-priority process never getting CPU time in
Priority Scheduling.

SET 4

a) Briefly explain different kinds of services provided by OS?

1. Process Management – Handles process execution and scheduling.

2. Memory Management – Manages RAM allocation.

3. File System Management – Controls file creation, deletion, and access.

4. I/O Management – Manages input and output devices.

5. Security & Protection – Ensures data and process security.

6. Error Handling – Detects and handles system errors.

7. User Interface – Provides CLI (Command Line) or GUI (Graphical User Interface).

b) What is Kernel? Explain types of Kernel.

 Kernel is the core part of an OS that manages system resources and communication between
hardware and software.

Types of Kernel:

1. Monolithic Kernel – All OS functions run in a single layer (e.g., Linux).

2. Microkernel – Minimal core, with extra services running in user space (e.g., MINIX).

3. Hybrid Kernel – Combination of monolithic and microkernel (e.g., Windows).

4. Exo-Kernel – Provides direct hardware access with minimal OS intervention.

c) Write an advantage of modular structure OS.


 Advantage: A modular OS is easier to update, debug, and maintain, as different system
components can be modified independently.

d) Write the full form of GUI.

 GUI – Graphical User Interface.

f) Difference between Process and Thread.

Feature Process Thread

Definition An independent program in execution. A lightweight part of a process.

Memory Usage Uses more memory. Shares memory with other threads.

Communication Needs IPC (Inter-Process Communication). Shares data easily within the process.

Speed Slower due to context switching. Faster as threads share memory.

g) Write about Process Creation and Process Termination.

 Process Creation: A new process is created using fork() (in UNIX) or system calls like
CreateProcess() (Windows). It goes through states: New → Ready → Running.

 Process Termination: A process ends when it completes execution, fails, or is forcefully


stopped by the OS.

h) What is Homogeneous?

 Homogeneous means identical or similar in nature. In computing, it refers to systems with


identical processors or architecture (e.g., a homogeneous multi-processor system).

i) Write any two characteristics of Deadlock.

1. Hold and Wait – A process holding one resource waits for another.

2. Circular Wait – A cycle exists where each process waits for a resource held by another.

j) What do you mean by Circular-Wait?

 Circular-Wait is a deadlock condition where processes form a circular chain, each waiting for
a resource held by the next process in the cycle.

You might also like