The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+29 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 correct?

  1. OS maintains only scheduling and accounting information for each thread
  2. OS maintains only CPU registers for each thread
  3. OS does not maintain virtual memory state for each thread
  4. OS does not maintain a separate stack for each thread
asked in Operating System by Veteran (116k points)
recategorized by | 4.6k views
if in answer only is not there then what is answer A or C
both will be true
in exam, which option more apropriate becoz there is only one option
what are you asking? "only" removed from question option?
my question is that if in option A we remove only word then whats the appropriate answer
Options C. and D. are shuffled in GateOverflow october 2016  Book.
in full length test, it is given-B plz take a note of it!
Plz confirm answer is B or C ?
you can see selected ans as 'c '.
yes options c and d are shuffled in GO 2016

In this question it is not clear they are talking about User Level Thread or Kernel Level Thread.

With respect to User Level Thread answer (C) looks OK. But provided explanation are not LGTM.

ping @Ashwin Kulkarnipavan singh and Red_devil.

2 Answers

+62 votes
Best answer

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.
answered by Loyal (7.7k points)
edited by
yes i got c too

thw word "only" was bugging me
can you explain something about scheduling and accounting information..what does it include?


i think you have hiven explanatio for D and C is false

correct me if wrong

I think somebody edited the ques plz edit the ans also...its conflicting @Arjun sir
What is the meaning of virtual memory state??
accounting information is the information related to the amount of cpu time the thread or process has utilised till that instance this is not maintaned per thread basis it is maintained as basis of process per process in PCB
But option A is about Scheduling and Accounting information, not about Stack and registers... Please explain about option A

The explanation for the first option is not right. Not sure about scheduling, but accounting information is maintained per process (one for all threads, not each thread). I don't know why you compared it with registers and stack. And thus, false.

And also, thread control block not only maintains stack and register pointers but also register state and program counter. And to be more precise, it also contains a PCB pointer. Please don't misguide people.

@warlock agreed with you!

somebody edited the question

the options got shuffled i guess......what is explained as Option A is actually meant for option B i guess
I think the virtual memory state is the if a thread wants to access a page of the process it uses the mappings the page tables and the TLB every process has its own page table hence we dont need a seperate page table per thread  correct me if i am wrong @Arjun sir

threads maintain separately for individual threads only two things _ stack and registers

@A_i_$_h  that  is what i was saying threads can share global variables in code(data segment) and the code segment and the heap segment of a process they have their own register file, stack, and Program counter  

Small correction here - Each thread will have Program Counter, stack and register seperately.
@Lokesh i think what they mean by virtual memory state is the virtual address space. Since each process has it's own Virtual Address Space, all threads of that process will share that space.
Consider like this-If each process in the system has 100 threads, if OS maintains per thread virtual memory information, then it will much larger overhead than maintaining virtual mem info for processes.Hence option (C) looks suitable.

@Ayush Upadhyaya

@Shaik Masthan

OS maintains per process vitrual memory state  i.e Virtual address space ..All the threads of a process shares that address space..

Per thread OS maintains registers , stack , program counter , pointer to parent PCB , scheduling info(in case of kernel level thread whose scheduling done by kernel) not sure about last one

What is accounting info of process?


@jatin khachane 1-Accounting info is like how much cpu time process has used, what I/O devices are held or used by the process all those information that tells how much the process is using what resource of the computer.

+2 votes

THIS MIGHT HELPthis might help

answered by Junior (811 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,397 questions
53,563 answers
70,838 users