written 8.7 years ago by |
Object Oriented and Multicore Programming - Jun 2015
Computer Engineering (Semester 4)
TOTAL MARKS: 100
TOTAL TIME: 3 HOURS
(1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks.
Answer any one question from Q1 and Q2
1 (a) Explain the following terms with respect to object oriented
Programming:
(1) Dynamic look-up
(2) Delegation
(3) Implicit and Explicit Function
(4) Merits and demerits of friend function.(8 marks)
1 (b) What are different formatting activities supported by Stream
manipulators ? Support with suitable examples.(4 marks)
2 (a) What is abstraction ? Why is it important ? Describe abstract
base class. Illustrate an example to explain it.(8 marks)
2 (b) What do you mean by type conversion ? Explain the same
with example.(4 marks)
Answer any one question from Q3 and Q4
3 (a) What is the importance of Process control block ? Explain its structure.(4 marks) 3 (b) Explain challenges in multicore software development.(4 marks) 3 (c) What is overloading template ? Explain it with an example.(4 marks) 4 (a) Explain data-race and deadlocks in multicore programming.(8 marks) 4 (b) Explain the exception handling mechanism in C++.(4 marks)
Answer any one question from Q5 and Q6
5 (a) Explain the different attributes of the pthread_attr_t object which can be modified by the creator of the thread.(9 marks) 5 (b) Explain the significance of hardware thread and software thread.(4 marks) 6 (a) Explain thread priorities and the different thread scheduling Policies.(9 marks) 6 (b) Compare process context and thread context.(4 marks)
Answer any one question from Q7 and Q8
7 (a) Explain Interprocess Communication (IPC) and explain any two ways of implementing IPC.(8 marks) 7 (b) Write a note on 'Critical Section'.(5 marks) 8 (a) Explain the use of semaphores and mutex to prevent race conditions and deadlocks.(8 marks) 8 (b) Explain messages queues as the IPC mechanism.(5 marks)