3,119 views
1 votes
1 votes

The Unix Kernel maintains two key data structures related to processes, the process table and the user structure. Which of following information is/are the part of user structure?
i) File descriptor table
ii) System call state
iii) Scheduling parameters
iv)Kernel stack

  1.   both i,iv
  2.   both ii,iv
  3.   only i,ii
  4.   all i,ii,iv

3 Answers

0 votes
0 votes
From question it seems like none of the above:

i) File descriptor table

File descriptor tables store the information about which files are currently open. They are not bound to a particular process but have a global presence. This is useful in the case when one process tries to delete a file when it is being used by another process. There is really no point of keeping this in the user table.

ii) System call state

Processes makes system calls to the kernel to get some special "privileged " service from the kernel for which processes cannot be trusted like reading from disk, memory management etc. Again no point keeping this in the user table as these are specific to process.

iii) Scheduling parameters

Process are scheduled not users. May if there is some concept whether user A has high priority than user B then this infomration can be stored into the user table but I am not so sure if that is how priority is handled in the kernel.

iv)Kernel stack

Kernel stack is the stack used by the kernel when its executing a system call or handling the interrupt on behalf of the process which was actually running on the processor. This is definitely not stored on the user structure.

------

Is this correct.. or am I totally wrong? This needs discussion.
0 votes
0 votes

just go through

The information contained in the user structure includes the following items:

  1. Machine registers. When a trap to the kernel occurs, the machine registers (including the floating-point ones, if used) are saved here.

  2. System call state. Information about the current system call, including the parameters, and results.

  3. File descriptor table. When a system call involving a file descriptor is invoked, the file descriptor is used as an index into this table to locate the in-core data structure (i-node) corresponding to this file.

  4. Accounting. Pointer to a table that keeps track of the user and system CPU time used by the process. Some systems also maintain limits here on the amount of CPU time a process may use, the maximum size of its stack, the number of page frames it may consume, and other items.

  5. Kernel stack. A fixed stack for use by the kernel part of the proces

Related questions

1 votes
1 votes
1 answer
1
Kalpna Bhargav asked Mar 12, 2015
1,138 views
which one of the following process in UNIX operating system does not have a parent process ?(a) sh(b) dev(c) login (d) kernel
0 votes
0 votes
2 answers
4
Himani Srivastava asked Oct 10, 2015
1,382 views
P0wait(s); wait(q);Signal (s); signal(q);...P1[wait(q);wait(s);}signal(q);signal(s);....whether progress is guarnteed or not ???