Junior Engineer • Paper-II
If you use either Telnet or FTP, which is the highest layer you are using to transmit data?
A)
Application
B)
Session
C)
Transport
D)
Network
To solve this question, we refer to the OSI (Open Systems Interconnection) model, which defines seven layers of network communication.
1. **Telnet (Teletype Network)** and **FTP (File Transfer Protocol)** are network protocols used for remote login and file transfer, respectively.
2. In the OSI model, these protocols operate at the **Application Layer (Layer 7)**. The Application Layer is the topmost layer and provides the interface between the software application and the network.
3. While data must pass through the lower layers (Session, Transport, Network, Data Link, and Physical) to be transmitted across a physical medium, the 'highest' layer involved in the process—where the protocol is defined and the user interacts with the service—is the Application Layer.
**Why other options are incorrect:**
- **Session Layer (Layer 5):** Manages sessions between applications, but Telnet and FTP are defined as Application layer protocols.
- **Transport Layer (Layer 4):** This layer (using TCP for both Telnet and FTP) handles end-to-end communication and error recovery, but it is lower than the Application layer.
- **Network Layer (Layer 3):** This layer (using IP) handles routing and addressing, which is significantly lower in the stack than the Application layer.
Junior Engineer • Paper-II
A set of techniques that allow to execute a program which is not entirely in memory is known as
A)
demand paging
B)
virtual memory
C)
auxiliary memory
D)
secondary memory
The question asks for the general set of techniques that allow a program to be executed even if it is not entirely loaded into the physical main memory (RAM).
1. **Virtual Memory (Correct):** This is the overarching concept and set of techniques that create an illusion for the user/programmer that a very large main memory is available. It allows the execution of processes that are larger than the physical memory by keeping only the required parts of the program in RAM and the rest on the disk.
2. **Demand Paging (Incorrect):** While demand paging is a specific implementation of virtual memory (where pages are loaded only when they are demanded/accessed), it is a *method* used to achieve virtual memory, not the name of the overall set of techniques themselves.
3. **Auxiliary Memory (Incorrect):** This is another term for secondary storage (like HDDs or SSDs). It is the hardware where the non-resident parts of the program are stored, but it is not a 'technique' for program execution.
4. **Secondary Memory (Incorrect):** Similar to auxiliary memory, this refers to the physical storage device. It provides the capacity, but the 'technique' that manages the movement of data between secondary and main memory to allow execution is Virtual Memory.
Junior Engineer • Paper-II
Arrange the words given below in a meaningful sequence: 1. Word 2. Paragraph 3. Sentence 4. Letters 5. Phrase
A)
4, 1, 5, 2, 3
B)
4, 1, 3, 5, 2
C)
4, 2, 5, 1, 3
D)
4, 1, 5, 3, 2
To arrange these words in a meaningful sequence, we must look at the hierarchical structure of language, moving from the smallest unit to the largest unit.
1. **Letters (4)**: The most basic building block of written language.
2. **Word (1)**: A group of letters combined to form a meaningful unit.
3. **Phrase (5)**: A small group of words standing together as a conceptual unit, typically forming a component of a clause.
4. **Sentence (3)**: A set of words (or phrases) that is complete in itself, typically containing a subject and predicate, conveying a statement, question, exclamation, or command.
5. **Paragraph (2)**: A distinct section of a piece of writing, usually dealing with a single theme and consisting of one or more sentences.
Therefore, the correct sequence is Letters → Word → Phrase → Sentence → Paragraph, which corresponds to the numbers 4, 1, 5, 3, 2.
Junior Engineer • Paper-II
Choose the correct alternative that will continue the same pattern and replace the question mark in the given series: 120, 99, 80, 63, 48 ?
A)
35
B)
38
C)
39
D)
40
To find the next number in the series 120, 99, 80, 63, 48, ?, we can analyze the pattern in two ways:
Method 1: Difference Analysis
- 120 - 99 = 21
- 99 - 80 = 19
- 80 - 63 = 17
- 63 - 48 = 15
The differences are 21, 19, 17, 15. This is a sequence of decreasing odd numbers. The next difference should be 13.
- 48 - 13 = 35
Method 2: Square-based Pattern
Each number in the series is 1 less than a perfect square:
- 11² - 1 = 121 - 1 = 120
- 10² - 1 = 100 - 1 = 99
- 9² - 1 = 81 - 1 = 80
- 8² - 1 = 64 - 1 = 63
- 7² - 1 = 49 - 1 = 48
Following this pattern, the next number should be:
- 6² - 1 = 36 - 1 = 35
Both methods consistently lead to the answer 35. Therefore, option (a) is correct, while options (b), (c), and (d) do not fit the established mathematical pattern.
Junior Engineer • Paper-II
In order to get the contents of a Binary search tree in ascending order, one has to traverse it in
A)
pre-order
B)
in-order
C)
post order
D)
None of these
A Binary Search Tree (BST) is defined by a specific property: for any given node, all values in its left subtree are smaller than the node's value, and all values in its right subtree are larger than the node's value.
There are three primary types of depth-first traversals:
1. **In-order Traversal (Left, Root, Right):** This traversal visits the left subtree first, then the root node, and finally the right subtree. Because of the BST property, this sequence naturally visits the elements in non-decreasing (ascending) order.
2. **Pre-order Traversal (Root, Left, Right):** This visits the root first. It is primarily used to create a copy of the tree or to get a prefix expression of an expression tree.
3. **Post-order Traversal (Left, Right, Root):** This visits the root last. It is commonly used to delete a tree or to get a postfix expression of an expression tree.
Therefore, to retrieve the contents of a BST in ascending order, an in-order traversal must be performed.
Junior Engineer • Paper-II
How do you determine the cost of a spanning tree?
A)
By the sum of the costs of the edges of the tree
B)
By the sum of the costs of the edges and vertices of the tree
C)
By the sum of the costs of the vertices of the tree
D)
By the sum of the costs of the edges of the graph
In graph theory, a spanning tree of a connected, undirected graph is a subgraph that includes all the vertices of the original graph and is a tree (meaning it is connected and has no cycles). When the edges of the graph are assigned weights (also referred to as 'costs'), the cost of a spanning tree is defined as the total weight of all the edges included in that specific spanning tree.
Step-by-step reasoning:
1. A spanning tree consists of exactly (V-1) edges, where V is the number of vertices.
2. The 'cost' of the tree is the aggregate value of these selected edges.
3. Option (b) is incorrect because vertices in standard spanning tree problems are not assigned costs; only edges are.
4. Option (c) is incorrect for the same reason as (b).
5. Option (d) is incorrect because the cost of the spanning tree is based only on the edges selected for the tree, not all edges present in the original graph.
Junior Engineer • Paper-II
If an attribute of a composite key is dependent on an attribute of other composite key, then we say that a relation is in
A)
2NF
B)
3NF
C)
BCNF
D)
1NF
To determine the correct normalization form, we must analyze the dependency described: 'an attribute of a composite key is dependent on an attribute of another composite key'.
1. **Understanding the Dependency**: In a relation with multiple candidate keys (composite keys), if a part of a candidate key (a prime attribute) is functionally dependent on something other than a superkey (such as another attribute or part of another key), it violates the requirements of Boyce-Codd Normal Form (BCNF).
2. **BCNF Definition**: A relation is in BCNF if for every non-trivial functional dependency X → Y, X is a superkey. In the scenario described, an attribute of a key is dependent on another attribute; if that determinant is not a superkey, the relation is not in BCNF.
3. **Comparison with 3NF**: 3NF allows a functional dependency X → Y if X is a superkey OR if Y is a prime attribute (part of a candidate key). Since the question specifies that the dependent attribute is part of a composite key (a prime attribute), the relation still satisfies 3NF. However, because it allows a prime attribute to be dependent on a non-superkey, it fails the stricter requirement of BCNF.
4. **Conclusion**: When a relation is in 3NF but fails BCNF specifically because a prime attribute depends on a non-superkey (which could be an attribute of another composite key), we are identifying the boundary of BCNF. Therefore, the condition described is the classic scenario used to distinguish 3NF from BCNF. The relation is in 3NF, but the presence of this specific dependency means it is NOT in BCNF. In the context of exam questions phrased this way, it is asking which normal form is being violated or which specific state the relation is in; the dependency described is the defining characteristic of a relation that is in 3NF but not in BCNF.
Junior Engineer • Paper-II
A full binary tree with n leaves contains
A)
n nodes
B)
Log n nodes
C)
2n –1 nodes
D)
2n nodes
In a full binary tree, every internal node has exactly 2 children. If the tree has n leaves, then the number of internal nodes is n−1. Therefore, total nodes = leaves + internal nodes = n + (n−1) = 2n−1. So option c is correct.
Why others are incorrect:
- a (n nodes): ignores the internal nodes, so it is too small.
- b (Log n nodes): a full binary tree does not have logarithmic total nodes in terms of leaves; the total is linear in n.
- d (2n nodes): close, but the exact count is 2n−1, not 2n.
Junior Engineer • Paper-II
Four people witnessed a mugging. Each gave a different description of the mugger. Which description is probably right?
A)
He was average height, thin, and middle-aged.
B)
He was tall, thin, and middle-aged.
C)
He was tall, thin, and young.
D)
He was tall, of average weight, and middle-aged.
This is a logical reasoning problem based on the 'majority consensus' or 'frequency of attributes' principle. When multiple witnesses provide different descriptions of the same person, the most probable description is the one that contains the attributes mentioned most frequently across all accounts.
Let's break down the attributes mentioned in the four options:
1. Height:
- Average: 1 (Option a)
- Tall: 3 (Options b, c, d)
Result: 'Tall' is the most frequent.
2. Build/Weight:
- Thin: 3 (Options a, b, c)
- Average weight: 1 (Option d)
Result: 'Thin' is the most frequent.
3. Age:
- Middle-aged: 3 (Options a, b, d)
- Young: 1 (Option c)
Result: 'Middle-aged' is the most frequent.
By combining the most frequently cited attributes (Tall + Thin + Middle-aged), we arrive at the description provided in Option b.
Junior Engineer • Paper-II
Consider the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key, FIRST_NAME VARCHAR2(25), LAST_NAME VARCHAR2(25). Which of the statement insert row into the table EMPLOYEE?
A)
INSERT INTO employees VALUES ( NULL, ‘John’,‘Smith’);
B)
INSERT INTO employees( first_name, last_name) VALUES(‘John’,‘Smith’);
C)
INSERT INTO employees VALUES (‘1000’,‘John’,NULL);
D)
INSERT INTO employees(first_name,last_name, employee_id) VALUES (1000, ‘John’,‘Smith’);
To determine the correct INSERT statement, we must analyze the table constraints: EMPLOYEE_ID is the Primary Key, FIRST_NAME is VARCHAR2, and LAST_NAME is VARCHAR2.
1. **Primary Key Constraint**: A Primary Key column cannot contain NULL values.
2. **Option (a)**: `INSERT INTO employees VALUES ( NULL, ‘John’,‘Smith’);` fails because it attempts to insert a NULL into the Primary Key column (EMPLOYEE_ID).
3. **Option (b)**: `INSERT INTO employees( first_name, last_name) VALUES(‘John’,‘Smith’);` fails because the EMPLOYEE_ID column is not specified in the column list and it is a Primary Key (which is implicitly NOT NULL). Unless there is an identity column or trigger (not mentioned here), this will result in an error.
4. **Option (c)**: `INSERT INTO employees VALUES (‘1000’,‘John’,NULL);` is correct. It provides a value for the Primary Key ('1000' will be implicitly converted to NUMBER) and allows NULL for LAST_NAME, as LAST_NAME does not have a NOT NULL constraint.
5. **Option (d)**: `INSERT INTO employees(first_name,last_name, employee_id) VALUES (1000, ‘John’,‘Smith’);` fails because the values provided do not match the column order specified. It attempts to put the number 1000 into first_name, 'John' into last_name, and 'Smith' (a string) into employee_id (a NUMBER).
Junior Engineer • Paper-II
If every transaction in the schedule reads only items that were written by committed transactions, then the schedule is said to be
A)
Cascadeless schedule
B)
Partial order
C)
Strict schedule
D)
Unstrict schedule
In Database Management Systems (DBMS), a schedule is defined as 'cascadeless' if every transaction reads only those data items that have been written by transactions that have already committed. This property ensures that if a transaction fails, it does not trigger a chain reaction (cascading aborts) where other transactions that read its uncommitted data must also be rolled back.
Analysis of options:
- (a) Cascadeless schedule: Correct. By definition, it prevents reading 'dirty data' (data written by uncommitted transactions), thus avoiding cascading rollbacks.
- (b) Partial order: This is a general mathematical/logical term and not a specific type of recovery schedule in DBMS.
- (c) Strict schedule: A strict schedule is a subset of cascadeless schedules. A schedule is strict if it not only prevents reading uncommitted data but also prevents writing to data items until the transaction that previously wrote them has committed or aborted. While all strict schedules are cascadeless, the specific definition provided in the question refers exactly to the definition of a cascadeless schedule.
- (d) Unstrict schedule: This is not a standard technical term used to define this specific property in DBMS recovery protocols.
Junior Engineer • Paper-II
A direct method of deadlock prevention is to prevent the occurrence of …………..
A)
Mutual exclusion
B)
Hold and wait
C)
Circular waits
D)
No preemption
In Operating Systems, Coffman's conditions state that four conditions must hold simultaneously for a deadlock to occur: 1. Mutual Exclusion, 2. Hold and Wait, 3. No Preemption, and 4. Circular Wait. Deadlock prevention works by ensuring that at least one of these four conditions cannot hold. While all four are targets for prevention, 'Circular Wait' is widely regarded as the most direct and practical method to prevent deadlocks in system design. This is typically achieved by imposing a linear ordering of all resource types and requiring that each process requests resources in a strictly increasing order of enumeration. This mathematically guarantees that a cycle (circular wait) cannot form in the Resource Allocation Graph.
Why other options are less 'direct' or problematic:
- Mutual Exclusion: Many resources (like printers or write-locks) are inherently non-sharable; you cannot prevent mutual exclusion without changing the nature of the resource.
- Hold and Wait: Preventing this requires a process to request all resources at once, which leads to low resource utilization and starvation.
- No Preemption: Forcing preemption (allowing the OS to take a resource away) is complex and can lead to data corruption or state loss for the process.
Junior Engineer • Paper-II
O(1) means computing time is __________________
A)
Constant
B)
Quadratic
C)
Linear
D)
Cubic
In computer science, Big O notation is used to describe the time complexity of an algorithm. O(1) denotes 'Constant Time' complexity. This means that the time required to complete the operation remains the same, regardless of the size of the input data set (n).
Breakdown of options:
- a. Constant: O(1) - The execution time does not change with input size.
- b. Quadratic: O(n²) - The execution time grows proportionally to the square of the input size (e.g., nested loops).
- c. Linear: O(n) - The execution time grows proportionally to the input size (e.g., a single loop through an array).
- d. Cubic: O(n³) - The execution time grows proportionally to the cube of the input size (e.g., triple nested loops).
Junior Engineer • Paper-II
One of the desirable properties of transaction processing is
A)
Composite attribute
B)
Cost based query optimization
C)
Atomicity
D)
Recurrence
In Database Management Systems (DBMS), transaction processing must adhere to a set of properties known as the ACID properties to ensure data integrity and reliability. These properties are:
1. Atomicity: Ensures that a transaction is treated as a single 'unit', which either succeeds completely or fails completely. If any part of the transaction fails, the entire transaction is rolled back.
2. Consistency: Ensures that a transaction transforms the database from one valid state to another.
3. Isolation: Ensures that concurrent execution of transactions leaves the database in the same state as if they were executed sequentially.
4. Durability: Ensures that once a transaction has been committed, it will remain so, even in the event of a power loss or system crash.
Analysis of other options:
- a. Composite attribute: This is a concept related to Entity-Relationship (ER) modeling (an attribute that can be divided into smaller sub-parts), not transaction processing.
- b. Cost based query optimization: This is a technique used by the database engine to determine the most efficient way to execute a SQL query, not a property of a transaction.
- d. Recurrence: This is not a standard property of transaction processing in DBMS.
Junior Engineer • Paper-II
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a
A)
queue
B)
stack
C)
tree
D)
linked list
The question describes a data structure that follows the First-In-First-Out (FIFO) principle. In a Queue, elements are added (inserted) at one end, called the 'rear' or 'tail', and removed (deleted) from the opposite end, called the 'front' or 'head'.
Analysis of options:
- a. Queue: Correct. It strictly follows the FIFO rule where insertion happens at the rear and deletion happens at the front.
- b. Stack: Incorrect. A stack follows the Last-In-First-Out (LIFO) principle, where both insertion (push) and deletion (pop) occur at the same end (the top).
- c. Tree: Incorrect. A tree is a non-linear, hierarchical data structure, not a linear list.
- d. Linked List: Incorrect. While a queue can be implemented using a linked list, a general linked list allows insertion and deletion at any position (start, end, or middle), not just at specific opposite ends.
Junior Engineer • Paper-II
An undirected graph G with n vertices and e edges is represented by adjacency list. What is the time required to generate all the connected components?
A)
O (n)
B)
O (e)
C)
O (e+n)
D)
O ( e2 )
To find all connected components in an undirected graph, the standard approach is to use a graph traversal algorithm such as Breadth-First Search (BFS) or Depth-First Search (DFS).
1. **Algorithm Process**: We maintain a 'visited' array of size n. We iterate through all vertices from 1 to n. If a vertex has not been visited, it marks the start of a new connected component. We then launch a BFS or DFS from that vertex to visit all reachable vertices in that component.
2. **Time Complexity Analysis**:
- **Vertex Visitation**: Each vertex is visited exactly once across the entire process, contributing O(n).
- **Edge Exploration**: In an adjacency list representation, for every vertex visited, we iterate through its list of neighbors. In an undirected graph, each edge (u, v) is represented twice (once in u's list and once in v's list). Thus, the total number of edge lookups is 2e, contributing O(e).
3. **Total Complexity**: The total time complexity is the sum of the time to visit all vertices and explore all edges, which is O(n + e).
**Analysis of other options**:
- **O(n)**: Incorrect, as it ignores the time needed to traverse the edges connecting the vertices.
- **O(e)**: Incorrect, as it ignores the time needed to iterate through vertices, especially in cases where the graph has many isolated vertices (where n > e).
- **O(e²)**: Incorrect, as this would be inefficient and is not the complexity of standard traversal algorithms.
Junior Engineer • Paper-II
Y is in the East of X which is in the North of Z. If P is in the South of Z, then in which direction of Y, is P?
A)
North
B)
South
C)
South-East
D)
None of these
Let's map the positions step-by-step using a coordinate system:
1. 'Y is in the East of X': If we place X at (0,0), Y is at (1,0).
2. 'X which is in the North of Z': This means Z is to the South of X. If X is at (0,0), Z is at (0, -1).
3. 'P is in the South of Z': If Z is at (0, -1), P is further south, for example, at (0, -2).
Now, we need to find the direction of P relative to Y:
- Y is at (1, 0)
- P is at (0, -2)
To get from Y to P, you must move West (from x=1 to x=0) and South (from y=0 to y=-2). Therefore, P is in the South-West direction of Y.
Reviewing the options:
a. North (Incorrect)
b. South (Incorrect)
c. South-East (Incorrect)
d. None of these (Correct, as the actual direction is South-West).
Junior Engineer • Paper-II
Deadlocks are possible only when one of the transactions wants to obtain a(n) ____ lock on a data item.
A)
binary
B)
exclusive
C)
shared
D)
Complete
In Database Management Systems (DBMS), a deadlock occurs when two or more transactions are waiting indefinitely for each other to release locks. To understand why an 'exclusive' lock is necessary for a deadlock, we must look at lock compatibility:
1. Shared (S) Locks: Multiple transactions can hold a shared lock on the same data item simultaneously. If Transaction A has a shared lock and Transaction B requests a shared lock, B is granted access immediately. No waiting occurs, so no deadlock can happen if only shared locks are used.
2. Exclusive (X) Locks: Only one transaction can hold an exclusive lock on a data item. If Transaction A holds any lock (Shared or Exclusive) and Transaction B requests an Exclusive lock, Transaction B must wait until A releases its lock.
Deadlock Scenario:
- Transaction T1 holds a Shared lock on Item X and requests an Exclusive lock on Item Y.
- Transaction T2 holds a Shared lock on Item Y and requests an Exclusive lock on Item X.
- Both are now waiting for the other to release their lock to upgrade to or acquire an Exclusive lock.
If transactions only requested Shared locks, they would all be granted access, and no one would ever be 'blocked,' making a deadlock impossible. Therefore, the requirement for an Exclusive lock (which creates mutual exclusion) is a necessary condition for a deadlock to occur.
Junior Engineer • Paper-II
Checkpoints are used for the purpose of
A)
Recovery measures
B)
Security measures
C)
Concurrency measures
D)
Authorization measures
Checkpoints are used in database recovery to reduce the amount of work needed after a failure. By periodically saving the system state, the DBMS can restart from the latest checkpoint instead of replaying the entire log from the beginning. Hence, checkpoints are a recovery measure. Authorization measures (d) deal with access control, security measures (b) with protecting data from unauthorized access or attacks, and concurrency measures (c) with controlling simultaneous transactions; none of these are the primary purpose of checkpoints.
Junior Engineer • Paper-II
The total time to prepare a disk drive mechanism for a block of data to be read from is its__________
A)
latency
B)
latency plus transmission time
C)
latency plus seek time
D)
latency plus seek time plus transmission time
The total time to prepare a disk drive mechanism to read a block of data is the sum of all access components: seek time (move the head to the correct track), rotational latency (wait for the desired sector to come under the head), and transmission time (actual data transfer). Therefore, the correct option is d: latency plus seek time plus transmission time. Option a is incorrect because latency alone does not include head movement or data transfer. Option b is incorrect because it omits seek time. Option c is incorrect because it omits transmission time.
Junior Engineer • Paper-II
Choose the correct HTML tag for the largest heading?
A)
<H1>
B)
<H6>
C)
<H10>
D)
<HEAD>
In HTML (HyperText Markup Language), heading tags are used to define the hierarchy and importance of titles on a webpage. There are six levels of headings, ranging from <h1> to <h6>.
1. <h1> (Option a): This is the highest level heading and is rendered by browsers in the largest font size by default. It is typically used for the main title of a page.
2. <h6> (Option b): This is the lowest level heading and is rendered in the smallest font size among the heading tags.
3. <H10> (Option c): This is not a valid HTML tag. HTML headings only go from 1 to 6.
4. <HEAD> (Option d): This is a structural tag used to contain metadata (like <title>, <style>, and <meta> tags) about the document; it is not used for displaying visible headings on the page.
Therefore, <h1> is the correct tag for the largest heading.
Junior Engineer • Paper-II
The loss of energy as the signal propagates outward.
A)
Attenuation
B)
Distortion
C)
Noise
D)
Baud
Step-by-step reasoning: 1. The question asks for the term describing the loss of energy as a signal travels through a medium. 2. Attenuation refers to the gradual loss in intensity of any kind of signal transmitted through a medium due to its own resistance or absorption. In networking, as a signal propagates, its amplitude decreases, which is known as attenuation. 3. Distortion (Option b) refers to the change in the shape or form of the signal, usually caused by different frequency components traveling at different speeds. 4. Noise (Option c) refers to unwanted random energy or interference that gets added to the signal from external sources. 5. Baud (Option d) is a unit of measurement for the symbol rate (modulation rate) of a signal, not a type of signal loss. Therefore, 'Attenuation' is the correct technical term.
Junior Engineer • Paper-II
Which of the following is not a key piece of information, stored in single page table entry, assuming pure paging and virtual memory
A)
Frame number
B)
A bit indicating whether the page is in physical memory or on the disk
C)
A reference for the disk block that stores the page
D)
None of these
In a system using pure paging and virtual memory, the Page Table Entry (PTE) must store specific information to map virtual addresses to physical addresses and manage demand paging.
1. **Frame Number (Option a):** This is essential. When a page is present in physical memory, the PTE must store the base address (frame number) of the physical memory frame where the page resides.
2. **Present/Absent Bit (Option b):** This is a critical control bit. It indicates whether the page is currently residing in physical RAM (Present) or is swapped out to the disk (Absent/Invalid). This bit triggers a 'page fault' if the CPU attempts to access a page not in memory.
3. **Disk Block Reference (Option c):** When the Present/Absent bit is set to 'Absent', the operating system needs to know where the page is located on the secondary storage (disk) to bring it back into memory. Therefore, the PTE (or a related structure associated with that entry) stores the disk address/block reference.
Since all three pieces of information (Frame number, Present/Absent bit, and Disk reference) are key components of a Page Table Entry in a virtual memory system, none of the options (a, b, or c) are 'not' key pieces of information. Therefore, the correct answer is 'None of these'.
Junior Engineer • Paper-II
................ is the ability of multiple process to co-ordinate their activities by exchange of information
A)
Synchronization
B)
Mutual Exclusion
C)
Dead lock
D)
Starvation
Step-by-step reasoning:
1. Analysis of the definition: The question asks for the term describing the ability of multiple processes to coordinate their activities by exchanging information.
2. Evaluating Option (a) Synchronization: In operating systems, process synchronization is the mechanism used to ensure that concurrent processes coordinate their execution to maintain data consistency and avoid race conditions. This is achieved through the exchange of signals or information (e.g., using semaphores, monitors, or message passing).
3. Evaluating Option (b) Mutual Exclusion: This is a specific property or requirement of synchronization where only one process is allowed to access a critical section at a time. It is a tool used *for* synchronization, not the general ability to coordinate activities.
4. Evaluating Option (c) Deadlock: This is a failure state where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process. It is the opposite of successful coordination.
5. Evaluating Option (d) Starvation: This occurs when a process is perpetually denied necessary resources to process its work, often due to scheduling priorities. This is a scheduling failure, not a coordination mechanism.
Conclusion: Synchronization is the overarching term for the coordination of processes.
Junior Engineer • Paper-II
If two relations R and S are joined, then the non matching tuples of both R and S are ignored in
A)
left outer join
B)
right outer join
C)
full outer join
D)
inner join
In SQL, joins are used to combine rows from two or more tables based on a related column.
1. **Inner Join**: This join returns only the rows where there is a match in both tables. If a tuple (row) in relation R does not have a matching tuple in relation S (and vice versa), those non-matching tuples are excluded from the result set. Therefore, non-matching tuples of both R and S are ignored.
2. **Left Outer Join**: This returns all tuples from the left table (R), and the matched tuples from the right table (S). If there is no match, the result is NULL on the right side. It does NOT ignore non-matching tuples from the left table.
3. **Right Outer Join**: This returns all tuples from the right table (S), and the matched tuples from the left table (R). If there is no match, the result is NULL on the left side. It does NOT ignore non-matching tuples from the right table.
4. **Full Outer Join**: This returns all tuples when there is a match in either left or right table. It preserves all non-matching tuples from both tables by filling missing values with NULLs.
Since the question specifies that non-matching tuples from BOTH relations are ignored, the correct answer is the Inner Join.