edited by
28,318 views
81 81 votes

A thread is usually defined as a "light weight process" because an Operating System (OS) maintains smaller data structure for a thread than for a process. In relation to this, which of the following statement is TRUE?

  1. On per- thread basis , the OS maintains only CPU register state . 
  2. The OS does not maintain a separate stack for each thread .
  3. On per- thread basis , the OS does not maintain virtual memory state .
  4. On per- thread basis , the OS maintains only scheduling and accounting information .

4 Answers

Best answer
135 135 votes

Answer to this question is (C).

Many of you would not agree at first So here I explain it how.

OS , on per thread basis, maintains ONLY TWO things : CPU Register state and Stack space. It does not maintain anything else for individual thread. Code segment and Global variables are shared. Even TLB and Page Tables are also shared since they belong to same process.

  1. option (A) would have been correct if 'ONLY' word were not there. It NOT only maintains register state BUT stack space also.
  2. is obviously FALSE
  3. is TRUE as it says that OS does not maintain VIRTUAL Memory state for individual thread which isTRUE
  4. This is also FALSE.
edited by
51 51 votes

From Tanenbaum,

 

The items in the first column are process properties, not thread properties. For example, if one thread opens a file, that file is visible to the other threads in the process and they can read and write it. This is logical, since the process is the unit of resource management, not the thread. If each thread had its own address space, open files, pending alarms, and so on, it would be a separate process. What we are trying to achieve with the thread concept is the ability for multiple threads of execution to share a set of resources so that they can work together closely to perform some task.

Answer:
Position:
Show:

Related questions

116 116 votes
6 answers 6 answers
41.2k
41.2k views
go_editor asked Sep 29, 2014
41,155 views
Let the time taken to switch from user mode to kernel mode of execution be $T1$ while time taken to switch between two user processes be $T2$. Which of the following is c...
59 59 votes
5 answers 5 answers
38.2k
38.2k views
go_editor asked Sep 29, 2014
38,244 views
Let the page fault service time be $10$ milliseconds(ms) in a computer with average memory access time being $20$ nanoseconds (ns). If one page fault is generated every $...
74 74 votes
4 answers 4 answers
24.1k
24.1k views
go_editor asked Sep 29, 2014
24,084 views
On a non-pipelined sequential processor, a program segment, which is the part of the interrupt service routine, is given to transfer $500$ bytes from an I/O device to mem...
44 44 votes
6 answers 6 answers
18.1k
18.1k views
go_editor asked Sep 29, 2014
18,099 views
A container originally contains $10$ litres of pure spirit. From this container, $1$ litre of spirit replaced with $1$ litre of water. Subsequently, $1$ litre of the mixt...