0% found this document useful (0 votes)
10 views12 pages

Impartant IA1 Questions

The document outlines various concepts related to operating systems, including differences between batch and time-sharing systems, the nature of interrupts and traps, disadvantages of multiprocessor systems, and CPU scheduling decisions. It also defines key terms such as threads, cache memory, process control blocks, and system calls, while discussing multiprogramming and thread programming. Additionally, it covers CPU scheduling algorithms and their performance metrics, as well as the structure and components of operating systems.

Uploaded by

xaxinfos
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)
10 views12 pages

Impartant IA1 Questions

The document outlines various concepts related to operating systems, including differences between batch and time-sharing systems, the nature of interrupts and traps, disadvantages of multiprocessor systems, and CPU scheduling decisions. It also defines key terms such as threads, cache memory, process control blocks, and system calls, while discussing multiprogramming and thread programming. Additionally, it covers CPU scheduling algorithms and their performance metrics, as well as the structure and components of operating systems.

Uploaded by

xaxinfos
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/ 12

PART - A (5*2=10 Marks)

Write the Difference Between Batch systems and Time sharing systems . (2)
Execution Mode:
Batch Systems
Time-Sharing Systems
User Interaction
Batch Systems
1 Time-Sharing Systems
Resource Allocation
Batch Systems
Time-Sharing Systems
Response Time:
Batch Systems
Time-Sharing Systems
How does an Interrupt differ from a Trap? (2)
Interrupt: and Trap (Exception):
Origin
2 Purpose
Triggering
Handling
Priority
What are the disadvantages of Multiprocessor System? (2)
Complexity
Scalability Challenges
Programming Complexity
3
Increased Hardware Costs
Contention and Bottlenecks
Increased Power Consumption and Heat Dissipation.
Software Compatibility and Portability
Under What circumstances CPU scheduling decision takes place? (2)
Process Creation
Process Termination
Process Blocking
4 Process Preemption
Interrupt Handling
Time Quantum Expiration
Processor Affinity
System Load Changes:
Define thread? (2)
Threads are lightweight compared to processes because they share resources with other threads within
the same process. Creating, switching, and terminating threads typically require less overhead than processes,
making threads a more efficient mechanism for multitasking.
Execution Unit.
5
Lightweight: Concurrent Execution
Shared Resources
Scheduling
User-Level Threads vs. Kernel-Level Threads
Thread States:

List the Four Main Elements of a Computer? (2)


1.
Central Processing Unit (CPU), Memory (RAM), Storage, Input and Output (I/O) Devices .
What is an Interrupt? (2)
2. The CPU temporarily stops executing the current program, saves its state (i.e., the current values of registers and
program counter), and jumps to an interrupt handler routine.
Define Cache Memory? (2)
Cache memory is a small, high-speed memory component located within or very close to the CPU (central
3
processing unit) in a computer system. Its purpose is to store frequently accessed data and instructions to
expedite the retrieval process.
Define Process? (2)
4 Program Code
Program Counter (PC)
Stack
Data Section
Heap
Resources
What is process control block? List out the data field associated with PCB. (2)
Process ID (PID
Program Counter (PC).
Stack Pointer (SP)
Base and Limit Registers.
Registers
Priority
State
Parent Process ID (PPID
List Pointers
CPU Usage Information
Memory Management Information.
File Descriptors

Define System call? (2)


System calls are typically invoked by user-level programs using high-level programming language
1
constructs (e.g., function calls) provided by the operating system's application programming interface
(API).
What is Multiprogramming? (2)
The operating system manages the execution of multiple programs by rapidly switching between them,
2 allowing each program to make progress. This switching is achieved through a technique called process
scheduling, where the CPU allocates a slice of time (time slice or quantum) to each program before
switching to another program.
List out the Thread Programming? (2)
Thread Creation.
Thread Synchronization.
Thread Communication.
3 Thread Lifecycle Management.
5
Thread Scheduling.
Thread Pooling.
Thread Safety.
Parallelism and Concurrency.
What are the various scheduling criteria for CPU scheduling? (2)
CPU Utilization.
Throughput
Turnaround Time.
Waiting Time
4
Response Time
Fairness
Predictability.
Priority
Pre-emption Resource Utilization
What are the difference between user level threads and kernel level threads? (2)
1. Level of Abstraction:
 User-Level Threads
 Kernel-Level Threads
2. Efficiency:
 User-Level Threads
 Kernel-Level Threads.
5
3. Concurrency and Parallelism:
 User-Level Threads
 Kernel-Level Threads
4. Portability:
 User-Level Threads
 Kernel-Level Threads.
5. Synchronization and Communication
PART-B (3*12=36 Marks)
Explain about Operating System structure and Components? (6*2=12)
Kernel.
Device Drivers
File System
Process Management
6. a.
Memory Management
Input/Output (I/O) Management
User Interface
Networking
Security
(OR)
Discuss Multiprocessor System in details? (6+6)
Types of Multiprocessor Systems:
o Symmetric Multiprocessing (SMP.
o Asymmetric Multiprocessing (AMP)
Hardware Architecture
b. Interconnection Networks:
Operating System Support:
Parallel Programming Models:
Scalability and Performance:
Applications and Use Cases:

Explain the various types of System calls with an example for each? (3*4=12)
Process Control System Calls:
File Management System Calls:
Device Management System Calls:
Examples:
o read(), write()
o example, read()
7. a
o ioctl
Communication System Calls
Examples:
o pipe():socket():
Memory Management System Calls:
Examples:
o brk(), sbrk(),mmap
(OR)
Discuss about the functionality of system boot with respect to operating system. (6*2=12)
Power-On Self-Test (POST):
Initialization of Basic Input/Output System (BIOS) or Unified Extensible Firmware Interface (UEFI):
Bootloader Execution:
b.
Operating System Initialization:
User Interface Initialization
User Login or Application Startup:

Explain the FCFS, preemptive and non-preemptive versions of Shortest-Job First and Round Robin (time
slice = 2) scheduling algorithms with Gantt charts for the four Processes given. Compare their average
turnaround and waiting time. (4*3=12)
Process Arrival Time Waiting Time
P1 0 8
P2 1 4
P3 2 9
8. a.
P4 3 5
ANS:
1. FCFS (First-Come, First-Served):
| P1 | P2 | P3 | P4 |
0 8 12 21 26
2.Average Turnaround Time:
(Turnaround Time of P1 + Turnaround Time of P2 + Turnaround Time of P3 + Turnaround Time of P4) / 4
= ((8 + 8) + (12 + 4) + (21 + 9) + (26 + 5)) / 4
= (16 + 16 + 30 + 31) / 4
= 23.25
Average Waiting Time:
(Waiting Time of P1 + Waiting Time of P2 + Waiting Time of P3 + Waiting Time of P4) / 4
= (8 + 4 + 9 + 5) / 4
= 6.5
Preemptive SJF (Shortest-Job First)
Gantt Chart:
| P1 | P2 | P4 | P3 |
0 8 9 14 23
Average Turnaround Time:
(Turnaround Time of P1 + Turnaround Time of P2 + Turnaround Time of P3 + Turnaround Time of P4) / 4
= ((8 + 8) + (9 + 4) + (23 + 9) + (14 + 5)) / 4
= (16 + 13 + 32 + 19) / 4
= 20
Average Waiting Time
(Waiting Time of P1 + Waiting Time of P2 + Waiting Time of P3 + Waiting Time of P4) / 4
= (8 + 4 + 9 + 5) / 4
= 6.5
Non-Preemptive SJF (Shortest-Job First)
Gantt Chart:
| P1 | P2 | P4 | P3 |
0 8 9 14 23
Average Turnaround Time
(Turnaround Time of P1 + Turnaround Time of P2 + Turnaround Time of P3 + Turnaround Time of P4) / 4
= ((8 + 8) + (9 + 4) + (23 + 9) + (14 + 5)) / 4
= (16 + 13 + 32 + 19) / 4
= 20
Average Waiting Time:
(Waiting Time of P1 + Waiting Time of P2 + Waiting Time of P3 + Waiting Time of P4) / 4
= (8 + 4 + 9 + 5) / 4
= 6.5
Round Robin (Time Slice = 2)
Gantt Chart:
| P1 | P2 | P3 | P4 | P1 | P3 | P1 | P3 | P3 |
0 2 4 6 8 10 12 14 16 18
Average Turnaround Time:
(Turnaround Time of P1 + Turnaround Time of P2 + Turnaround Time of P3 + Turnaround Time of P4) / 4
= ((8 + 8) + (4 + 4) + (18 + 9) + (12 + 5)) / 4
= (16 + 8 + 27 + 17) / 4
= 17
Average Waiting Time:
(Waiting Time of P1 + Waiting Time of P2 + Waiting Time of P3 + Waiting Time of P4) / 4
= (6 + 2 + 9 + 3) / 4
=5
Comparison:
FCFS Scheduling:
Gantt chart: P1 -> P2 -> P3 -> P4
Average Turnaround Time = (8 + 12 + 21 + 26) / 4 = 16.75
Average Waiting Time = (0 + 8 + 12 + 21) / 4 = 10.25
Non-preemptive SJF Scheduling:
Gantt chart: P1 -> P2 -> P4 -> P3
Average Turnaround Time = (8 + 12 + 17 + 26) / 4 = 15.75
Average Waiting Time = (0 + 8 + 12 + 17) / 4 = 9.25
Preemptive SJF Scheduling:
Gantt chart: P1 -> P2 -> P4 -> P3
Average Turnaround Time = (8 + 12 + 17 + 26) / 4 = 15.75
Average Waiting Time = (0 + 8 + 12 + 17) / 4 = 9.25
Round Robin Scheduling:
Gantt chart: P1 -> P2 -> P3 -> P4 -> P1 -> P3 -> P2 -> P4 -> P3 -> P1
Average Turnaround Time = (16 + 12 + 26 + 22) / 4 = 19
Average Waiting Time = (8 + 4 + 16 + 12) / 4 = 10
Comparing the average turnaround and waiting times:
FCFS: Turnaround = 16.75, Waiting = 10.25
Non-preemptive SJF: Turnaround = 15.75, Waiting = 9.25
Preemptive SJF: Turnaround = 15.75, Waiting = 9.25
Round Robin: Turnaround = 19, Waiting = 10
(OR)
Consider the following set of processes, with the length of the CPU – burst time given in Milliseconds:
Process Burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are arrived in the order P1, P2, P3, P4, P5, all at time 0.
1. Draw 4 Gantt charts illustrating the execution of these processes using FCFS, SJF
Priority and RR (Time Slice = 1) scheduling
2. What is the turnaround time of each process for each of the scheduling?
3. Calculate the waiting time for each of the process (4*3=12)
Ans:
FCFS (First-Come, First-Served) Scheduling:
|P1|P2|P3|P4|P5|
SJF Priority Scheduling:
|P2|P5|P3|P1|P4|
Round Robin (RR) Scheduling (Time Slice = 1):
|P1|P2|P3|P4|P5|P1|P3|P5|P1|

calculate the turnaround time and waiting time for each process:
FCFS Scheduling:
Turnaround time:
P1: 10
P2: 11
P3: 13
P4: 14
b P5: 19
Waiting time:
P1: 0
P2: 10
P3: 11
P4: 13
P5: 14
SJF Priority Scheduling:
Turnaround time:
P1: 25
P2: 2
P3: 15
P4: 16
P5: 7
Waiting time:
P1: 15
P2: 0
P3: 13
P4: 14
P5: 2
Round Robin (RR) Scheduling (Time Slice = 1):
Turnaround time:
P1: 22
P2: 2
P3: 16
P4: 17
P5: 12
Waiting time:
P1: 12
P2: 0
P3: 14
P4: 15
P5: 7
PART-C (1*14=14 Marks)
Describe three general methods for passing parameters to the operating system with example? (3+3+8=14)
Ans:
1. Command-line arguments
Ex: $ ./my_program arg1 arg2 arg3
2. Environment variables
Ex: $ export MY_VARIABLE=value
3. System calls
Ex: #include <unistd.h>
#include <fcntl.h>
9 a
int main() {
const char *file_path = "/path/to/file";
int file_descriptor = open(file_path, O_RDONLY);
if (file_descriptor == -1) {
// Handle error
}
// File opened successfully, continue processing...
close(file_descriptor);
return 0;
}
(OR)
Sketch the structure of Direct Memory Access in details? (7*2=14)
Ans:
DMA Controller
DMA Channels
DMA Registers
b
Bus Arbitration
Interrupt Handling
DMA Buffering
Memory Access Control
Programming Interface
PART-B (3*12=36 Marks)
Discuss the different multiprocessor organizations with block diagrams? (4+4+4)
Symmetric Multiprocessing (SMP)
6. a. Non-Uniform Memory Access (NUMA)
Clustered Multiprocessing:

(OR)
Explain important and need of cache with its working principle? (6+6)

Importance of Cache
Speed:
Performance:
b.
Efficiency
Cost-effectiveness
Working Principle of Cache:
Temporal Locality
Spatial Locality
Explain system calls, system programs and OS generation? (4+4+4)
System Calls
open()
read() and write()
fork() and exec()
exit():
ioctl():

System Programs
File Management Programs
Process Management Programs
7. a
Device Management Programs
Networking Programs
System Administration Programs
OS Generation
Requirements Analysis
Design.
Implementation
Testing
Deployment
Maintenance
(OR)
State and explain the major activities of an operating system with regard to file management?(6*2=12)
Ans:
File Creation
File Opening and Closing
File Reading and Writing
File Seeking
b.
File Attribute Manipulation
Directory Management
File System Navigation
File System Security
File System Maintenance
File System Backup and Recovery
Write detail about several CPU scheduling algorithms. (6*2=12)
Ans:
First Come, First Served (FCFS):
o Principle
8. a. o Advantages.
o Disadvantages
Shortest Job Next (SJN) or Shortest Job First (SJF):
o Principle
o Advantages
o Disadvantages
Priority Scheduling
o Principle
o Advantages
o Disadvantages
Round Robin (RR):
o PrincipleAdvantages
o Disadvantages
Multilevel Queue Scheduling:
o Principle
o Advantages
o Disadvantages
Multilevel Feedback Queue Scheduling:
o Principle
o Advantages
o Disadvantages
(OR)
Consider the following set of processes, with the length of the CPU – burst time given in Milliseconds:
Process Burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are arrived in the order P1, P2, P3, P4, P5, all at time 0.
1. Draw 4 Gantt charts illustrating the execution of these processes using FCFS, SJF
Priority and RR (Time Slice = 1) scheduling
2. What is the turnaround time of each process for each of the scheduling?
3. Calculate the waiting time for each of the process (4*3= 2)

Ans:
FCFS (First-Come, First-Served) Scheduling:
|P1|P2|P3|P4|P5|
SJF Priority Scheduling:
|P2|P5|P3|P1|P4|
Round Robin (RR) Scheduling (Time Slice = 1):
|P1|P2|P3|P4|P5|P1|P3|P5|P1|

calculate the turnaround time and waiting time for each process:
b. FCFS Scheduling:
Turnaround time:
P1: 10
P2: 11
P3: 13
P4: 14
P5: 19
Waiting time:
P1: 0
P2: 10
P3: 11
P4: 13
P5: 14
SJF Priority Scheduling:
Turnaround time:
P1: 25
P2: 2
P3: 15
P4: 16
P5: 7
Waiting time:
P1: 15
P2: 0
P3: 13
P4: 14
P5: 2
Round Robin (RR) Scheduling (Time Slice = 1):
Turnaround time:
P1: 22
P2: 2
P3: 16
P4: 17
P5: 12
Waiting time:
P1: 12
P2: 0
P3: 14
P4: 15
P5: 7

PART-C (1*14=14 Marks)


Describe a Mechanism for enforcing memory protection in order to prevent a program from modifying the
memory associated with other programs? (4+4+6)
Ans:

Mechanism for Enforcing Memory Protection


Virtual Memory
Memory Protection Bits
 Read/Write (RW)
9. a.
 Execute (X)
 User/Kernel (U/S
Hardware Support
Exception Handling
Example Scenario
Process A and Process B
Memory Protection
Accessing Memory
(OR)
What are the advantages and disadvantages of using the same system call interface for manipulating both
files and devices? (7+7)
Ans:

Advantages:
Uniformity and Simplicity
Consistency
b
Flexibility
Abstraction
Disadvantages:
Lack of Specialization
Performance Overhead
Complexity in Implementation
Security Concerns
PART-B (3*12=36 Marks)
Describe evolution of operating system? (6*2=12)
Batch Processing Systems (1950s-1960s):
Time-Sharing Systems (1960s-1970s):
6. a. Personal Computing Era (1980s-1990s):
Client-Server Computing (1990s-2000s):
Distributed and Cloud Computing (2000s-Present):
Mobile Computing and IoT (2010s-Present):
(OR)
Explain Cache memory and its mapping? (6+6)
Functionality of Cache Memory:
Temporal Locality
Spatial Locality
Cache Mapping Techniques:
Direct Mapping:
b.
Set-Associative Mapping:
Fully Associative Mapping:
Cache Memory Operation:
Cache Hit
Cache Miss:

Explain the concept of multiprocessor and Multicore organizations? (4+4+4)


Multiprocessor Organization:
Multiple Processing Units
Interconnection Network
Symmetric Multiprocessing (SMP)
Distributed Memory Systems
Multicore Organization:
7. a Single Processor with Multiple Cores
Shared Resources
Simultaneous Multithreading (SMT)
Chip-Level Parallelism.
Comparison:
Scalability
Communication Overhead
Flexibility
(OR)
What are the advantages and disadvantages of using the same system call interface for manipulating both
files and devices? (6+6)
Unified Interface
b. Consistency
Flexibility
Abstraction
Disadvantages:
Complexity
Performance Overhead
Limited Functionality
Security Risks
Write detail about several CPU scheduling algorithms With examples? (6*2=12)
First-Come, First-Served (FCFS)
Shortest Job Next (SJN) or Shortest Job First (SJF)
Shortest Remaining Time (SRT) or Pre-emptive Shortest Job First
8. a.
Round Robin (RR)
Priority Scheduling
Multilevel Queue Scheduling
Multilevel Feedback Queue Scheduling
(OR)
Explain the FCFS, preemptive and non-preemptive versions of Shortest-Job First and Round Robin (time
slice = 2) scheduling algorithms with Gantt charts for the four Processes given. Compare their average
turnaround and waiting time. (4*3=12)
Process Arrival Time Waiting Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
Ans:
1. FCFS Scheduling:
 Gantt chart: P1 -> P2 -> P3 -> P4
 Average Turnaround Time = (8 + 12 + 21 + 26) / 4 = 16.75
 Average Waiting Time = (0 + 8 + 12 + 21) / 4 = 10.25
2. Non-preemptive SJF Scheduling:
 Gantt chart: P1 -> P2 -> P4 -> P3
 Average Turnaround Time = (8 + 12 + 17 + 26) / 4 = 15.75
b.  Average Waiting Time = (0 + 8 + 12 + 17) / 4 = 9.25
3. Preemptive SJF Scheduling:
 Gantt chart: P1 -> P2 -> P4 -> P3
 Average Turnaround Time = (8 + 12 + 17 + 26) / 4 = 15.75
 Average Waiting Time = (0 + 8 + 12 + 17) / 4 = 9.25
4. Round Robin Scheduling:
 Gantt chart: P1 -> P2 -> P3 -> P4 -> P1 -> P3 -> P2 -> P4 -> P3 -> P1
 Average Turnaround Time = (16 + 12 + 26 + 22) / 4 = 19
 Average Waiting Time = (8 + 4 + 16 + 12) / 4 = 10

Comparing the average turnaround and waiting times:

 FCFS: Turnaround = 16.75, Waiting = 10.25


 Non-preemptive SJF: Turnaround = 15.75, Waiting = 9.25
 Preemptive SJF: Turnaround = 15.75, Waiting = 9.25
 Round Robin: Turnaround = 19, Waiting = 10
PART-C (1*14=14 Marks)
Explain the steps involved to transfer the stored historical information in a magnetic tapes to the CPU for
further processing through various storage device. (7*2=14)
Mounting the Tape
Loading the Tape
Locating the Data
Reading the Data
9. a.
Buffering the Data
Transferring Data to CPU
Processing the Data
Storing or Outputting the Results
Unmounting and Ejecting the Tape
Maintenance and Storage
(OR)
Discuss in detail about the varies memory hierarchies with neat block diagram. and discuss about the
b
functionality of system boot with respect to operating (7+7)
Memory Hierarchies
Registers
Cache Memory
Main Memory (RAM)
Secondary Storage
Block Diagram of Memory Hierarchy
System Boot Functionality
Power-On Self-Test (POST)
BIOS/UEFI Initialization
Boot loader Execution
Operating System Kernel Loading
Init Process Execution
User Login or Graphical User Interface (GUI) Initialization

You might also like