task_struct is defined in include/linux/sched.h (search for "task_struct {"). Which fields of the task_struct contain information for process id, parent process id, user id, process status, children processes, the memory location of the process, the files opened, the priority of the process, program name?
task_struct : 리눅스의 process descriptor
→ 프로세스의 정보를 담고 있음.
process id
parent process id
user id
process state
children processes
the memory location of the process
the files opened
the priority of the process
program name
3-2.
Display all processes with "ps –ef". Find the pid of "ps -ef", the process you have just executed. Find the pid and program name of the parent process of it, then the parent of this parent, and so on, until you see the init_task whose process ID is 0.