CS604 - Midterm Solved Subjective with references by Moaaz.pdf
Verified academic study resource for CS604 (Operating Systems) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File compiled by Moaaz Siddhu) 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
- Type
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Compiled by
- Moaaz Siddhu
- Tags
- SUBJECTIVE, SOLVED, MIDTERM
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 CS604 - Midterm Solved Subjective with references by Moaaz.pdf for free?
You can preview and download "CS604 - Midterm Solved Subjective with references by Moaaz.pdf" (CS604 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs604-midterm-solved-subjective-with-references-by-moaaz-pdf) 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 Systems
Solved Subjective 16 May,2013
From Midterm Papers
MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01
MIDTERM EXAMINATION
Fall 2012
CS604- Operating Systems
The given code is as following;
boolean flag[2];
int turn;
do
{
flag[i]=true;
turn=j;
while(flag[j] && turn==j);
critical section
flag[i]=false;
remainder section
} while(1)
Explain if the given code satisfies Mutual Exclusion or not. Justify your answer. (5)
Answer:- (Page 105)
No, it does not satisfy Mutual Exclusion because too prove mutual exclusion, note that Pi enters its critical
section only if either flag[j]=false or turn=i. Also, if both processes were executing in their critical sections at
the same time, then flag[0]= = flag[1]= = true. These two observations suggest that P0 and P1 could not have
found both conditions in the while statement true at the same time, since the value of ‘turn’ can either be 0 or 1.
Hence only one process say P0 must have successfully exited the while statement. Hence mutual exclusion is
preserved.
1
3. write down the software based solution for critical section problem (2)
Answer:- (Page 101)
do
{
Entry section
critical section
Exit section
remainder section
} while(1)
5. while working on linux, by which command you can show information about a process (2)
Answer:- (Page 66)
ps gives a snapshot of the current processes. Without options, ps prints information about processes owned by
the user.
MIDTERM EXAMINATION
Fall 2012
CS604- Operating Systems
1) Difference between “progress” and “ bounded time: in critical section. 2 marks
Answer:- (Page 98)
Progress:-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.
3) If process in background then we want its move in foreground then what unix linux command is use to
moving. 3 marks
Answer:- (Page 65)
Moving a process into foreground
You can use the fg command to resume the execution of a suspended job in the foreground or move a
background job into the foreground. Here is the syntax of the command.
fg [%job_id]
Where, job_id is the job ID (not process ID) of the suspended or background process. If %job_id is omitted, the
current job is assumed.
2
4) How The open source help us to test the algorithm 3 marks
Answer:- (Page 94)
The Open Source software licensing has made it possible for us to test various algorithms by implementing
them in the Linux kernel and measuring their true performance.
MIDTERM EXAMINATION
Fall 2012
CS604- Operating Systems
what is difference b/w preemptive and non-preemptive (2)
Answer:- Click here for detatail
Preemptive scheduling allows a process to be interrupted in the middle of its execution, taking the CPU away
and allocating it to another process. Non Preemptive scheduling ensures that a process relinquishes control of
the CPU only when it finishes with its current CPU burst.
difference b/w progress and bound waiting
Answer:- Rep
MIDTERM EXAMINATION
Fall 2012
CS604- Operating Systems
Question No 1:-
Preemptive Short Job First scheduling algorithm is best algorithm for minimizing the waiting time for
the process. How can you calculate the average time in preemptive Short Job First scheduling algorithm?
Answer:- (Page 80)
3
Question No 2:-
Critical section has hardware based or software based solution. You have to write the structure of the
software base solution for critical section problem?
Answer:- Rep
Question No 3:-
You may imagine the multi level feedback queue (MLFQ) scheduling algorithm is same as Short Job
First scheduling algorithm. Justify your answer either yes or no?
Question No 4:-
Do you feel that reason for mknod system call and mkfifo library call failure are both same? Give reason
to support your answer?
Answer:- (Page 57)
In fact, the normal file I/O system calls (close(), read(), write(), unlink(), etc.) all works with FIFOs. Since
mkfifo() invokes the mknod() system call, the reasons for its failure are pretty much the same as for the
mknod() call given above.
Question No 5:-
You have to explain the working of Semaphore Algorithm?
Answer:- (Page 108)
Hardware solutions to synchronization problems are not easy to generalize to more complex problems. To
overcome this difficulty we can use a synchronization tool called a semaphore. A semaphore S is an integer
variable that, apart from initialization is accessible only through two standard atomic operations: wait and
signal. These operations were originally termed P (for wait) and V (for signal). The classical definitions
of wait and signal are:
wait(S) {
while(S<=0)
;// no op
S--;
}
signal(S) {
S++;
}
Modifications to the integer value of the semaphore in the wait and signal operations must be executedMore 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)