CSC322 BSE5B LabMidSP24

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

COMSATS University, Islamabad

Department of Computer Science


SPRING-2024

Operating System Concepts (CSC-322)


Lab Midterm BSSE 5 Total Marks: 25
Date: 25-04-2024 Instructor: Engr. Hafiza Sundus

Code (C/C++) should be properly commented.


No two assignments should match each other (in case, they will be marked -10)

This is a take-home exam and MUST be submitted within the allocated time on MS
TEAMS.
Q1: Write a C program that forks a child that ultimately becomes a zombie process. This
zombie process must remain in the system for at least 10 seconds. (10marks)

Q2: Write a program (in C/C++ only) to implement the following scheme:
Parent process creates two child processes. The first child process takes three numbers
from the user, adds them and sends the result to second child. Second child process reads
and prints the result. The parent process should wait for the child processes to complete
their execution. Use the required system calls for IPC to complete the operation as desired.
(10 marks)

You might also like