0% found this document useful (0 votes)
2 views5 pages

Os 2M

The document provides an overview of operating systems, detailing their functions, components, and types of system calls. It covers processes, threads, CPU scheduling, synchronization, deadlocks, memory management, and file systems, explaining key concepts like semaphores, paging, and file sharing. Additionally, it discusses protection mechanisms and the importance of efficient resource management in operating systems.

Uploaded by

ssmbssaa
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)
2 views5 pages

Os 2M

The document provides an overview of operating systems, detailing their functions, components, and types of system calls. It covers processes, threads, CPU scheduling, synchronization, deadlocks, memory management, and file systems, explaining key concepts like semaphores, paging, and file sharing. Additionally, it discusses protection mechanisms and the importance of efficient resource management in operating systems.

Uploaded by

ssmbssaa
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/ 5

UNIT – I: Opera ng Systems Overview & System Structures

1. What is an opera ng system?


An opera ng system (OS) is system so ware that manages hardware and so ware resources.
It provides an interface between the user and the computer hardware.
It enables applica on programs to run effec vely.

2. List any two func ons of an OS.


An OS manages the CPU, memory, I/O devices, and files.
It ensures efficient execu on of user and system processes.
Two major func ons are memory management and process scheduling.

3. What is a system call?


A system call is a request made by a program to the OS for a service.
It provides the interface between a running process and the OS.
Examples include file handling and process crea on.

4. Men on any two types of system calls.


System calls can be categorized into file manipula on and device management.
File manipula on includes open, read, write, and close.
Device management includes requests for device access and release.

5. What is a kernel?
The kernel is the core part of the opera ng system.
It directly interacts with hardware and manages system resources.
It handles memory, processes, and device control.

6. What is the purpose of the bootstrap program?


It runs when the computer is powered on or restarted.
The bootstrap program loads the OS into main memory.
It ini alizes the system and prepares it for use.

7. Define open-source OS with an example.


An open-source OS allows users to view and modify its source code.
It promotes transparency, community development, and customiza on.
Example: Linux is a popular open-source opera ng system.

8. What is the user interface in an OS?


It allows users to interact with the computer system.
User interfaces may be CLI (e.g., shell) or GUI (e.g., Windows desktop).
They provide access to applica ons, files, and system func ons.

9. Name any two compu ng environments.


Client-server and peer-to-peer are two common compu ng environments.
Client-server involves a central server serving mul ple clients.
Peer-to-peer allows each device to act as both client and server.

10. What is the difference between system calls and system programs?
System calls are low-level func ons invoked by user processes to interact with the OS.
System programs are high-level u li es for performing OS-related tasks.
System programs may use system calls internally.
UNIT – II: Processes, Threads & CPU Scheduling

1. Define a process.
A process is an instance of a program in execu on.
It consists of program code, data, and the execu on context.
The OS uses the process to manage execu on of applica ons.

2. What is a Process Control Block (PCB)?


A PCB is a data structure used by the OS to store informa on about a process.
It includes process ID, state, program counter, registers, and scheduling info.
The OS uses the PCB to manage and control processes.

3. Name two process states.


Two common process states are Ready and Wai ng.
In Ready state, the process is wai ng for CPU alloca on.
In Wai ng state, it is wai ng for some event (e.g., I/O) to occur.

4. What is Inter-Process Communica on (IPC)?


IPC allows processes to communicate and synchronize their ac ons.
It can be implemented using message passing or shared memory.
IPC is essen al in mul -process systems to avoid data inconsistency.

5. What is a thread?
A thread is the smallest sequence of programmed instruc ons.
It is a lightweight process that shares memory and resources with other threads.
Threads enable parallel execu on within a process.

6. Define mul threading.


Mul threading is the ability of a CPU to execute mul ple threads concurrently.
It improves applica on performance and resource u liza on.
Threads in the same process share code, data, and resources.

7. Name any two mul threading models.


Two common models are Many-to-One and One-to-One.
In Many-to-One, many user threads map to one kernel thread.
In One-to-One, each user thread maps to a separate kernel thread.

8. List two CPU scheduling algorithms.


Two widely used scheduling algorithms are FCFS (First-Come First-Serve) and Round Robin.
FCFS schedules processes in order of arrival.
Round Robin assigns me slices to each process in a cyclic manner.

9. Define context switch.


A context switch is the process of storing and restoring the state of a CPU.
It allows mul ple processes to share a single CPU efficiently.
Context switching introduces overhead but enables mul tasking.

10. What is the me quantum in Round Robin scheduling?


Time quantum is a fixed me period assigned to each process.
If a process doesn't complete within its quantum, it's preempted.
This ensures fair CPU me distribu on among processes.
UNIT – III: Synchroniza on & Deadlocks

1. What is mutual exclusion?


Mutual exclusion ensures that only one process accesses a cri cal sec on at a me.
It prevents race condi ons when mul ple processes access shared resources.
This is crucial for data consistency and system stability.

2. Define semaphore.
A semaphore is a synchroniza on tool used to control access to shared resources.
It is an integer variable that supports atomic opera ons like wait() and signal().
Semaphores help solve cri cal sec on problems and prevent race condi ons.

3. What is the cri cal sec on problem?


The cri cal sec on problem involves managing access to shared resources.
It requires ensuring mutual exclusion, progress, and bounded wai ng.
Proper handling avoids conflicts and inconsistent data.

4. What is Peterson’s solu on?


Peterson’s solu on is a so ware algorithm to achieve mutual exclusion between two
processes.
It uses two flags and a turn variable to control access.
It guarantees no two processes are in the cri cal sec on simultaneously.

5. Name two classical synchroniza on problems.


The Producer-Consumer and Dining Philosophers problems are classical examples.
They illustrate synchroniza on challenges in concurrent process execu on.
Solving these requires proper coordina on to avoid deadlocks and starva on.

6. List the four necessary condi ons for deadlock.


The condi ons are mutual exclusion, hold and wait, no preemp on, and circular wait.
All must hold simultaneously for a deadlock to occur.
Breaking any one condi on can prevent deadlocks.

7. What is deadlock detec on?


Deadlock detec on iden fies if a deadlock has occurred in the system.
It involves examining resource alloca on and process states.
Detec on algorithms help the OS take correc ve ac ons.

8. Define deadlock preven on.


Deadlock preven on ensures the system never enters a deadlock state.
It works by nega ng one of the four necessary condi ons.
For example, disallowing hold and wait or allowing preemp on.

9. What is deadlock avoidance?


Deadlock avoidance dynamically checks resource alloca on to prevent unsafe states.
The Banker’s algorithm is a famous avoidance technique.
It grants resources only if it keeps the system in a safe state.

10. What is recovery from deadlock?


Recovery involves ac ons taken a er detec ng a deadlock.
Methods include termina ng one or more processes or preemp ng resources.
Recovery ensures the system returns to normal opera on.
UNIT – IV: Memory & Storage Management

1. What is paging?
Paging divides physical memory into fixed-size blocks called frames.
Logical memory is divided into pages of the same size.
It eliminates external fragmenta on and simplifies memory management.

2. Define virtual memory.


Virtual memory allows execu on of processes larger than physical memory.
It uses disk space to extend RAM, enabling more programs to run concurrently.
It improves system performance and resource u liza on.

3. What is demand paging?


Demand paging loads pages into memory only when they are needed.
It reduces memory usage by loading pages on-demand.
Pages not in use remain on secondary storage un l required.

4. What is copy-on-write?
Copy-on-write allows mul ple processes to share the same page ini ally.
When a process modifies the page, a separate copy is created for it.
This technique saves memory and improves efficiency.

5. Name two page replacement algorithms.


Two common algorithms are Least Recently Used (LRU) and First-In-First-Out (FIFO).
LRU replaces the page that has not been used for the longest me.
FIFO removes the oldest loaded page from memory.

6. What is thrashing?
Thrashing occurs when excessive paging slows down system performance.
It happens when processes spend more me swapping pages than execu ng.
Thrashing leads to severe CPU u liza on drop and system inefficiency.

7. Define a frame in memory management.


A frame is a fixed-size block of physical memory in which pages are loaded.
Physical memory is divided into frames equal in size to pages.
Frames allow non-con guous alloca on of memory to processes.

8. What is the purpose of the page table?


The page table maps virtual page numbers to physical frame numbers.
It keeps track of the loca on of each page in physical memory.
It is essen al for address transla on during process execu on.

9. What is con guous memory alloca on?


Con guous alloca on assigns a single con nuous block of memory to a process.
It is simple but can cause external fragmenta on over me.
Suitable for systems with fixed par oning schemes.

10. Name any two disk scheduling algorithms.


Two disk scheduling algorithms are Shortest Seek Time First (SSTF) and SCAN.
SSTF selects the request closest to the current head posi on.
SCAN moves the disk arm in one direc on servicing requests un l it reaches the end.
UNIT – V: File System & Protec on

1. Define a file.
A file is a named collec on of related informa on stored on secondary storage.
It can contain data, programs, or metadata.
Files provide a way to organize and manage data persistently.

2. List any two access methods for files.


Two access methods are sequen al and direct access.
Sequen al access reads data in order from beginning to end.
Direct access allows reading or wri ng data at any loca on in the file.

3. What is a directory structure?


A directory structure organizes files in a hierarchical or flat manner.
It helps in managing files efficiently on storage devices.
Common structures include single-level, two-level, and tree-structured directories.

4. What is file moun ng?


File moun ng makes a file system accessible by a aching it to a directory.
It integrates the file system into the overall directory hierarchy.
Moun ng allows users to access files transparently.

5. Define alloca on method in file systems.


Alloca on method decides how disk space is assigned to files.
Common methods include con guous, linked, and indexed alloca on.
It affects file access speed and space u liza on.

6. What is the access matrix in protec on?


An access matrix defines the rights each subject has over objects.
Rows represent subjects and columns represent objects.
It models and enforces security policies in opera ng systems.

7. What is a domain of protec on?


A domain is a set of access rights assigned to processes or users.
It defines what resources can be accessed and what opera ons are allowed.
Domains help enforce security by isola ng permissions.

8. List two goals of protec on in OS.


Protec on aims to prevent unauthorized access and safeguard resources.
It ensures data confiden ality, integrity, and availability.
It also protects system components from accidental or malicious harm.

9. What is free space management?


Free space management keeps track of unused disk blocks.
It enables efficient alloca on and reclama on of storage space.
Techniques include bit vectors, linked lists, and grouping.

10. What is file sharing?


File sharing allows mul ple users or processes to access the same file.
It facilitates collabora on and resource u liza on.
Proper protec on mechanisms prevent unauthorized access during sharing.

You might also like