SPPU Computer Engineering (Semester 4)
Object Oriented and Multicore Programming
December 2014
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


Answer any one question from Q1 and Q2
1 (a) What is a friend function? How do you declare one? When is friend function compulsory? Give an example.
6 M
1 (b) What is virtual function? Why do we need virtual functIon When do we make a virtual function 'pure' ? What are the implications of making a function a pure virtual function?
6 M

2 (a) Write short notes on:
i) 'this' pointer
ii) Copy constructor.
6 M
2 (b) What is operator overloading? Name the operators that cannot be overloaded in C++? How do you declare an overloaded stream insertion and extraction operator?
6 M

Answer any one question from Q3 and Q4
3 (a) Distinguish between overloaded functions and function templates. Write a function template for finding the minimum value contained in an array.
6 M
3 (b) Draw the state diagram for the process. Explain each process state briefly.
6 M

4 (a) What is an exception ? How is an exception handled in C++ ? What are the advantages of using exception handling mechanism in program?
6 M
4 (b) How can we create a child process from parent process ?Describe parent-child relation.
6 M

Answer any one question from Q5 and Q6
5 (a) What do you mean by threads? Write a threaded program in C++ and explain Pthread_join( ) function.
7 M
5 (b) Compare threads and processes. Describe thread attributes.
6 M

6 (a) How can we pass command line arguments to the thread function? Determine the number of threads using command line argument.
7 M
6 (b) What are the types of thread? Describe in brief.
6 M

Answer any one question from Q7 and Q8
7 (a) What is meant by critical section? How can we manage critical section using mutex semaphor?
6 M
7 (b) Enlist concurrency models. Write a short note on any two.
7 M

8 (a) Can all threads in the process share global data, variables, and data structure? If yes, explain with an example.
6 M
8 (b) Describe the basic functions of POSIX message queue.
7 M



More question papers from Object Oriented and Multicore Programming
SPONSORED ADVERTISEMENTS