CCS-3301-SYSTEMS-PROGRAMMING.docx
CCS-3301-SYSTEMS-PROGRAMMING.docx
Question 1 (Compulsory)
(a) Define the following terms and explain how they are used in system operation
i. Thread
ii. Handle
iii. File
iv. Stub
[8 marks]
(b) Briefly explain how user programs interact with and with operating system give example in each
case.
[4 marks]
(c) System API are broadly categorized into two classes .List the two classes and compare them in
terms of file management functions.
[6 marks]
(d) Briefly explain how two user programs on different platform communicate with each other
using Remote procedure call (RPC).
[6 marks]
(e) Explain how producer -consumer relationship is supported using shared memory mechanism.
[6 marks]
Question 2
(a) Briefly describe any two data structure used by operating system.
[3 marks]
(b) Using a simple diagram illustrate various thread states in multithreaded computing
environment. [8 marks]
(c) Write a server program that creates multi files, each contains system information of the
client.
Question 3
(b) Write a program which maliciously access file named punishment.txt trace your name and clear
all existing content and replace it with empty string. Explain working of your program.
[12 marks]
[9 marks]
Question 4
(a) Explain the following terms and give example in each case.
i. Device driver API
ii. Message queue
iii. Buffered IO
[6 marks]
(b) Write function prototype for creating a process .explain each parameter used.
[6 marks]
(c) Using appropriate socket API illustrate how server program can respond to multiple client
simultaneously.
[8 marks]
Question 5
(a) Explain giving reasons why it’s important for a programming language to support multiple
threads.
[7 marks]
(b) Explain how semaphores are used to synchronize access to shared memory. Illustrate with an
example.
[7 marks]
(c) Briefly explain how user program larger than available main memory can be executed without
degrading overall system performance.
[6 marks]