Prep Right
PPSC · PMS Punjab 2016

Computer Science, Paper I

100 marks · 3 hours · 2 questions
This paper Computer Science · all yearsQ. 3 · You are given two-dimensional arrays…Q. 8 · You are Given the Following:-…With this paper2016 →
3 hours · questions hide until you reveal them

Not yet checked 1 of 2 questions have not yet been compared with the official paper.

Q. 3

You are given two-dimensional arrays A and B of same dimensions i.e., mRows X nCols. Write instructions in C++ or Java computer language to compute their product, and display the resultant array.

(20)
Q. 8

You are Given the Following:- A set of Processes P = {P1, P2, P3} ; A set of Resources R = {R1, R2, R3, R4} Resource Instances: One instance of resource type R1; Two instances of resource type R2; One instance of resource type R3; Three instances of resource type R4. Process States: Process P1 is holding an instance of resource type R2 and is waiting for an instance of resource type R1. Process P2 is holding an instance of R1 and an instance of R2 and is waiting for an instance of R3. Process P3 is holding an instance of R3.

  1. (a)Draw resource-allocation graph by using data as given above. From resource-allocation graph produced in part (a), conclude whether the system is in deadlock state or not? Give reasons for your conclusion. [10]
  2. (b)Differentiate between:- Logical and physical addresses. External fragmentation and internal fragmentation. Best-fit and worst-fit memory allocation strategies. Segmentation and paging. [10]
Not yet checked

Related papers

About this paper

The 2016 PMS Punjab Computer Science paper set by the PPSC. Question wording only; questions marked “Not yet checked” have not been compared with the official paper yet.

Disclaimer Prep Right is independent and not affiliated with PPSC.