Loading more MCQs...

βœ“
βœ—
β†’

JKSSB Core Computer Science MCQs

This subject has only 13 questions β€” full access available to everyone.
Question 1 of 13

Consider the following three statements regarding Process State Transitions:

Statement I: A process transitions from the 'Running' state to the 'Ready' state when a timer interrupt occurs in a preemptive scheduling system.

Statement II: A process transitions from the 'Running' state to the 'Waiting' (or Blocked) state when it issues an I/O request.

Statement III: A process can transition directly from the 'Waiting' state back to the 'Running' state the moment its I/O operation is completed.

Which of the statements given above are correct?

Explanation

Statements I and II are true and represent standard state transitions. Statement III is false because a process cannot go directly from 'Waiting' to 'Running'. Once the I/O is complete, it must first be moved to the 'Ready' queue to wait its turn for the CPU to be allocated by the scheduler

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11313

Question 2 of 13

Thrashing in an operating system occurs when:

Explanation

Thrashing happens when the working set of a process is not currently in memory, causing continuous page faults and disk I/O. This severely degrades system performance because the CPU spends its time swapping pages in and out rather than executing instructions.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11312

Question 3 of 13

What is the binary equivalent of the decimal fraction 0.625?

Explanation

Multiply the fraction by 2 iteratively and collect the integer parts from top to bottom:

0.625 * 2 = 1.25 (integer part 1)

0.25 * 2 = 0.50 (integer part 0)

0.50 * 2 = 1.00 (integer part 1)

Reading the integers from top to bottom gives 0.101.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11311

Question 4 of 13

Which memory management scheme strictly suffers from external fragmentation rather than internal fragmentation

Explanation

Segmentation divides memory into variable-sized chunks based on the logical divisions of a program. Over time, as segments are loaded and removed, it leaves small, unusable holes of memory scattered around, causing external fragmentation. Paging, on the other hand, uses fixed-size blocks and suffers from internal fragmentation.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11310

Question 5 of 13

Match the deadlock-related concepts in List I with their most accurate descriptions in List II.

List I (Concept)

A. Deadlock Prevention

B. Deadlock Avoidance

C. Deadlock Detection

D. Circular Wait

List II (Description)

1.A necessary condition for deadlock where a closed chain of processes exists, each holding at least one resource needed by the next process in the chain.

2.A strict, proactive strategy designed to ensure that at least one of the four necessary conditions for a deadlock can never hold.

3.A strategy (utilizing tools like Banker's Algorithm) that dynamically assesses each resource request to ensure the system always remains in a "safe state."

4.A permissive strategy that allows the system to enter a deadlocked state, identifies it using tools like a wait-for graph, and then initiates recovery.

Select the correct matching code from the options below:

Explanation

Deadlock Prevention (A) pairs with (2) because it strictly constraints how requests can be made to invalidate conditions like "Hold and Wait" or "Circular Wait" from the very beginning.

Deadlock Avoidance (B) pairs with (3) because it requires the OS to look at future resource needs and dynamically calculate if granting a request keeps the system in a safe state.

Deadlock Detection (C) pairs with (4) because it does not stop deadlocks from happening; instead, it periodically runs an algorithm to find cycles and then kills processes or preempts resources to recover.

Circular Wait (D) pairs with (1) as it is the exact definition of the 4th necessary Coffman condition for a deadlock to occur.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11309

Question 6 of 13

Consider the following statements regarding the Coffman Conditions for deadlock:

1.The four necessary and simultaneous conditions for a deadlock to occur are: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.

2.The "Deadlock Prevention" strategy works by ensuring that the operating system structurally invalidates at least one of these four conditions.

3.The "No Preemption" condition states that the operating system has the absolute authority to forcibly seize resources from a running process if another high-priority process requires them.

Which of the statements given above is/are correct?

Explanation

Statements 1 and 2 are correct. Statement 3 is the exact opposite of the condition. "No Preemption" means that a resource cannot be forcibly taken away by the OS; it can only be released voluntarily by the process holding it after that process has completed its task.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11308

Question 7 of 13

Match the memory management concepts in List I with their most accurate descriptions in List II.

List I (Concept)

A. Paging

B. Segmentation

C. Compaction

D. Thrashing

List II (Description)

1.Memory is divided into variable-sized units that align closely with the programmer's logical view of the program.

2.A severe performance degradation state where the system spends more time swapping pages than executing processes.

3.Divides the logical address space into fixed-size blocks to completely eliminate external fragmentation.

4.A dynamic memory allocation technique used to overcome external fragmentation by shuffling memory contents together.

Select the correct matching code from the options below:

Explanation

Paging (A) pairs with (3) because its defining characteristic is breaking logical memory into fixed-size blocks (pages) to fit into physical frames, removing the need for contiguous allocation.

Segmentation (B) pairs with (1) because it divides memory based on the logical structure of the program (like functions and arrays), which results in variable-sized blocks.

Compaction (C) pairs with (4) as it is the process of physically moving active processes in memory to consolidate all free space into one large, usable block.

Thrashing (D) pairs with (2) as it defines the scenario where high page fault rates cause the OS to constantly read/write to the disk, halting actual CPU progress.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11307

Question 8 of 13

If an arithmetic equation 41 - 22 = 15 is mathematically correct, what is the base (radix) of the number system being used?

Explanation

Set up the equation using positional notation with an unknown base b: (4b + 1) - (2b + 2) = (1b + 5). Simplifying this gives 2b - 1 = b + 5, which solves mathematically to b = 6.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11306

Question 9 of 13

Consider the following statements regarding how overflow manifests and is detected in binary arithmetic:

1.In signed binary representations, an overflow condition often manifests as a "sign reversal" error, where adding two large positive numbers inadvertently alters the Most Significant Bit (MSB), producing a negative result.

2.At the hardware circuit level for 2's complement addition, an overflow is detected when the carry generated into the sign bit is different from the carry generated out of the sign bit.

3.In a 2's complement system, generating a "carry out" from the Most Significant Bit (MSB) automatically means an overflow error has ruined the calculation.

Which of the statements given above is/are correct?

Explanation

Statements 1 and 2 are correct descriptions of how overflow acts and is detected by hardware (via an XOR gate on the carries). Statement 3 is incorrect. In 2's complement math, a carry out of the MSB is perfectly normal and is usually just discarded. For example, adding -1 (1111 1111) and -1 (1111 1111) yields 1 1111 1110. The carry out is discarded, leaving 1111 1110 (-2), which is a valid, correct result with no overflow.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11305

Question 10 of 13

Consider the following statements regarding the fundamental definition and conditions of arithmetic overflow:

1.Arithmetic overflow occurs when the result of a mathematical operation produces a value that exceeds the maximum or falls below the minimum representable limit of the allocated storage format (e.g., an 8-bit register).

2.In a 2's complement signed number system, an overflow can only potentially happen when adding two numbers that have the exact same sign (both positive or both negative).

3.If an arithmetic logic unit (ALU) adds a positive binary number to a negative binary number, a computational overflow is highly likely to occur.

Which of the statements given above is/are correct?

Explanation

Statements 1 and 2 are correct. Overflow is a capacity issue, and when adding numbers of the same sign, the result might exceed the storage capacity. Statement 3 is incorrect. When adding numbers with opposite signs (one positive, one negative), the magnitude of the result will always be smaller than the larger of the two operands. Therefore, overflow is mathematically impossible when adding numbers of opposite signs.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11304

Question 11 of 13

Consider the following statements regarding Octal and Hexadecimal conversions:

To convert a binary number directly into an octal number, you must group the binary bits into sets of three, starting from the rightmost (least significant) bit.

In the hexadecimal number system, the decimal value 15 is represented by the alphabetical letter 'E'.

Hexadecimal is heavily utilized in computer memory addressing because exactly two hexadecimal digits can perfectly represent one byte (8 bits) of data.

Which of the statements given above is/are correct?

Explanation

Statements 1 and 3 are correct. Grouping by 3 bits translates directly to base-8, and two hex digits (4 bits each) make an 8-bit byte. Statement 2 is incorrect. In hexadecimal, counting from 10 starts at A. Therefore, 10=A, 11=B, 12=C, 13=D, 14=E, and 15=F.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11303

Question 12 of 13

Consider the following statements regarding Binary Coded Decimal (BCD) and Gray Code:

1.In Binary Coded Decimal (BCD), each individual decimal digit of a base-10 number is represented separately by its own 4-bit binary sequence.

2.Gray code is a weighted number system, meaning each bit position holds a specific mathematical value like 1, 2, 4, or 8.

3.The primary advantage of Gray code is that only a single bit changes its state when transitioning from one number to the next sequential number.

Explanation

Statements 1 and 3 are correct. BCD translates digits one by one (e.g., 45 becomes 0100 0101), and Gray code minimizes hardware transition errors by changing only one bit at a time. Statement 2 is incorrect because Gray code is an unweighted code; the positions of its bits do not hold inherent place values.

Background:

The Systems

Binary (Standard): The native language of computers. It converts a whole decimal number into a single sequence of 0s and 1s based on powers of 2 (1, 2, 4, 8, etc.).

Example: The decimal number 15 is 1111 in binary.

BCD (Binary-Coded Decimal): A system that translates each individual digit of a decimal number into its own 4-bit binary chunk, rather than converting the whole number at once.

Example: For the decimal 15, the '1' becomes 0001 and the '5' becomes 0101. So, 15 in BCD is 0001 0101. It is easier for humans to read but takes up more computer memory.

Gray Code: A special binary sequence where only one single bit changes when you go from one number to the next. In normal binary, going from 3 (011) to 4 (100) flips three bits at once, which can cause reading errors in physical hardware sensors. Gray code prevents this.

2. Conversions (Binary and Gray)

To convert between the two, you use a logic rule called XOR (Exclusive OR). In simple terms:

If you compare two bits and they are the SAME (0 and 0, or 1 and 1), the result is 0.

If you compare two bits and they are DIFFERENT (1 and 0, or 0 and 1), the result is 1.

How to Convert Binary to Gray Code

Bring down the first bit: The leftmost bit (Most Significant Bit) of your Gray code is exactly the same as the first bit of your Binary number.

Compare neighbors: To find the next Gray bit, look at the Binary number. Compare the current Binary bit with the Binary bit immediately to its left.

Apply the rule: Same = 0, Different = 1. Repeat this down the line.

Example: Convert Binary 1010 to Gray

1st bit: Bring down the 1. (Gray starts with 1)

2nd bit: Compare Binary bits 1 and 2 (1 and 0). They are different, so write 1.

3rd bit: Compare Binary bits 2 and 3 (0 and 1). They are different, so write 1.

4th bit: Compare Binary bits 3 and 4 (1 and 0). They are different, so write 1.

Result: Binary 1010 = Gray 1111.

How to Convert Gray Code to Binary

Bring down the first bit: The leftmost bit of your Binary number is exactly the same as the first bit of your Gray code.

Compare diagonally: To find the next Binary bit, compare the current Gray bit with the Binary bit you just calculated.

Apply the rule: Same = 0, Different = 1. Repeat this down the line.

Example: Convert Gray 1111 to Binary

1st bit: Bring down the 1. (Binary starts with 1)

2nd bit: Compare the next Gray bit (1) with the Binary bit you just wrote (1). They are the same, so write 0.

3rd bit: Compare the next Gray bit (1) with the newest Binary bit (0). They are different, so write 1.

4th bit: Compare the next Gray bit (1) with the newest Binary bit (1). They are the same, so write 0.

Result: Gray 1111 = Binary 1010.

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11302

Question 13 of 13

Consider the following statements regarding 1's and 2's complement representation:

​The 1's complement of a binary number is obtained by simply inverting all its bits, changing every 0 to a 1 and every 1 to a 0.

​The 2's complement of a binary number is calculated mathematically by adding 1 to its 1's complement.

​In an 8-bit 2's complement system, the binary sequence 1111 1111 represents the decimal number -128.

​Which of the statements given above is/are correct?

Explanation

Statements 1 and 2 are correct definitions of the complement operations. Statement 3 is incorrect. In an 8-bit 2's complement system, 1111 1111 represents the decimal number -1. The value -128 is represented by 1000 0000.

BACKGROUND:

Here we talk about Signed binary numbers. In unsigned binary number all bits represent value but in signed binary numbers leftmost number represent sign.

In 8-bit, the leftmost bit determines the sign (0 for positive, 1 for negative), and the remaining 7 bits hold the value.

In 8-bit, the leftmost bit determines the sign (0 for positive, 1 for negative), and the remaining 7 bits hold the value.

1. Sign-Magnitude (Normal Binary)

It works just like adding a + or - sign in front of a number.

Positives: Start with 0. (e.g., +5 is 00000101)

Negatives: Start with 1. The rest stays the same. (e.g., -5 is 10000101)

The Problem: Has two zeroes (00000000 for +0 and 10000000 for -0).

8-bit Range: -127 to +127.

2. 1's Complement

Negatives are made by simply flipping every single bit of the positive number (0 becomes 1, 1 becomes 0).

Positives: Same as normal binary. (+5 is 00000101)

Negatives: Flip all bits of +5. (-5 is 11111010)

The Problem: Still has two zeroes (00000000 for +0 and 11111111 for -0).

8-bit Range: -127 to +127.

3. 2's Complement (The Modern Standard)

Negatives are made by flipping all bits and then adding 1. This fixes the double-zero problem and is what modern computers use.

Positives: Same as normal binary. (+5 is 00000101)

Negatives: Flip all bits of +5 (11111010), then add 1. (-5 is 11111011)

The Benefit: Only one zero (00000000). Because we lose "-0", we gain an extra negative number.

8-bit Range: -128 to +127.

The range of numbers that can be represented by the above number Systems can be represented by following

Sign-Magnitude: -(2^{n-1} - 1) to +(2^{n-1} - 1)

1's Complement: -(2^{n-1} - 1) to +(2^{n-1} - 1)

2's Complement: -2^{n-1} to +(2^{n-1} - 1)

Report an error

Describe the issue with this question. Our team will review it.

Question ID: 11301

Login to view more questions

Login to Continue
This subject has only 13 questions β€” full access available to everyone.