Advanced Database Management System - Tutorials and Notes: Operating systems multiple choice questions for exams - Set 19

Search Engine

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

Friday, 24 April 2020

Operating systems multiple choice questions for exams - Set 19

Operating systems exams - multiple choice questions (MCQ) and answers, Objective type questions



Operating Systems MCQ questions and answers – Set 19

1. The text segment of a process address space contains:

(a) The statically allocated data associated with the process
(b) The dynamically allocated data associated with the process
(c) The executable code associated with the process
(d) The inter-process communication (IPC) messages for the process
View Answer

Answer: (c) The executable code associated with the process           

A process has at least three segments of usable addresses:

  • A text segment contains the executable image of the program. Another text segment is created for each dynamic shared object (DSO) with which a process is linked.Text segments are always read-only.
  • A data segment contains the “heap” of dynamically allocated data space. A process can create additional data segments in various ways described later.
  • A stack segment contains the function-call stack. This segment is extended automatically as needed.

2. Large page sizes increase ______

(a) Internal fragmentation
(b) External fragmentation
(c) The page table size
(d) The working set size
View Answer

Answer: (a) Internal fragmentation        

Internal fragmentation: unused memory within an allocation unit

External fragmentation: unused memory outside allocation units

Large page size: increases chance that we get more memory than we need. Larger page sizes lead to large amount of wasted memory, as more potentially unused portions of memory are loaded into main memory.

3. What is the advantage of a multilevel (hierarchical) page table over a single-level one?

(a) Page number lookups are faster
(b) The page table can consume much less space if there are large regions of unused memory.
(c) Each segment (code, data, stack) can be managed separately.
(d) Page permissions can be assigned at a finer granularity.
View Answer

Answer: (b) The page table can consume much less space if there are large regions of unused memory                         
Any regions of memory that are not mapped for a region covered by a top-level page number do not need to have a lower-level page table allocated. This avoids the need to allocate the lower-level page table for that region.

Multi-level paging

Multi-level page table is a paging scheme that consists of two or more levels of page tables in a hierarchical manner. In this scheme, a virtual address is divided into three or more sections, with all but the last section being page numbers in different page tables, and the last one being the offset.

4. What each partition may contain when memory is divided into several fixed sized partitions?

(a) Exactly one process
(b) At least one process
(c) Multiple processes
(d) None of these
View Answer

Answer: (a) Exactly one process  
One of the simplest methods for memory allocation is to divide memory into several fixed-sized partitions. Each partition may contain exactly one process. In this multiple-partition method, when a partition is free, a process is selected from the input queue and is loaded into the free partition. When the process terminates, the partition becomes available for another process. The operating system keeps a table indicating which parts of memory are available and which are occupied. Finally, when a process arrives and needs memory, a memory section large enough for this process is provided.

5. What will happen if the memory allocated to a process is slightly larger than the process?

(a) External fragmentation occurs
(b) Internal fragmentation occurs
(c) Both (a) and (b)
(d) Neither (a) nor (b)
View Answer

Answer: (b) Internal fragmentation occurs       
Due to the rules governing memory allocation, more computer memory is sometimes allocated than is needed. For example, memory can only be provided to programs in chunks (multiple of 4), and as a result if a program requests perhaps 29 bytes, it will actually get a chunk of 32 bytes. When this happens, the excess memory goes to waste. In this scenario, the unusable memory is contained within an allocated region. This arrangement, termed fixed partitions, suffers from inefficient memory use - any process, no matter how small, occupies an entire partition. This waste is called internal fragmentation. [Wikipedia]


*********

Related links:




OS Interview questions with answers

solved Interview questions in operating systems

GATE questions in operating systems

MCQ Interview questions in OS

Operating systems interview questions for competitive exams

objective type OS questions for IIT JEE entrance exam

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