0% found this document useful (0 votes)
36 views10 pages

4th Sem Midsems Paper

The document outlines the structure and content of mid-semester examinations for various subjects including Discrete Mathematics, Operating Systems, Database Management Systems, and Object Oriented Programming using Java. Each subject includes a set of questions that students must answer, with specific instructions regarding the number of questions and the format of answers. The examination covers a range of topics, requiring students to demonstrate their understanding and application of concepts in each subject area.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views10 pages

4th Sem Midsems Paper

The document outlines the structure and content of mid-semester examinations for various subjects including Discrete Mathematics, Operating Systems, Database Management Systems, and Object Oriented Programming using Java. Each subject includes a set of questions that students must answer, with specific instructions regarding the number of questions and the format of answers. The examination covers a range of topics, requiring students to demonstrate their understanding and application of concepts in each subject area.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

B. Tech.

Semester (2023 AB & Back)


Spring 2024-2025 (SAS)
MID SEMESTER EXAMINATION, SPRING 2024-2025
Subject: Discrete Mathematics
Code: MA21002
FullMarks: 20 Time: 90 minutes

Answer any FOUR QUESTIONS including question No. 1 which is compulsory.


The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable.
All parts of a questionshould be answered at one place only,
-
Marks
Answer the following Questions
1. (a) Let pand q be the propositions "Swimming at the New Jersey shore is allowed" and "Sharks
have been spotted near the shore," respectively. Express the compound propostion ~p A
(p V¬q) as English sentences in simple form using logical equivalences.
1
(b) Express the statement 'Some drivers do not obey the speed limit using predicate and
quantifiers.
(c) Find the negation ofthe statements James is young and strong' usingDe Morgan's laws.
(d) List all the ordered pairs in the relation R = ((a, b) | a divides b} on the set
{0, 2,3,4, 6}.
1
(e) What is the co.ering relation of the partial ordering relation {(a, b) | a> b} on the set
{1,2,3,4, 6, 12)?

Write the statement 'a sufficient condition for the warranty to be good is that you 2.5
2. (a)
bought the computer less than a year ago' in the form "if p, then q" in English. Then
state the converse and contrapositive of it.
2.5
(b) Show that (p ’ r) A(q ’ r) and (p Vq) ’ rare logically equivalent.
Determine whether the relation Ron the set of all realnumbers is reflexive, symmetric, 2.5
3. (a)
antisymmetric, and/or transitive, where (x,y) E R if and only if xy > 0.
Draw the Hasse diagram of the poset((2,4,5, 10, 12, 20, 25}, ). Is it a lattice? Justify your 2.5
(b)
answer.

Find transitive closure of the relation R= {(1,2), (2,1), (2,3)} on the set {1,2,3,4}. 2.5
4. (a)
Determinewhether the following argument is correct or incorrect and explain why. 2.5
(b) never lived in a
"Everyone enrolled in the university has lived in a dormitory. Mia has
dormitory. Therefore, Mia is not enrolled in the university."
differentiablefunctions on set of real numbers 2.5
5. (a) Showthat the relation Ron the set of all
numbers x is an
consisting of all pairs (f,g) suchthat f'(*) =g')for all real
class as the function
eguivalence relation. Which functions are in the same equivalence
f (x) = x2? 6. 2.5
(b) Prove that 3n < n!, if n is an integer greater than
Sinescr
Subject Name:- Operating Systems &Code:-CS20002
Branch (s): - CSE. I[. CSCE.CSSE

SPRING MID SEMESTER EXAMINATION-2025


School of Computer Engineering
Kalinga Institute of Industrial Technology, Deemed to be University
Operating Systems
[CS20002]
Time: 1 /2 Hours Full Mark: 20

Answer Any four questions including question No.I which is compulsory.


The figures in the nargin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable and all parts ofa question should
beanswered at one place only.
1. Answer all the questions. [1 Mark X 5]
a) Three processes arrive at time zero with CPU bursts of 16, 20, and 10 milliseconds. Ifthe
scheduler has prior knowledge about the length of the CPU bursts, the minimum
achievable average waiting time for these three processes in a non-preemptive scheduler
(rounded to the nearest integer) is milliseconds.

b) The following program consists of three concurrent processes and three binary
semaphores. The semaphores are initialized as S0=1, S1-0, and S2-0.
Process PO Process P1 Process P2
while (True){ wait (S1); wait (S2);
wait (S0); release(S0); release(S0);
print(0)
release(S1);
release(S2); }
How many times will the process PO print '0"? Justify your answer.
a) At least twice b) Exactly thrice c) Exactly twice d) Exactly Once

c) The following Cprogram is executed on a Unix/Linux system:


#include<unistd.h>
int main ){
int i;
for (i-0; i<10; it+)
if (1%2==0)
fork ();
return 0;}
The total number of child processes created will be ? Give reason in
support of your answer.
d) Consider a solution for the critical section problem. The given
solution achieves mutual
exclusion and bounded waiting only. Can the solution be considered as a valid one?
Justify your answer.

e) A system is having 3 user processes P1, P2 and P3, where Pl requires 21 units of
resource R, P2 requires 31l units of resource R, and P3 requires 41 units of resource R.
The minimum number of units of R that ensures no deadlock is
Semester: IVh
Subject Name:- Operating Systems & Code:-CS20002
Branch (s): -CSE. II. CSCE. CSSE

2. Answer the following questions: (3 +2 - 5 Marks )


(1): With the help of adiagram, show and explain the transition of a process from one state to anouner
in the Five-State model.

(1): Diffèrentiate between independent processes and cooperating processes. Explain race condition
in process synchronization.
3. Answer the following questions: [3+2=5 Marks|
): Explain Producer-Consumer problem and its solution using semaphores in details.
(ii): Briefly explain the four necessary conditions for the deadlock to occur.

4. Consider the following table consisting of Process ID, Arival Time (AT), Burst Time (BT), and
Input Output Burst (IOBT). The table describes that Process 1arrives at Ounit of time and requires 4
units of burst time, then goes for 5 units of VO wait. After that, it returns to the Ready Queue to
complete the remaining burst time, i.e., 3 units. Similarly, for Process 2 and Process 3. Compute the
Average Tumaround Time and Average Waiting Time using the Round Robin Scheduling Algorithm
with a time quantum of 2 units. [5 Marks ]
PID AT BT1 IOBT BT2
1 0 4 5
2 2 10 1
3 4 3 4

5. Explain various components of a Resource Allocation Graph (RAG). Consider the following RAG
with 4 processes (p1, p2, p3, and p4) and 2 resources (r1 and r2).

p1

r2

p3 p4

Based on the given RAG, check whether the system is in safe state or not? If yes, give the safe
sequence. [5 Marks ]

*** Best of Luck ***


SPRING MID SEMESTER EXAMINATION-2025
School of Computer Engineering
Kalinga Institute of Industrial Technology, Deemed to be University
Database Management System
Time: 1 /2 Hours
CS20006/ 1T20006/ CC20006/CM20006/ CS2004
Full Mark: 20

Answer Any four


The figures in the margin inicate questions including question No.1 which is
full marks, Candidates are required togivecompulsory.
words as far as practicable and all parts of a question should be their answers in their Own
answered at one place onjy.
1. Answer all the
questions. |I Mark X5]
a. Using Armstrong's axioms, prove that if A-+B and BC’D then
b. We can convert weak entity sets into
AC-’D.
strong entity sets by simply adding the appropriate
attributes. Then, why are weak entity sets needed?
C. What are recursive relationships? Give one
example where this is required.
d. Explain the difference between two-tier and
three-tier application architectures. Which is
better suited for web applications?
e. Consider a relation R with attributes fa, a, a3,
aj, a5} and a4 as the primary key.
Determine the total number of super keys for relation R.

2. An educational institute database needs to store information about faculty members


by faculty-id, with faculty-name, doj, and specialization as attributes); (identified
departments
dept-id, with dept-name as attributes); projects (identified by proj-id, with (identified by
location as attributes) and children of faculty members (with child-name and proj-name, proj
attributes). A department can have many faculty members and faculty member can teach child-age as
in more
than one department. Faculty members can work on different projects.
A department can have many projects and a project can belong to at most one department.
Each
department is managed by one HOD, who is a faculty member. A child must be identified
uniquely by name when the parent (who is a faculty member; assume that only one parent works
for institute) is known. We are not interested in information about a child one the parent leaves
the institute.
Answer the following questions
i)Draw the ER diagram that captures the above information.
i) Translate the ER diagram intorelations. Also identify the primary key and foreign
keys. [3+2 Marks]

3. Explain the Database System Architecture and its significance of cach level, support your
explanation with a diagram. [5 Marks ]
Subject Name: ((OP& Cade(S200C

4. Consider the following relational database schema consisting of the four


relation schemas:
passenger ( pid, pname, pgender, pcity)
agency ( aid, aname, acity)
flight (fid, fdate, time, src, dest)
booking (pid, aid, fid, fdate)
Answer the following questions using relational algebra queries or SQL;
a. Find the agency namnes for agencies that located in the same city as passenger with
passenger id 123.
b. Get the details about all flights from Chennai to New
Delhi.
C. Find only the flight numbers for passenger with pid 123 for flights to Chennai before
06/11/2020.
d. Find the passenger names for passengers who have bookings on at least one flight.
e. Find the passenger names for those who do not have any bookings in any flights.
[1 Marks X5]

5. Consider two entity sets A and Bthat both have the attribute X (among others whose names are
not relevant to thisquestion).
a. If the two X's are completely unrelated. How should the design be improved?
b. If the two X's represent the same property and it is one that applies both to Aand to B.
How should the design be improved? Consider three sub-cases.
i. X is the primary key for A but not B
ii. X is the primary key for both A and B
iii. X is not the primary key for A nor for B
[2+3 Marks]

*** Best of Luck ***


Semester: 4th
Code:-CS20004
Subject Name: (00PJ &
Branch (9): - B.Tech

SPRING MID SEMESTER EXAMINATION-2025


School of Computer Engineering
Kalinga Institute of Industrial Technology, Deemed to be University
Object Oriented Programming using Java
[CS20004]
Time: 1 1/2 Hours Full Mark: 20

Answer Anyfour questions including question No.I which is compulsory.


The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable and all parts of a
question should be answered at one place only.

1. Answer all the questions. |1 Mark X5]


a) Explain the significance of static variables and methods in Java. Discuss how static variables help in
maintaining shared data among multiple objects.
b)Can a class be both final and abstract? Jusify your answer.

c) Find and explain the output.


class Test {
public static void main(String args[]) {
float f-1.2;
boolean b=1;
System.out.println();
System.out.printin(b);
}}

d) Find and explain the output.


class H {
public static void main(String args[)) {
System.out.printin(fun());

int fun() {
return 20;

Explain your answer.


e) Can the "main" method be overridden and overloaded in Java?
Semester: 4th
Subject Name: 00PJ & Code:-cS20004
Branch (s): - B.Tech

2 [3+2-5 Marks ]
a) Write a Java program to create a class known as BankÁccount with the member variables account
number. account holder name, balance and member methods deposit(), withdraw(). Create a subclass
called Saving Account and RecuringAccount that overrides the withdraw() method to prevent
withdrawals if the account balance falls below one thousand for saving account and two thousand for
recuring account. Define the Driver class (a class that contains main method) to test and also to
display the current balance.
b) Write a class to create a copy of a previously existing object present for the same class.
[3+2-5 Marks ]
a) Define two user defined exception class named InvalidNameException and InvalidDOBException.
Create a class KIITEE2025 which holds data members name, dd, mm, yyyy and a method
getApplicantDetails() to accept name and date of birth of KIITEE2025 applicants, and display the
details. The getApplicantDetails() method should able to handle above user defined exceptions.
InvalidNameException is thrown, if length of name is less than 2 and InvalidDOBException is thrown,
if yyyy is greater than 2010 or less than 1970. Write a complete java program to implement the above
scenario.

b) Write aprogram in Java to create an interface Flyable with an abstract method fly) and Swimmable
is another interface with an abstract method swim(). Bird class implements both Flyable and
Swimmable interfaces, providing concrete implementations for fly) and swim) methods. n the Main
class, an object of Bird is created, and both fly) and swim) methods are called to demonstrate the
implementation of multiple interfaces.
4. [3+2-5 Marks ]

a) Write aprogram that prompts the user to input two numbers, frst and diff. The program then creates a
one dimensional array of 10elements and initializes them with an arithmetic sequence. The first number
of the sequence is the first value and the next number is generated by adding the diff to the number
preceding it. This formula is repeated for the rest of the sequence. E.g. if first =11 and diff= 4, then the
arithmetic sequence willbe 11, 15, 19, 23, 27, 31 ... and so on.
members
b) Create a package Department having a class Student. The students class is having the data
name, semester, branch, roll-no, and cgpa. The class is also having a constructor and a show) method
which is used to display the various attributes of student object. Finally design an application class
Demo where the above package is imported and functionality of Student class is tested.
5
[3+2=5 Marks ]
a class Bank having
a) Is dynamic method dispatch necessary in java? Write a program in java to Create
HDFC, ICICI, BOI with
ROI data member and find ROI) member function. Derive three classes
method dispatch
find ROI0 function and find the rate of interest of different Banks using dynamic
concept.
facilitates abstraction?
b) What is abstraction? How encapsulation, polymorphism and inheritance
Explain with proper examples.

Best of Luck ***


B.Tech, Spring2025
SPRING MID SEMESTER EXAMINATION-2024-25 Semester: 4th Semester. Branch: CSE
Subject: Economics of Development
Subject: Economics of Development Code: HS20120
Code: HS20120

Full Marks: 20 Time: 90 mins

Answer any FOUR QUESTIONS includingquestion No. 1which is


compulsory.The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable and all
parts of a question should be answered at one place only

Q.1 Answer the following questions Marks

a Differentiate between Economic Growth and Economic Development. 1


b What is Infant Mortality Rate? 1
c) What do 0 and 1values in Gini Coefficient imply? 1
d) Define steady state growth according to Adam Smith. 1
e Define Human Development Index (HDI). Write down the indicators of 1
HDI.

Q.2 Define Economic Development. Discuss any two indicators of Economic 5


Development.
Q.3 What is Physical Quality of Life Index (PQLI)? Discuss different indicators
of PQLI. Write any two advantages of PQLI.

Describe the following ideas of Adam Smith necessary for Economic 5


Q4
Development of a country:
(i)Natural law
(i)Division of labour

Q.5 W.W. Rostow has given linear stages of Economic Growth that every 5
country has to pass through. In view of this, briefly explain these stages of
economic growth with their important characteristics.

k *** * **
Code:-CS21002
Subject Name:- (OA&
Branch (s): -CSE

SPRING MIDSEMESTER EXAMINATION-2025


School of Computer Engineering
Kalinga Institute of Industrial Technology, Deemed to be University
Subject Name: Computer Organization and Architecture
Time: 1 /2 Hours
[Subject Code: CS21002]
FullMark: 20

Answer Any four questions including guestion No.l which is


The figures in the margin indicate full marks. compulsory.
Candidates are required to give their answers in their own words as far as
question should be answered at one place only.practicable all parts ofa
and

1.
Answer all the questions. [1 Mark X5]
a) What is the final value of R5, R6, the carry flag and
the sign flag after executing the
instruction?
Compare RS, R6 // R6 is the destination
(Initially value of R5=100, R6-200]
b) What will be the value of PC, after the
branch instruction is executed?
(initial value of R1 = 90, R2 = -120)
3050 ADD R1,R2
3054 Branch<=01000
3058 Next Instruction

c) Write the total number of memory


references required to execute following instructions
POP M
XOR R5, (R6)+
d) Hardwired control unit is relatively
inflexible" Justify the statement.
e) Let RI and R2 two 4-bit register that stores no in 2's
R1 + R2. Which of the following values gives overflow?
complement for operation
RI= 1111 R2=1101
R1=1110 R2=1100
R1=1000 R2=1100
R1=1010 R2=1110

2. a) Represent a number (-111) in little endian and big endian format, where starting at
address 1000.
The machine is byte-addressable and each word consists of 2 bytes. 2 Marks]
b)Consider the stack pointer SP contains 6000 and keeping a value 500 in top of the stack. What are the
content of PC, SP, and the top of the stack, in the following conditions? Assume Memory Word Size is
of 4-bytes long and stack grows in decreasing order of addresses. [3 Marks]
i) After the subroutine call instruction is executed in the main program
Semester: 4"
Subject Name:- COA & Code:-CS21002
Branch (s): - CSE

) After thc subroutine call instruction is executed in the subroutine SUBI


i) After the return from SUB2 subroutine
iv) After the return from SUB1subroutine
Main Routine SUB-1 SUB-2
1000:: Mul R1, R2 2000:: OR R11, R12 3000:: ANDR8, R9
1004 :: Sub R4, R5 2004 : CALL SUB2 3004:: Div R10, R12
1008:: CALL SUB1 2008:: Return 3008 Return
1012:: Add R3, R6

3. a) Assume that each memory word consumes 4 bytes and the machine is byte addressable. The
memory stores numbers from 1to 20 sequentially starting from memory location 2000. The registers RI
and R2 contain values 10 and 20 respectively.
() Move #2000, RO
(i) Add R1,4(R0)
(ii) Add #4, RO
(iv) Add 4(R0), R2
(v) Move R2, 8(RO)
Find out the contents of the first five word locations starting at 2000 after executing the above
instructions. [2 Marks]
b) Explain the multi-bus CPU architecture, detailing all its components with a clear diagram. Also, write
the sequence of control steps required to execute the following instruction using a 3-bus CPU
architecture. [3 Marks]
MUL 40RI), R2, R3
4. a) Explain the following instructions with examples: [2 Marks]
i) Call ii) CMP ii) TST iv) Negate
a) Write an assembly language program to derive the expression X = C(O+M)+P*UT+(E*R) [3
Marks]
i) in a stack based computer with zero address instructions.
ii)in an accumulator based CPUwith one address instructions.
ii)in a RISC based computer with 2 address instruction
S.(a) Explain the working principle of Hardwired control unit design along with aneat diagram. What
are its advantages over the Microprogrammed control approach? [2 Marks]
(b) Write the sequence of control steps for the given instructions and design the logic function and
circuit for END controlsignal with reference to given instructions using Single-Bus CPU Organization.
|Assume the length of each instruction is 1word, Iword= 4bytes, machine is byte addressable. Assume
2Md operand is the destination]. [3 Marks]
BRANCH>0
ii) CALL SUB

Best ofLuck ***

You might also like