Previous Year Solved
Previous Year Solved
Clustering support refers to enabling multiple servers or systems to work together as a single unit to
ensure high availability, fault tolerance, and scalability in distributed systems. Example: Database
clustering for load balancing.
The Domain Name System (DNS) translates human-readable domain names (e.g.,
www.example.com) into IP addresses (e.g., 192.168.1.1) for network communication.
Swap space is used as a backup for RAM to store inactive pages or processes when physical memory
is full. It helps run larger programs by extending memory virtually but can slow down performance.
User Datagram Protocol (UDP) is a connectionless transport layer protocol that allows fast,
lightweight data transmission without guaranteeing delivery, order, or reliability. Example: Streaming
and gaming.
A critical section is a block of code that accesses shared resources (e.g., variables, files). It is crucial to
ensure mutual exclusion, preventing race conditions and data inconsistency in concurrent
programming.
6. What is a firewall?
A firewall is a security system that monitors and controls incoming and outgoing network traffic
based on predefined rules. It acts as a barrier to block unauthorized access to or from private
networks.
Thread Local Storage (TLS) allows threads in a multi-threaded program to store data unique to each
thread. It ensures data isolation, preventing data conflicts among threads.
9. Summarize the working principle of Belady's anomaly in the page replacement algorithm.
Belady's anomaly occurs when increasing the number of page frames leads to more page faults in
FIFO (First-In, First-Out) page replacement, contrary to intuition. This happens due to suboptimal
eviction decisions.
10. Compare and contrast "thrashing" & "overcommitting" in the virtual memory system.
11. Summarize the significance of "fork()" and "exec()" system calls in UNIX-like Operating
Systems.
• exec(): Replaces the current process image with a new one (i.e., runs a new program in the
same process space).
Left recursion occurs in a grammar rule where the leftmost symbol in a production can derive itself,
causing infinite recursion in top-down parsers. Example: A → Aα | β. Fixed by converting to A → βA',
A' → αA' | ε.
13. In which OSI Layer does the header and trailer add?
Every entity in the set participates in the Some entities in the set participate in the
Definition
relationship. relationship.
Metadata is "data about data," providing information like structure, format, or properties of data.
Example: In a database, metadata includes table names, column types, and constraints.
5 Marks
The error in the expression a = bc; will be encountered during the Semantic Analysis phase of the
compilation process.
Explanation:
o Lexical Analysis: Breaks the input into tokens. Here, a, =, b, c, and ; are identified as
tokens. No error is detected since the tokens are valid.
o Syntax Analysis: Checks if the arrangement of tokens follows the grammar rules. In
this case, the syntax (a = bc;) is grammatically valid, so no error is detected.
o Semantic Analysis: Checks for semantic correctness, such as type compatibility and
variable definitions. The error occurs here if:
▪ a is not defined.
o The Lexical Analysis phase only identifies tokens and doesn’t check their meaning or
context.
o The Syntax Analysis phase checks the structure of the code but doesn’t evaluate
data types, variable definitions, or operations.
o The error depends on understanding the meaning and type context, which is the
responsibility of Semantic Analysis.
Key Reason:
Errors like undeclared variables, type mismatches, or invalid operations require context and type
information, which are unavailable in earlier phases. Hence, this error is detected during Semantic
Analysis.
Theta Join in DBMS
A Theta Join is a type of join operation that combines rows from two tables based on a condition
involving a comparison operator. The condition can use operators such as =, <, >, <=, >=, or !=. It is
more general than an Equi Join, which only uses the = operator.
Syntax
sql
Copy code
SELECT *
FROM Table1
JOIN Table2
Example
Table: Employees
1 Alice 101
2 Bob 102
3 Carol 103
Table: Departments
101 HR 50000
102 IT 100000
Query: Find all Employees whose Department Budget is greater than 70,000
sql
Copy code
JOIN Departments
Result
2 Bob IT 100000
Key Points
1. The Theta Join uses the condition Departments.Budget > 70000 in addition to the equality
condition Employees.DeptID = Departments.DeptID.
A Theta Join is a type of join operation that combines rows from two tables based on a condition
involving a comparison operator. The condition can use operators such as =, <, >, <=, >=, or !=. It is
more general than an Equi Join, which only uses the = operator.
Syntax
SELECT *
FROM Table1
JOIN Table2
Example
Table: Employees
1 Alice 101
2 Bob 102
EmpID EmpName DeptID
3 Carol 103
Table: Departments
101 HR 50000
102 IT 100000
Query: Find all Employees whose Department Budget is greater than 70,000
FROM Employees
JOIN Departments
Result
2 Bob IT 100000
Key Points
1. The Theta Join uses the condition Departments.Budget > 70000 in addition to the equality
condition Employees.DeptID = Departments.DeptID.
• Definition: A router is a networking device that forwards data packets between computer
networks. It determines the best path for data to travel across networks based on IP
addresses.
• Key Functions:
Subnets
• Purpose:
• Example: A company divides its network into subnets for HR, IT, and Finance.
Switched Bridges
• Definition: A switched bridge (or simply a switch) is a networking device that connects
multiple devices in a LAN and uses MAC addresses to forward data only to the intended
recipient.
• Key Characteristics:
Comparison:
Layer Network Layer (Layer 3) Logical subdivision of IPs Data Link Layer (Layer 2)
Feature Router Subnet Switched Bridge
Traffic Scope Between networks Within a network Within a LAN (limits broadcast)
Each of these components plays a crucial role in modern networking, helping to manage, segment,
and direct traffic for optimal performance and security.
Foreign Key
A Foreign Key is a column (or a set of columns) in one table that serves as a link to the Primary Key
in another table. It establishes a relationship between the two tables and ensures referential
integrity by enforcing a rule that the value in the foreign key column must match a value in the
referenced table's primary key.
Key Concepts:
1. Referential Integrity:
o Ensures that the foreign key value in one table corresponds to an existing value in
the primary key column of the referenced table.
o Prevents orphan records (rows in a table that refer to nonexistent rows in another
table).
2. Parent-Child Relationship:
o The table containing the primary key is called the Parent Table.
o The table containing the foreign key is called the Child Table.
3. Enforcement:
o Foreign key constraints ensure data consistency and enforce business rules.
A Virtual Private Network (VPN) is a secure connection between a user’s device and another
network over the internet. It creates an encrypted tunnel that ensures privacy and security for data
transmitted across the network.
1. Privacy:
o Hides the user’s IP address and location by routing traffic through the VPN
server.
2. Security:
o Encrypts data, making it unreadable to hackers or unauthorized entities.
3. Bypass Restrictions:
o Allows users to access geo-blocked content by masking their location.
4. Anonymity:
o Users can browse the internet without revealing their identity.
1. When you connect to a VPN, your internet traffic is routed through an encrypted tunnel to a
VPN server.
2. The VPN server forwards your request to the internet, masking your original IP address.
3. Responses from the internet pass back through the VPN server to your device securely.
• Data Protection: Prevents ISPs, advertisers, or hackers from tracking your online activities.
VPNs play a vital role in enhancing privacy, security, and accessibility in today’s interconnected world.
10 Marks
To find the candidate keys of a relation R=(A,B,C,D,E,H)R = (A, B, C, D, E, H) with the functional
dependencies:
1. A→BA \to B
2. BC→DBC \to D
3. E→CE \to C
4. D→AD \to A
The candidate key is the minimal set of attributes whose closure includes all attributes in RR.
The closure of a set XX (denoted X+X^+) is all attributes that can be functionally determined from
XX.
4. D→AD \to A: Knowing DD, you can determine AA, which also determines BB (via A→BA \to
B).
• Single attributes:
• Minimal key: The smallest set of attributes whose closure includes {A,B,C,D,E,H}\{A, B, C,
D, E, H\} is DEHDEH.
Candidate Keys:
Given:
• Network: 16.0.0.0/816.0.0.0/8
o Formula: 2n≥5002^n \geq 500, where nn is the number of bits borrowed for
subnetting.
3. Subnet mask:
▪ 11111111.11111111.10000000.0000000011111111.11111111.10000000.00
000000
▪ 255.255.128.0255.255.128.0
o 215=32,7682^{15} = 32,768
Final Answer: