View Single Post
  #1  
Old Friday, January 11, 2013
Last Island's Avatar
Last Island Last Island is offline
Royal Queen of Literature
Medal of Appreciation: Awarded to appreciate member's contribution on forum. (Academic and professional achievements do not make you eligible for this medal) - Issue reason: AppreciationModerator: Ribbon awarded to moderators of the forum - Issue reason: Best Moderator Award: Awarded for censoring all swearing and keeping posts in order. - Issue reason: Best ModMember of the Year: Awarded to those community members who have made invaluable contributions to the Community in the particular year - Issue reason: 2008Gold Medal: Awarded to those members with  maximum number of  reputation points. - Issue reason: For the year 2007, 2008, 2009, 2010, 2011Diligent Service Medal: Awarded upon completion of 5 years of dedicated services and contribution to the community. - Issue reason: More than 5 years of dedicated services
 
Join Date: May 2005
Location: Forest of Fallen Stars
Posts: 7,585
Thanks: 2,427
Thanked 15,848 Times in 5,006 Posts
Last Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardomLast Island is headed toward stardom
Default Computer Science KPK 2008

KHYBER PUKHTOON KHWA PUBLIC SERVICE COMMISSION,PESHAWAR
SUBJECT:- COMPETITIVE EXAMINATION FOR THE POST OF PROVINCIAL MANAGEMENT SERVICE (BPS-17)-2008

Computer Science

Time allowed: 3 hours
Max marks:100

Attempt total five questions. Attempt atleast one question from each question. Each question carries 20 marks.

Section A

Question No. 1

(A) Suppose we have the following jobs:

Job .. Arrival .. Time Burst Time (milliseconds)
-1 ........0 ................8
-2 ........2................ 4
-3 ........2 ................9
-4 ........3................ 5

Find out the average wait time using SJF (Shortest Job First) and RR (Round Robin, with time quantum of 7 millisecond) policies.

(B) What are the necessary conditions for deadlock to occur? Explain briefly.


Question No. 2


(A) What is a process? How it is different from a thread?

(B) What is the difference between uni-programming and multiprogramming?


Question No. 3


(A) Describe OSI seven layers model and brief functions of each layer

(B) What is the difference between LAN, WAN, and Internet? What is the function of Hub, Switch and a Router and at what layer each hardware operates?


Section B

Question No. 4

(A) Write program in C++ to read 10 values in an array (assume that you read all valued positive). Then change each even value in the array with its half value and each value with its double value. After change, count how many are even and how many values are odd. Display this counting.

(B) Write a program to generate the following series

50 40 30 20 10
60 47 34 21 8
70 54 38 22 6


Question No. 5


(A) Write INSERTION Sort algorithm for an array of n elements.

(B) Apply Kruskal's Algorithm to find the Minimum Spanning Tree of the following graph.


Section C

Question No. 6

(A) Normalize the following data up to 3rd Normal Form (3NF)


(B) Define the following keys.
Primary Key
Unique Key
Composite Key


Question No. 7


(A) The window has (Wl, Wr, Wb, Wt) = (10, 20, 15, 40). Viewport has (Vl, Vr, Vb, Vt) = (40, 300, 80, 400). If p(12, 25) lies on window, find the corresponding point p' (x' , y') on viewport.

(8) Given a point P (10, 10), rotate this point around Q (5, 5) at 90 degree. What will be the new point?
__________________
The Me you have always known, the Me that's a stranger still.
Reply With Quote