CS604MIDTERMSUBJECTIVEWITHREFERENCESOLVEDBYUMAIRSAULAT.doc
Verified academic study resource for CS604 (Operating Systems) under the Computer Science at Virtual University of Pakistan. This DOC document (Midterm Solved Past Paper & Revision File) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.
- Course
- CS604 – Operating Systems
- Faculty
- Computer Science
- Format
- DOC
- Type
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS604.
What this file covers — CS604 syllabus roadmap
- Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
- Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
- Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
- Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
Frequently asked questions
Where can I download CS604MIDTERMSUBJECTIVEWITHREFERENCESOLVEDBYUMAIRSAULAT.doc for free?
You can preview and download "CS604MIDTERMSUBJECTIVEWITHREFERENCESOLVEDBYUMAIRSAULAT.doc" (CS604 DOC, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs604midtermsubjectivewithreferencesolvedbyumairsaulat-doc) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS604 file?
This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.
What is the passing criteria for CS604 under the VU 20% Two-Half Rule?
Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.
Are CS604 solved past papers and handouts verified for 2026 exams?
Yes. All CS604 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.
Inside this file
CS604- OPERATING SYSTEM
SOLVED SUBJECTIVE FOR MID TERM EXAM
QNo.1 List and define the different metrics by which might evaluate a scheduler (List at least 4). 5 marks
Answer:-
When evaluating a scheduler’s performance, utilization and Throughput are traded off for better Response Time. Response time is important for OS’s that aim to be user-friendly.
List of Schedulers include:
1. First-Come, First-Served (FCFS)
2. Round-Robin (RR)
3. Shortest-Job-First (SJF)
4. Priority Scheduling (PS)
REF :: handouts Page No. 80
QNo.2 Write brief the multilevel feedback queue scheduling. 5 marks
Answer:-
Multilevel feedback queue scheduling allows a process to move between queues. The idea is to separate processes with different CPU burst characteristics. If a process uses too much CPU time, it will be moved to a lower-priority queue. This scheme leaves I/O bound and interactive processes in the higher-priority queues. Similarly a process that waits too long in a lower-priority queue may be moved o a higher priority queue. This form of aging prevents starvation.
In general, a multi-level feedback queue scheduler is defined by the following parameters:
• Number of queues
• Scheduling algorithm for each queue
• Method used to determine when to upgrade a process to higher priority queue
• Method used to determine when to demote a process
• Method used to determine which queue a process enters when it needs service
REF :: handouts Page No. 89
Qno.3 Assumption made while formulating a solution to the critical section problem. 2 marks
Answer:-
A solution to the critical section problem must satisfy the following three requirements:
Assumptions made While formulating a solution, we must keep the following assumptions in mind:
• Assume that each process executes at a nonzero speed
• No assumption can be made regarding the relative speeds of the N processes.
REF :: handouts Page No. 98
Qno.4 There are many commands. Write the method through which these commands can communicate with each other. 3 marks
Answer:-
There are many commands some of these are given below:-
Command Name $ pw
Details
You can display the absolute pathname of your working directory with the pwd command
Syntax
/home/students/nadeem/courses/cs604/programs
Command Name cp
Details
You can use the cp command for copying files. You can use the cp file1
file2 command to copy file1 to file2.
Syntax
cp ~/file1 ~/memos/file2
Command Name mv
Details
You can use the mv command for moving files. You can use the mv file1
file2 command to move file1 to file2.
Syntax
$ mv ~/file1 ~/memos/file2
Command Name rm
Details
You can use the rm command to remove files. You can use the rm file1
command to remove file1
Syntax
$ rm ~/courses/cs604/programs/test.c $ For single file
rm *.o For all files
REF :: handouts Page No. 27
Qno.5. Write Difference between SJF and Shortest Remaining Time First Scheduling algorithm. 3 marks
Answer:
Shorted Job First (SJF) Scheduling
Shortest Remaining Time First Scheduling
For long term scheduling in a batch system, we can use as the length the process time limit that a user specifies when he submits the job
Whenever a new job comes in, check the remaining service time on the
current job.
Preemptive SJF scheduling is sometimes called shortest-remaining-time-first scheduling.
For all but the longest jobs, SRT better than SJF
The response ratio is good (Fast)
The response ratio is good (low)
Waiting time is fast
Waiting time is also quite low for most processes
REF :: handouts Page No. 82
Qno6. Write the formula/ procedure for calculating the waiting time in preemptive Shortest Job First scheduling
Answer:-
Preemptive SJF scheduling is sometimes called shortest-remaining-time-first scheduling.
We illustrate the working of the SJF algorithm by using the following system state.
Process Arrival Time Burst Time
P1 0.0 7
P2 2.0 4
P3 4.0 1
P4 5.0 4
REF :: handouts Page No. 83
Qno7. Define race condition and how prevent this condition. 2 marks
Answer:-
A situation like this, where several processes access and manipulate the same data
concurrently and the outcome of the manipulation depends on the particular order in
which the access takes place, is called a race condition
REF :: handouts Page No. 97
Qno.8 What is Convoy Effect?
Answer:-
When FCFS scheduling algorithm is used, the convoy effect occurs when short
Processes wait behind a long process to use the CPU and enter the ready queue in a
Convoy after completing their I/O.
REF :: handouts Page No. 82
Qno.9 What are the common data structures in Bakery Algorithm?
Answer:-
The bakery algorithm is due to Leslie Lamport and is based on a scheduling algorithm
commonly used in bakeries, ice-cream stores.
REF :: handouts Page No. 103
Qno.10 How a pipe can be created?
Answer:-
The pipe() system call creates a pipe and returns two file descriptors, one for reading and second for writing,
REF :: handouts Page No. 103
Qno.11 Difference between “progress” and “ bounded time: in critical section
Answer:-
Process:-
If no process is executing in its critical section and some processes wish to enter their critical sections, then only those processes that are not executing in their remainder section can participate in the decision on which will enter its critical section next, and this selection cannot be postponed indefinitely.
Bounded Waiting:-
There exists a bound on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.
REF :: handouts Page No. 99
Qno.12 What is Starvation and how it occures
Answer:-
Starvation:-
A process that is ready to run but lacking the CPU can be considered blocked-waiting for the CPU.
How it occur:-
If a deadlock occurs, it can be resolved if one car backs up (preempt resources
and rollback). Several cars may have to be backed up if a deadlock occurs. Starvation is
possible.
REF :: handouts Page No. 129
More CS604 files
- CS604 - Midterm Exam Questions.pdf (PDF · Midterm)
- CS604 - Midterm Solved Mcqs with references by Moaaz(0).pdf (PDF · Midterm)
- CS604 - Midterm Solved Mcqs with references by Moaaz.pdf (PDF · Midterm)
- CS604 - Midterm Solved Mcqs with references by Moaaz.pdf (PDF · Midterm)
- CS604 - Midterm Solved Mcqs with references by Moaaz.pdf (PDF · Midterm)
- CS604 - Midterm Solved Subjective with references by Moaaz ( (PDF · Midterm)
- CS604 - Midterm Solved Subjective with references by Moaaz.p (PDF · Midterm)
- CS604 - Midterm Solved Subjective with references by Moaaz.p (PDF · Midterm)