Advanced Database Management System - Tutorials and Notes: Interview questions for placement in OS with answers

Search Engine

Please visit, subscribe and share 10 Minutes Lectures in Computer Science

Saturday, 18 April 2020

Interview questions for placement in OS with answers

Interview questions for placement in OS with answers


Operating Systems TRUE/FALSE Interview Questions with Answers - 12



1. The kernel on a multiprocessor can use the local disabling of interrupts (within one CPU) to produce critical sections between the OSs on different CPUs.
(a) TRUE                                                   (b) FALSE

View Answer

Answer: FALSE.
Disabling interrupts on one CPU doesn’t affect other CPUs. Consequently, other CPUs keep executing when a single one has interrupts disabled.

2. When designing a multi-threaded application, you must use synchronization primitives to make sure that the threads do not overwrite each other’s registers.
(a) TRUE                                                   (b) FALSE

View Answer

Answer: FALSE.
Registers are kept in the TCB and are private to each thread. Consequently, one thread will not overwrite another thread’s register under normal circumstances.

3. Round robin scheduling provides a latency improvement over FCFS scheduling for interactive jobs.
(a) TRUE                                                   (b) FALSE

View Answer

Answer: TRUE.
By time-slicing jobs, RR scheduling avoids the problem FCFS in which interactive jobs can get stuck behind long-running jobs.

Round Robin scheduling - Round-robin scheduling allocates each task an equal share of the CPU time. In its simplest form, tasks are in a circular queue and when a task's allocated CPU time expires, the task is put to the end of the queue and the new task is taken from the front of the queue.


4. Threads in a process share the same file descriptors
(a) TRUE                                                   (b) FALSE

View Answer

Answer: TRUE.
Threads within a process share the same memory map and hence share all global data (static variables, global variables, and memory that is dynamically-allocated via malloc or new).

List of items that are shared among threads within a process

The items that are shared among threads within a process are:
  • Text segment (instructions)
  • Data segment (static and global data)
  • BSS segment (uninitialized data)
  • Open file descriptors
  • Signals
  • Current working directory
  • User and group IDs

5. Consider two machines A and B of different architectures, running two different operating systems OS-A and OS-B. Both operating systems are POSIX compliant. The source code of an application that is written to run on machine A must always be rewritten to run on machine B.
(a) TRUE                                                   (b) FALSE

View Answer

Answer: FALSE.

As mentioned in the question that both the OS are POSIX complaint. Hence, the source code of the application that is written for one machine need not be rewritten for other architecture.

POSIX - The Portable Operating System Interface (POSIX) is an IEEE standard that helps compatibility and portability between operating systems. Theoretically, POSIX compliant source code should be seamlessly portable. In the real world, application transition often runs into system specific issues. But POSIX compliance makes it simpler to port applications which can result in time savings.

***********

 Related posts


 





Operating systems interview questions

OS quiz questions with answers

Top 5 quiz questions in OS

Operating system interview questions for placement with justification answers

Interview questions on memory management, disk scheduling, and process management

GATE questions solved in OS



No comments:

Post a comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents