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?
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 Kulkarni, pavan singh and Red_devil.
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.
i think you have hiven explanatio for D and C is false
correct me if wrong
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.
@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
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.
this might help