MSBTE NOTES AND INFO
How Much to Write Per Mark (Follow strictly for Full Marks in MSBTE)
| Marks | Expected Length | Must Contain for Full Credit |
|---|---|---|
| 2 Marks (Q1) | 3–4 lines / 2 distinct points | Definition + Example / Command Syntax |
| 4 Marks (Q2, Q3, Q4) | ¾ page (6–8 bullet points) | Definition + 4–6 explained points + Labelled Diagram / Comparison Table |
| 6 Marks (Q5, Q6) | 1¼–1½ pages | In-depth definition + 6–8 points + Diagram + Real-world OS Example + Conclusion |
| Numerical (FCFS, SRTF, RR, Page Faults) | Full stepwise calculation | Gantt Chart / Allocation Matrix + Step Table + Formulas + Final Answer Underlined |
- The answers should be evaluated on key concepts and technical keywords, not word-to-word rote memorization.
- While assessing diagrams, full credit is awarded for principal components, correct directional arrows, and clear labelling.
- Stepwise marks are given in all numerical problems. Candidate's intermediate steps must be credited even if the final algebraic sum has minor calculation variation.
- For system calls and shell commands, equivalent syntax or parameter orders should be awarded proportionate credit.
| Q. No.Q. | Sub Q.Sub | Model Answer / Step-by-Step Solution & DiagramsModel Answer & Solution | Marking SchemeMarks | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Q.1 Attempt any FIVE of the following:
5 × 2 = 10 Marks
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.1 | a) |
State any two objectives of an Operating System.
Note for Examiner: Additional valid objectives such as ability to evolve, hardware abstraction, and program execution support should be credited equally. |
1M each
Convenience: 1M
Efficiency: 1M Total: 2M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.1 | b) |
Define Process and PCB (Process Control Block).
1. Process: A program in execution is called a process. While a program is a passive entity stored on disk (e.g.
code.c or an executable app.exe), a process is an active entity loaded into main memory containing the program counter, stack, data section, and heap.
2. PCB (Process Control Block): A data structure maintained by the Operating System for each process that stores all metadata needed to manage, schedule, and context-switch that process. Key fields include: Process ID (PID), Process State, Program Counter (PC), CPU Registers, Scheduling Priority, Memory Management Limits, and I/O Status. It is also termed a Task Control Block.
|
1M each
Process Def: 1M
PCB Def & Fields: 1M Total: 2M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.1 | c) |
Define CPU-bound and I/O-bound programs.
|
1M each
CPU-bound: 1M
I/O-bound: 1M Total: 2M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.1 | d) |
Define Memory Compaction and Fragmentation.
1. Compaction: A memory management technique of rearranging allocated memory partitions in physical RAM so that all scattered free memory holes are consolidated into one single, contiguous free block. Compaction eliminates external fragmentation, but is feasible only when relocation is dynamic at execution time.
2. Fragmentation: Inefficient memory utilization where storage space is wasted and cannot be assigned to processes:
|
1M each
Compaction: 1M
Fragmentation: 1M Total: 2M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.1 | e) |
State any four basic file operations.
1. Create: Finds free space in the storage system and creates a new directory entry with file metadata.
2. Open: Loads file directory attributes and disk block addresses into memory and returns a file descriptor handle.
3. Read: Transfers bytes from the file on disk at the current read-pointer into a memory buffer.
4. Write: Writes data from a memory buffer to the specified position in the file and advances the write-pointer.
Other valid operations: Close, Delete, Seek / Reposition, Truncate (0.5M each for any 4). |
0.5M × 4
Four correct file operations listed
Total: 2M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.1 | f) |
Differentiate between Preemptive and Non-Preemptive CPU Scheduling (any two points).
|
1M each
Any 2 comparison points correctly tabulated
Total: 2M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.1 | g) |
State the syntax and function of
|
1M each
kill Syntax & Fn: 1Mwait Syntax & Fn: 1MTotal: 2M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Q.2 Attempt any THREE of the following:
3 × 4 = 12 Marks
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.2 | a) |
Explain Time Sharing Operating System with its features and architecture.
Definition: A Time-Sharing (Multitasking) Operating System is an extension of multiprogramming in which the CPU executes multiple jobs by rapidly switching among them using small allotted time intervals called time slices or time quanta (typically 10 to 100 ms). The switching happens so quickly that each user interacting via a terminal experiences a dedicated, responsive machine.
Fig 2.1: Time Sharing Operating System Architecture & Time Quantum Allocation
Key Features of Time-Sharing OS (Write any 6):
Real-world Examples: UNIX, Linux, Multics, Windows Server terminal services.
Key Limitation: High CPU switching overhead and complexity of multi-tenant security/integrity. |
4 Marks
Definition: 1M
Labelled Diagram: 1M Features (4 to 6): 2M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.2 | b) |
Draw and explain the Process State Transition Diagram. Fig 2.2: Standard 5-State Process Model with Transitions
Explanation of 5 Fundamental Process States:
Process State Transitions:
Admit: Long-term scheduler moves process from NEW → READY.
Dispatch: Short-term scheduler assigns CPU from READY → RUNNING.
Interrupt: Timer interrupt or higher priority arrival shifts RUNNING → READY.
Event Wait: Process initiates an I/O request and shifts RUNNING → WAITING.
Event Completion: I/O finishes or event occurs; process moves WAITING → READY.
Exit: Process ends operations and transitions RUNNING → TERMINATED.
Important Exam Rule: Transitions from Waiting → Running or Ready → Waiting are physically impossible in standard OS design. |
4 Marks
State Diagram: 2M
State Explanations: 1M Transitions: 1M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.2 | c) |
Explain Fixed-Size (Static) Memory Partitioning with a neat diagram.
Concept: In Fixed-Size (Static) Partitioning, system main memory is divided at system configuration time into a fixed number of non-overlapping partitions of predetermined fixed sizes (either equal or unequal). Each partition accommodates exactly one process at a time; therefore, the maximum degree of multiprogramming is strictly bounded by the number of partitions.
Fig 2.3: Fixed-Size Static Memory Partitioning with Internal Fragmentation
Operational Working:
Advantages:
Disadvantages:
|
4 Marks
Definition: 1M
Labelled Diagram: 1M Working & Pros/Cons: 2M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.2 | d) |
Compare CLI (Command Line Interface) and GUI (Graphical User Interface) based Operating Systems.
|
4 Marks
Any 4 to 6 parameters compared: 4M
Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Q.3 Attempt any THREE of the following:
3 × 4 = 12 Marks
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.3 | a) |
Define Deadlock and explain any two necessary conditions for a deadlock to occur.
Definition of Deadlock: A deadlock is a condition in a multiprogramming system where a set of processes are permanently blocked because each process holds at least one shared resource while waiting to acquire another resource currently held by another process in the same set, resulting in an indefinite freeze.
Fig 3.1: Circular Wait Dependency Cycle in Resource Allocation Graph (Deadlock Condition)
Four Necessary (Coffman) Conditions for Deadlock:
Deadlock can arise if and only if all four conditions hold simultaneously: (1) Mutual Exclusion, (2) Hold and Wait, (3) No Preemption, (4) Circular Wait.
1. Mutual Exclusion:
At least one resource must be held in a non-shareable mode — only one process can use the resource at any given moment. If another process requests that non-shareable resource, the requesting process must wait until it is formally released.
Example: A physical printer or tape drive can execute only one print job at a time. Read-only shared files do not cause mutual exclusion.
2. Hold and Wait:
A process must be actively holding at least one resource while waiting to acquire additional resources that are currently allocated to and held by other operating processes.
Prevention: OS can require a process to request and be allocated all necessary resources upfront before starting execution.
Summary of other two conditions:
• No Preemption: Allocated resources cannot be forcibly seized; they are released only voluntarily by the holding process. • Circular Wait: A closed chain of processes {P0, P1, ..., Pn} exists such that P0 waits for a resource held by P1, and Pn waits for P0. |
4 Marks
Definition: 1M
List 4 Conditions: 1M 2 Conditions Explained + Diagram: 2M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.3 | b) |
Explain CPU Scheduling Criteria with relevant formulas. To compare and evaluate different CPU scheduling algorithms, operating system designers rely on the following standard performance criteria:
1. CPU Utilization (Maximize):
Percentage of time the CPU core is executing useful user/kernel tasks rather than idling.
Utilization = (CPU Busy Time / Total Time) × 100%
2. Throughput (Maximize):
Number of completed processes per unit of elapsed time (e.g., 50 processes/minute).
Throughput = Total Completed Processes / Total Time
3. Turnaround Time (TAT) (Minimize):
Interval from the instant a process is submitted to its complete execution finish.
TAT = Completion Time (CT) − Arrival Time (AT)
4. Waiting Time (WT) (Minimize):
Cumulative duration spent by a process sitting idle in the ready queue awaiting CPU time.
WT = Turnaround Time (TAT) − Burst Time (BT)
5. Response Time (Minimize):
Time elapsed from initial process submission until the very first CPU response/output is produced. Crucial in interactive and time-sharing operating environments.
Response Time = Time of First CPU Allocation − Arrival Time (AT)
Additional criteria: Fairness (equal opportunity for all tasks) and Starvation Avoidance (mitigated via Aging). |
4 Marks
Any 4 criteria explained with formulas (1M each)
Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.3 | c) |
Explain Bitmap and Linked List Free-Space Management techniques for disk storage.
1. Bitmap (Bit Vector) Method:
The disk free-space list is implemented as a bit map vector where each disk block is represented by a single bit:
bit = 0 → Block is Free | bit = 1 → Block is Allocated
Advantage: Simple and extremely fast in finding the first free block or continuous runs of free blocks via hardware word bit-scans.
Disadvantage: For large terabyte disks, the bitmap becomes too big to hold entirely in main RAM.
2. Linked List (Free List) Method:
All unallocated free disk blocks are linked together in a linked list structure. Each free block contains a pointer referencing the next available free block. The OS preserves a pointer to the first free block (Head Pointer) in memory.
[Head: Blk 2] → [Blk 2 | ptr=3] → [Blk 3 | ptr=5] → [Blk 5 | ptr=6] → [Blk 6 | ptr=NULL]
Advantage: No disk storage space is wasted on tables because pointers reside directly within the unallocated blocks themselves.
Disadvantage: Traversal is slow (requires sequential disk reads); cannot find contiguous blocks efficiently.
|
4 Marks
Bitmap + Diagram: 2M
Linked List + Diagram: 2M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.3 | d) |
Explain Two-Level Directory and Tree-Structured Directory with diagrams.
1. Two-Level Directory Structure:
To prevent name collisions between different users in multi-user environments, a Master File Directory (MFD) is created at the top level. The MFD is indexed by user name/ID, and each entry points to a distinct User File Directory (UFD). Each user operates within their own isolated UFD.
[MFD (Master Directory)]
↓ └── [User 1 UFD] → [fileA, fileB, test.c] └── [User 2 UFD] → [fileA (same name allowed!), proj.docx] └── [User 3 UFD] → [data.csv, lab.py] Pros/Cons: Solves name conflicts among users; however, users cannot collaborate easily, and sub-directories cannot be created within a user account.
2. Tree-Structured Directory:
The standard hierarchical directory structure in modern operating systems (Windows, Linux). An arbitrary depth of directory tree extends downwards from a single Root Directory (
Root ( / )
└── /bin → [ls, cp, rm] └── /home └── /student → [/notes, /assignments → [osy.pdf]] └── /etc → [passwd, hosts] Pros: Full flexible grouping, powerful search, supports both Absolute Paths ( |
4 Marks
Two-Level + Diagram: 2M
Tree-Structured + Diagram: 2M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Q.4 Attempt any THREE of the following:
3 × 4 = 12 Marks
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.4 | a) |
State any four responsibilities of Memory Management and File Management.
Memory Management Responsibilities:
File Management Responsibilities:
|
4 Marks
Memory Mgmt (4 pts): 2M
File Mgmt (4 pts): 2M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.4 | b) |
Given three processes P1, P2, P3 with Arrival and Burst Times. Calculate Average Waiting Time using FCFS Scheduling.
Given Data: Process P1 (AT = 0 ms, BT = 5 ms), Process P2 (AT = 1 ms, BT = 3 ms), Process P3 (AT = 2 ms, BT = 8 ms).
1. CPU Execution Gantt Chart: Fig 4.1: FCFS Process Timeline (Completion Time = 16 ms)
2. Stepwise Process Calculation Table:
Final Calculation Steps:
• Average Waiting Time (AWT) = ΣWT / n = (0 + 4 + 6) / 3 = 10 / 3 = 3.33 ms
• Average Turnaround Time (ATAT) = ΣTAT / n = (5 + 7 + 14) / 3 = 26 / 3 = 8.67 ms
|
4 Marks
Gantt Chart: 1M
Table Calculations: 1.5M Formula & Final Ans: 1.5M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.4 | c) |
Differentiate between Paging and Segmentation memory management schemes with diagrams.
Paging Concept:
Logical memory is divided into fixed-size blocks called Pages. Physical memory is divided into blocks of the exact same size called Frames. A Page Table maps logical page number (p) to frame number (f).
Logical Address: [Page p | Offset d]
Physical Address = (Frame f × Page_Size) + d
Segmentation Concept:
Logical memory is divided into variable-size logical modules called Segments (e.g. main routine, stack, symbol table). A Segment Table maps segment number (s) using
Base and Limit.
Logical Address: [Segment s | Offset d]
Check: if (d < Limit) Physical = Base + d;
|
4 Marks
Paging Concept & Diag: 1M
Seg Concept & Diag: 1M Comparison Table: 2M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.4 | d) |
Describe any four file-management system calls in UNIX/Linux with syntax and purpose.
Other valid file calls: |
1M × 4
Any 4 system calls with syntax & function: 4M
Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.4 | e) |
Define Context Switching. Describe the stepwise switching procedure with a neat diagram.
Definition: Context Switching is the administrative procedure performed by the OS kernel of saving the state (context) of the currently running process in its PCB and loading the saved state of another process from its respective PCB, thereby allowing a CPU core to switch execution among multiple tasks. It constitutes pure computational overhead since the CPU performs zero user computation during the switch.
Fig 4.2: CPU Context Switch Sequence Between Process 1 and Process 2
Step-by-Step Procedure of Context Switching:
|
4 Marks
Definition: 1M
Sequence Steps: 1.5M Labelled Diagram: 1.5M Total: 4M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Q.5 Attempt any TWO of the following:
2 × 6 = 12 Marks
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.5 | a) |
Explain the purpose and functions of the following Windows OS administration tools (2 marks each):
i) Performance Monitor (
perfmon.msc)
Win + R → perfmon
ii) Task Scheduler (
taskschd.msc)
Win + R → taskschd.msc
iii) Device Manager (
devmgmt.msc)
Win + R → devmgmt.msc
|
2M × 3
Perf. Monitor: 2M
Task Scheduler: 2M Device Manager: 2M Total: 6M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.5 | b) |
Given reference string of 20 page requests: (1) Optimal Page Replacement | (2) LRU (Least Recently Used) Page Replacement
1. OPTIMAL (OPT / MIN) Algorithm (3 Marks)
Rule: Replace page that will NOT be used for longest time in FUTURE
Steps 1 to 10:
Steps 11 to 20:
• Total Page Faults (Optimal) = 9 | Total Hits = 11
• Hit Ratio = 11 / 20 = 55.0% | Fault Ratio = 9 / 20 = 45.0%
2. LEAST RECENTLY USED (LRU) Algorithm (3 Marks)
Rule: Replace page that has NOT been used for longest time in PAST
Steps 1 to 10:
Steps 11 to 20:
• Total Page Faults (LRU) = 12 | Total Hits = 8
• Hit Ratio = 8 / 20 = 40.0% | Fault Ratio = 12 / 20 = 60.0%
|
6 Marks
Optimal Trace + Calc: 3M
LRU Trace + Calc: 3M Total: 6M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.5 | c) |
Compare Contiguous, Linked, and Indexed File Allocation methods with labelled diagrams.
1. Contiguous Allocation
Dir → [Start: 2, Len: 3]
Occupies linear adjacent blocks.
Disk: [0][1][2][3][4][5][6]
2. Linked Allocation
Dir → [Start: 9, End: 25]
Each block contains data + pointer.
[9]→[16]→[1]→[10]→[25]→NULL
3. Indexed Allocation
Dir → [Index Blk: 19]
One index block holds all disk pointers.
Blk 19 → {{9, 16, 1, 10, 25}}
Conclusion: Contiguous allocation is optimal for read-only optical media and swap areas. Linked allocation suits sequential batch files. Indexed allocation is the best modern general-purpose design supporting fast direct access without external fragmentation.
|
6 Marks
Diagrams: 2M
Comparison Table: 3M Conclusion: 1M Total: 6M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Q.6 Attempt any TWO of the following:
2 × 6 = 12 Marks
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.6 | a) |
Given four processes P1, P2, P3, P4 with Arrival and Burst Times. Calculate Average Waiting Time using:
Process Table:
P1 (AT=0, BT=8), P2 (AT=1, BT=4), P3 (AT=2, BT=9), P4 (AT=3, BT=5).
▸ Part 1: Preemptive SJF / SRTF (Shortest Remaining Time First) (3 Marks)
Rule: Preempt if newly arrived job has smaller remaining burst
• t = 0: Only P1 is present → P1 starts executing.
• t = 1: P2 arrives with BT=4. P1 has remaining time = 7. Since 4 < 7, P1 is preempted and P2 runs until completion at t = 5.
• t = 5: Available processes: P1 (rem 7), P3 (rem 9), P4 (rem 5). Smallest remaining is P4 (5) → P4 runs until completion at t = 10.
• t = 10: Available: P1 (rem 7), P3 (rem 9). Smallest is P1 (7) → P1 runs until completion at t = 17.
• t = 17: Only P3 (9) remains → P3 runs until completion at t = 26.
Fig 6.1: SRTF Scheduling Gantt Chart (Average Waiting Time = 6.5 ms)
• Average Waiting Time (SRTF) = 26 / 4 = 6.5 ms | Avg TAT = 52 / 4 = 13.0 ms
▸ Part 2: Round Robin Scheduling (Time Quantum q = 3 ms) (3 Marks)
Rule: Cyclic FIFO queue with max 3 ms CPU slice
Ready Queue Execution Trace:
t=0: [P1] → runs (0-3), rem 5 → Queue: P2, P3, P4, P1 t=3: [P2] → runs (3-6), rem 1 → Queue: P3, P4, P1, P2 t=6: [P3] → runs (6-9), rem 6 → Queue: P4, P1, P2, P3 t=9: [P4] → runs (9-12), rem 2 → Queue: P1, P2, P3, P4 t=12: [P1] → runs (12-15), rem 2 → Queue: P2, P3, P4, P1 t=15: [P2] → runs (15-16) COMPLETES at t=16 → Queue: P3, P4, P1 t=16: [P3] → runs (16-19), rem 3 → Queue: P4, P1, P3 t=19: [P4] → runs (19-21) COMPLETES at t=21 → Queue: P1, P3 t=21: [P1] → runs (21-23) COMPLETES at t=23 → Queue: P3 t=23: [P3] → runs (23-26) COMPLETES at t=26 Fig 6.2: Round Robin (q = 3 ms) Gantt Chart (Average Waiting Time = 13.5 ms)
• Average Waiting Time (RR, q=3ms) = 54 / 4 = 13.5 ms | Avg TAT = 80 / 4 = 20.0 ms
Conclusion: SRTF yields a substantially lower Average Waiting Time (6.5 ms vs 13.5 ms). However, Round Robin ensures complete starvation avoidance and responsive timeslicing, making RR the standard choice in multi-user interactive OS kernels.
|
6 Marks
SRTF Trace & Calc: 3M
RR Trace & Calc: 3M Total: 6M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.6 | b) |
Given memory partitions with free holes in order:
Given Parameters: Process Request = 6 KB • Free Holes in memory list: H1 = 12 KB, H2 = 19 KB, H3 = 7 KB
Fig 6.3: Memory Partition Allocation for 6 KB Process Request
1. First Fit Algorithm (2 Marks):
Allocates the very first free hole from the beginning of memory that is large enough to satisfy the request (≥ 6 KB).
• Scans H1 (12 KB): Since 12 KB ≥ 6 KB → Allocated in H1. • Leftover in H1: 12 KB − 6 KB = 6 KB. • Resulting Free Hole List: 6 KB, 19 KB, 7 KB. Assessment: Fastest search since allocation halts at the first valid hole.
2. Best Fit Algorithm (2 Marks):
Searches the entire memory list and allocates the smallest hole that is large enough to minimize leftover fragment.
• Available candidates: 12 KB, 19 KB, 7 KB. Smallest suitable hole is H3 (7 KB). • Leftover in H3: 7 KB − 6 KB = 1 KB. • Resulting Free Hole List: 12 KB, 19 KB, 1 KB. Assessment: Produces highest memory fit, but creates a tiny, virtually unusable 1 KB hole (severe external fragmentation).
3. Worst Fit Algorithm (2 Marks):
Searches the entire memory list and allocates the largest available free hole so that the leftover remains large enough to house future tasks.
• Largest hole in memory is H2 (19 KB) → Allocated in H2. • Leftover in H2: 19 KB − 6 KB = 13 KB. • Resulting Free Hole List: 12 KB, 13 KB, 7 KB. Assessment: Prevents tiny fragment generation; however, it breaks apart the system's largest continuous free block.
|
6 Marks
First Fit: 2M
Best Fit: 2M Worst Fit: 2M Total: 6M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.6 | c) |
State the advantages of multithreading and differentiate between a Process and a Thread.
Thread Definition: A thread (lightweight process) is the smallest basic execution unit of CPU utilization. It comprises its own Thread ID, Program Counter (PC), Register set, and private Stack, while sharing the code section, data section, and OS resources (such as open files) with peer threads of the same parent process.
Advantages of Multithreading (Write any 6):
Process vs Thread Comparison:
|
6 Marks
Thread Def: 1M
Multithreading Pros (6 pts): 3M Process vs Thread (4 pts): 2M Total: 6M
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LAST-MINUTE SCORING SHEET & FORMULAS
- Turnaround Time (TAT): TAT = CT − AT
- Waiting Time (WT): WT = TAT − BT
- Average Waiting Time: AWT = (Σ WT) / Total Processes
- Page Fault Ratio: Total Faults / Total References
- Hit Ratio: 1 − Fault Ratio = (Hits / References) × 100%
- Paging Address: Physical = (Frame No × Page Size) + Offset
| Question | Topic | Verified Final Answer |
|---|---|---|
| Q.4 (b) | FCFS Numerical | Avg WT = 3.33 ms |
| Q.5 (b) | Page Faults (3 frames) | Optimal = 9 faults (55%) LRU = 12 faults (40%) |
| Q.6 (a) | SRTF vs RR (q=3ms) | SRTF WT = 6.5 ms RR WT = 13.5 ms |
| Q.6 (b) | 6 KB Memory Alloc | First Fit: 12 KB (H1) Best Fit: 7 KB (H3) Worst Fit: 19 KB (H2) |
1. In Q.1, pick direct definitions and shell syntax questions — finish all 5 in under 15 minutes to secure 10 full marks.
2. In Q.2–Q.4, prioritize questions that demand a diagram or comparison table (e.g. Process states, CLI vs GUI, Paging vs Segmentation). Evaluators award full marks easily for neat sketches.
3. Solve numericals first: Q4b, Q5b, Q6a, and Q6b offer 100% objective step marks. Always draw labelled Gantt charts and clearly box/underline your final calculated value!