Tag: operating systems

Questions Related to operating systems

  1. two processes unknowingly wait for resources that are held by each other

  2. two processes wait for the same resource

  3. all resources are shared

  4. two processes share the same shared resource


Correct Option: B

Dirty bit for a page in a page table

  1. helps avoid unnecessary writes on a paging device

  2. helps maintain LRU information

  3. allows only read on a page

  4. None of the above


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of a dirty bit in a page table.

A dirty bit, also known as a modified bit or write bit, is a flag that is set when a page in the page table has been modified or written to. It helps the operating system track which pages have been modified and need to be written back to the backing store (such as disk) to keep the data consistent.

Now let's go through each option to understand why it is correct or incorrect:

Option A) Helps avoid unnecessary writes on a paging device - This option is correct because the dirty bit allows the operating system to avoid unnecessary writes to the backing store. If a page has not been modified (dirty bit is not set), there is no need to write it back to the disk, reducing the number of write operations and improving performance.

Option B) Helps maintain LRU information - This option is incorrect because the dirty bit is not used to maintain the Least Recently Used (LRU) information. LRU information is typically maintained using other mechanisms such as a linked list or a clock algorithm.

Option C) Allows only read on a page - This option is incorrect because the dirty bit is not related to allowing only read operations on a page. The dirty bit is specifically used to track whether a page has been modified or not.

Option D) None of the above - This option is incorrect because option A is correct.

Therefore, the correct answer is A) Helps avoid unnecessary writes on a paging device. This option is correct because the dirty bit helps the operating system avoid unnecessary writes to the backing store by tracking which pages have been modified.

  1. reduces page I/O

  2. decreases the degree of multiprogramming

  3. implies excessive page I/O

  4. improves system performance


Correct Option: C

When the result of a computation depends on the speed of the processes involved, there is said to be

  1. Cycle Stealing

  2. Race condition

  3. Time lock

  4. Deadlock


Correct Option: B

A critical section is a program segment

  1. which should run in a certain specified amount of time

  2. which avoids deadlocks

  3. where shared resources are accessed

  4. which must be enclosed by a pair of semaphore operations


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of a critical section.

A critical section is a program segment that must be executed atomically, meaning it should not be interrupted by any other process or thread. This is typically necessary when multiple processes or threads are accessing shared resources, such as variables or data structures.

Option A) "Which should run in a certain specified amount of time" - This option is incorrect because a critical section is not defined by the amount of time it takes to execute. Instead, it is defined by the need for exclusive access to shared resources.

Option B) "Which avoids deadlocks" - This option is incorrect because a critical section itself does not prevent deadlocks. Deadlocks can occur when multiple processes or threads are waiting for exclusive access to shared resources, and proper synchronization mechanisms like semaphores or locks are not used.

Option C) "Where shared resources are accessed" - This option is correct because a critical section is a program segment where shared resources are accessed. It ensures that only one process or thread can access the shared resources at a time, preventing data corruption or inconsistency.

Option D) "Which must be enclosed by a pair of semaphore operations" - This option is incorrect because a critical section does not necessarily need to be enclosed by semaphore operations. While semaphores can be used to synchronize access to shared resources, other synchronization mechanisms such as locks or mutexes can also be used.

The correct answer is C) "Where shared resources are accessed" because a critical section is a program segment where shared resources are accessed.

What are the 2 modes of Natural programming ?

  1. Hierarchical

  2. Structured

  3. object oriented

  4. Reporting


Correct Option: B,D

What is the codename for Windows Vista?

  1. Aero

  2. Longhorn

  3. WinFx

  4. Whidbey


Correct Option: B

What was the codename for Windows 95 OS?

  1. Mantis

  2. NAS 3.0

  3. Sparta

  4. Chicago


Correct Option: D

What is the codename for Windows XP?

  1. Odyssey

  2. eHome

  3. Whistler

  4. Freestyle


Correct Option: C