From: "H N Vijay" <Hn.Vijay@Sun.COM>
> u area is a kernel-owned area of the proces in its virtual memory space.
> The u area contains information about the process such as information
> about open files, identification information and process registers. The
> kernel stack is provided on a per-process basis to allow the kernel to
> be re-entrant. (ie, several processes can be involved in the kernel, and
> may even be executing the same routine concurrently.) Each process's
> kernel stack keeps track of its function call sequence when executing in
> the kernel.
>
As far as I have seen, the U area concept is missing in Linux.
Or, say linux uses different and more robust methods to implement
it's functionality. Everything that is required is in the process
descriptor of a process.
> The u area includes the following:
>
> * Process control block.
> * Pointer to the proc structure.
> * Real/effective UID/GID.
> * Information regarding current system call.
> * Signal handlers.
> * Memory management information (text, data, stack sizes).
> * Table of open file descriptors.
> * Pointers to the current directory vnode and the controlling
> terminal vnode.
> * CPU useage statistics.
> * Resource limitations (disk quotas, etc)
>
> -Vijay
The process descriptor is declared in the linux/sched.h. Some of
the above fields are: ( the order is not exact )
struct task_struct {
.....
/* User and Group id */
uid_t uid, euid, suid, fsuid;
uid_t gid, guid, sgid, fsgid;
....
/* As of I know.. system call info is not stored here */
/*
* Is there any signal pending? This variable would be
* checked at appropriate places. Refer Bach
*/
int sigpending;
/*
* List of various signals pending
*/
struct sigpendig pending;
/* Table of Memory management */
struct mm_struct *mm;
/* Table of open file pointer: following two structures */
/*
* user_struct:
* How many files opened by user?
* How many processes this user has?
* User id
*/
struct user_struct *user;
/*
* files_struct:
* open file information -
* count
* Maximum fd's
* User file descriptor array
* Close on Exec ( F_SETFD given to fcntl(2) )
*/
struct files_struct *files;
/*
* Pointers to the current directory vnode and the controlling
* terminal vnode.
*/
struct fs_struct *fs;
struct tty_struct *tty; /* NULL if no tty */
/*
* CPU useage statistics.
*/
int has_cpu, processor; /* used in multiprocessor system.
'processor' is the id of a CPU */
struct tms times; /* system and user mode time statistics */
unsigned long start_time; /* No. of clock ticks since started */
long per_cpu_utime[NR_CPUS], /* CPU time spent in user mode */
per_cpu_stime[NR_CPUS]; /* CPU time spent in kernel mode */
/*
* Resource limitations (disk quotas, etc):
* Max CPU time, max file and data size, max core and stack size,
* max processes and open files, max address space, max file locks
*/
struct rlimit rlim[RLIM_LIMITS];
....
};
You can assume that U area is now a part of the process descriptor.
Thanks.
--------------------------------------------------------------
"We approached the case, you remember Watson," said
Mr. Homles, "with an absolutely blank mind, which is
always an advantage."