Computer Science Paper II Past Paper 2021

The Computer Science Paper II Past Paper 2021 covers memory, networks and databases. Q.2 covers addressing modes and operand addresses. Q.3 covers bitmap memory, first-fit and next-fit allocation. Q.4 covers TLB access time, address spaces, deadlock graphs and race conditions. Q.5 covers TCP against UDP, miss delivery and window size. Q.6 covers relational algebra and database gerunds. Q.7 covers morphology and color models. Q.8 closes with an HTML table, web requirements and website encryption. This file holds the Part-II sheet only.

What this paper contains

  • This file carries Part-II (the descriptive part) of the paper.
  • Part-II — attempt ONLY FOUR questions, TWO from EACH of two sections; each question carries 20 marks (Part-I holds the 20 MCQs, per the printed header)

Part-II questions

SECTION-A

Q.2 — (a) The addressing in a typical instruction format are done by using different addressing modes. Examine any five addressing modes with an example based on the contents of address field, actual address and contents of memory location. (10)
(b) The decimal value of address field in an instruction is 120. The addressing mode of the machine’s architecture is register direct and register indirect addressing. Calculate the address of corresponding operand. (5)
(c) Compare the set of addressing modes of RISC and CISC machines. Give one example of addressing modes used in RISC and CISC respectively. (5) (20)

Q.3 — Memory managed by BITMAP is shown below:
1 1 1 1 1 0
0 1 1 0 0 0
1 0 0 1 1 1
1 0 0 0 0 0
1 1 0 0 0 0
0 0 0 0 1 1
(a) Show properly filled memory according to the BITMAP where memory index starts from zero. (3)
(b) Insert a page H of size 3 allocation units in memory drawn in part ‘a’ using first-fit algorithm. Redraw memory and the BITMAP after insertion. (3)
(c) Now insert another page K of size 2 allocation units in memory drawn in part ‘b’ using next-fit algorithm. Redraw memory and the BITMAP after insertion. (3)
(d) Use linked list data structure for the above memory mapping (Only give equivalent figure). (6)
(e) Use hash table to keep track of active pages in the above memory (Only give figure). (5) (20)

Q.4 — Do as directed:
(a) Calculate effective memory access time using following data: (3)
• TLB hit ratio is 85%,
• TLB access time=20nsec
• Memory access time=115nsec
Effective memory access time = Hit rate * (TLB access time + Mem access time) + (1-Hit rate)(TLB access time + Process_table access time + Mem access time)
(b) Consider a logical address and physical address of 31 and 22 bits respectively. What will be total logical and physical address space? (4)
(c) Does resource allocation graph shown below consist of a deadlock or not? Justify with reason.
(Figure: Resource Allocation Graph) (3)
(d) What is race condition? What are the different techniques to avoid race condition in the processes? Which one is optimal and why? (10) (20)

Q.5 — (a) Compare Transmission Control Protocol and User Datagram Protocol. How they are used in wireless networks? (6)
(b) What mechanism is used by TCP to protect itself from miss delivery? (6)
(c) Calculate the TCP window size to fully utilize the line on which WAN link is 2 Mbps and RTT between source and destination is 300 msec. (8) (20)

SECTION-B

Q.6 — Consider the following database schema and write the relational algebra expression for the following queries.
Students (Stu_Reg, Stu_Name, Stu_Address)
Instructor (Ins_ID, Ins_Name, Ins_Dept_ID)
Course (Cr_Code, Cr_Title, Cr_CrHours)
Dept (Dept_ID, Dept_Name)
Results (Res_Stu_Reg, Res_Cr_Code, Res_Marks, Res_Ins_ID, Res_Grade)
(a) Write relational algebraic expression for:
(i) To display all the students details in section BSSE. (8)
(ii) To display all Instructor Names and their respective Department Names, (if an instructor is not assigned any Dept his name should be displayed as well).
(iii) To display Stu_Reg, Stu_Name, Cr_Code, Cr_Title and Res_Marks for students who got 75 or more marks.
(iv) To display Res_Stu_Reg, Ins_Name, Res_Grade for Instructors whose Dept_ID is 1.
(b) What is the concept of gerund in database? Give one example of gerund. Is this essential to eliminate gerunds from the database? If yes, how and if no, why? (12) (20)

Q.7 — (a) Write code/pseudo code to locate all of the large boxes in the image below using morphological image processing.
(Image as printed on the sheet.) (8)
(b) Is there a need for more than 1 color model? Mention different colors models and there uses. (6)
(c) Explain CMY color model, its use and how is it different from CMYK? (6) (20)

Q.8 — (a) Analyze the code and draw resulting table as drawing on the paper (8)
<table border=”1″ cellspacing=”0″>
<tr><td>1</td><td colspan=”3″>2</td></tr>
<tr><td rowspan=”2″ >3</td><td colspan=”2″>4</td><td>5</td></tr>
<tr><td>6</td><td>7</td><td>18</td></tr>
<tr><td colspan=”3″>9</td></tr>
<tr><td>10</td><td colspan=”3″>11</td></tr>
<tr><td>12</td><td>13</td><td>14</td></tr>
<tr><td rowspan=”2″ >15</td><td colspan=”2″>16</td><td>17</td></tr>
</table>
(b) What is the role of requirement engineering in web engineering? List functional and non-functional requirements for a website. (6)
(c) What are different security mechanisms used for encrypting the contents of a website? Explain one in detail. (6) (20)

Computer Science Paper II Past Paper 2022 · All Computer Science Past Papers · Computer Science Paper II Past Paper 2020