0% found this document useful (0 votes)
80 views1 page

ETP Exam: IPC and Thread Programming

1. The document provides instructions for candidates taking an examination. It states to only attempt the question allocated, submit the paper and answers to the invigilator, and fill in details like registration number and question number. 2. Ten multiple choice questions are provided related to processes, threads, file handling, and inter-process communication. The questions cover concepts like pipes, file operations, process hierarchy, shared memory, semaphores, and race conditions. 3. Candidates are instructed to only attempt the question number that is allocated to them, and the neutral examiner and invigilator will verify the same.

Uploaded by

Rajesh Nahak
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)
80 views1 page

ETP Exam: IPC and Thread Programming

1. The document provides instructions for candidates taking an examination. It states to only attempt the question allocated, submit the paper and answers to the invigilator, and fill in details like registration number and question number. 2. Ten multiple choice questions are provided related to processes, threads, file handling, and inter-process communication. The questions cover concepts like pipes, file operations, process hierarchy, shared memory, semaphores, and race conditions. 3. Candidates are instructed to only attempt the question number that is allocated to them, and the neutral examiner and invigilator will verify the same.

Uploaded by

Rajesh Nahak
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

before attempting the question pape

instructions caretully
Read the following
it
hy neutral
examiner out of all the aiven guestions. If some ather question
1. Attempt only the question alocait lead to cancallation of the examination.
it shall
is attempted by thee candidate,
paper along with the
answera
Sheet to the invigilator before leaving the examiation
2
Submt [Link]
space prpvided
hal/lab,
3. Fill all the detats mentioned below
venY Careiy n the
Signature of student:
Registration No.
[Link]/sauravhathilpu-cse
Question No. Allocated to candidate:
Examiner)
(To be filled by Neutral
attempted the allocated question only.
It is certified that i have
verified that the candidate has Signature of Invigilator
Sighature of Neutral Examiner Name of Invigilator
Name of Neutral Examiner
UID
UID:

Q1A WAP to implement IPC using unnamed pipes. is read from [Link]. Aiso print
a file1,bt in which write last 10 characters which
B. WriteC program to create
the total size of file [Link] and last ten value.

02 A Write a File In Reverse Using Lseek) System


Galh hat miltinie threads are able to read a
ad i te
inetement the shared variable Implement the
same using test case where one thread increments the values the other threads are not allowed to execute the
read function ard increment function
will subtract the
Q3A Create twoBoth threads. One will add two nümbers (c=a+b) and the second thread
numbers (da-b) thred
will be printed by the main/) nnne
d pro

the main0 function and nroduct returned values (cd)


resuitto of

B. Write a program to write into a pipe using popen) and pclase() functions ailou-CSe
Q4 A. WAP using system calls which will read from t0h character to 25th characterifrom a file opened in read
only mode.
B. WAP to implement race condition using semaphores

Q5A Write a program using system cals to create hierarchy of four processes l.e. process P having child P1
and P2, process P2 having child P3 and process PA, Use function getppid),.getpid() to know id's of the

B Using semaphores write a program to synchranize the process such that multiple threads are able to read a
shared vanable at one time but only one thread is allowed to increment the shared variable, Implement the
same using test case where one thread increments the values the other threads are not allowed to execute the
read furnction and increment function.
O6 A WAP to create two threads. One will print the ibonacci series and the other thread will find factorial of a
number entered by the user. two processes
B. WAP to demonstrate race condition between
implementation of sequential file alocatien
Q7 A WAP to demonstrate the mes sage belween two independent processes
B. Using pipes write a program to transter
demonstration of indexed fle allocation,
Q8A WNAP to implement the file alocation
[Link] to implement the demonstration of Linked

o9
A
WAP which will copy all the data from one file to ancther file using [Link]
aprogram using system calls to create hierarchy of four processe
B.
w having child P2 and process P2 having
oro
aa P.
sses i.e. prOcess
0se function
P having child P1
getppid).getpid) to
and
id's of the processes? kno
Q10 A. WAP to show cascading of processes.
WAP to create
B.
two threads. One will print the Fibonaci
F
series and the other
number entered by the user. thread wll find factorial of a
-End of
Quetion Paper

You might also like