3
votes
2answers
49 views

Process in user mode switch to kernel mode. Then the process will have root privileges?

According to http://www.linfo.org/kernel_mode.html in paragraph 7: When a user process runs a portion of the kernel code via a system call, the process temporarily becomes a kernel process and is ...
3
votes
1answer
43 views

Result from kernel returned to what process?

When a process requires actions that require kernel mode, it uses a system call. So, how are the results returned to the process?
0
votes
1answer
43 views

Why my cpu spend so much time on system? [closed]

top - 08:58:42 up 20 days, 8:23, 1 user, load average: 67.17, 58.94, 62.75 Tasks: 630 total, 40 running, 524 sleeping, 0 stopped, 66 zombie Cpu(s): 57.3%us, 41.6%sy, 0.0%ni, 0.0%id, 0.0%wa, ...
21
votes
3answers
932 views

If computers start counting at 0, why does the init process have a pid of 1?

Not much to put here in the body, the question is self explanatory.
2
votes
2answers
67 views

Detecting Kernal Thread on Older Kernel Version

Looking at the proc man page (http://man7.org/linux/man-pages/man5/proc.5.html) it is possible to detect which processes are kernel threads in /proc/<pid>/stat by looking at the flags value ...
5
votes
2answers
207 views

Processes in Linux

As I understand it, process descriptors are stored in a doubly linked list data structure. But a fork can create multiple children for the same process, so that makes me think that there is a tree ...
3
votes
3answers
59 views

Contents of stack area of a process

I've been going through some Unix text books and I can't have a clear picture on the contents of the stack area of the process. Can anyone please explain or point out some references?
3
votes
1answer
166 views

init: is it a user thread or a kernel thread?

init is the first task executed after kernel is loaded, right? Then who is its owner. also I can see [swapper/0] [swapper/1] ..... [swapper/7] having pid 0 PID PPID CPU TASK ST %MEM ...
3
votes
0answers
131 views

Can I get WCHAN from ps on Mac OS X 10.7.4?

From the manual it seems that ps -AO wchan should tell me what everything is sleeping on, but everything comes up as -. (And nwchan as 0). Did they do away with the old sleep()/tsleep() interface in ...
11
votes
3answers
278 views

Where to find explanation of kernel processes?

I want to know about kernel processes, like [migration], [kswapd], etc. Where are kernel processes like these documented?
6
votes
2answers
1k views

How can you determine which process scheduler is being used?

I.e. is it the O(1) scheduler, the CFS scheduler, or an older one?
2
votes
1answer
655 views

How often is PSS value updated for a given process in /proc/pid/smaps

So if n processes are sharing a library L with size M then the contribution to their PSS is M/n. Now imagine one of the process terminates. So the contribution would be M/(n-1). Q1: My question is ...
5
votes
2answers
619 views

Are kernel threads really kernel processes?

I've read in many places that Linux creates a kernel thread for each user thread in a Java VM. (I see the term "kernel thread" used in two different ways: a thread created to do core OS work and a ...
4
votes
1answer
95 views

Is it the process that cleans itself on termination or the kernel?

Recently I found this in a powerpoint presentation: When a program is compiled and linked, the linker inserts some extra code in the program. It is this code that calls the main function about the ...
4
votes
1answer
1k views

Will process ids be recycled? What if you reach the maximal id?

Process IDs are strictly increasing, but if your system runs long enough and there is a lot of processes terminating and starting, you could at some point reach the limit of the underlying integral ...
4
votes
2answers
472 views

What is the need of the struct thread_info in locating struct task_struct?

While reading through the Linux Device Drivers, I could understand that the Process Descriptor (of type struct task_struct) has all the info regarding a particular task. The process descriptors are ...
2
votes
2answers
377 views

Need for thread_info structure in Linux 2.6 Kernel

Prior to the Linux 2.6 kernel, struct task_struct was present at the end of the kernel stack of each process. There was no thread_info struct concept. But in Linux 2.6 kernel, instead of task_struct ...
1
vote
1answer
420 views

What is the size of the TaskList?

While reading through the Linux Kernel Development by Robert Love, I went through the following line : The kernel stores the list of processes in a circular doubly linked list called the task ...
3
votes
2answers
715 views

Questions on Linux kernel internals

I was reading "Linux device drivers, 3rd edition" and faced a few kernel items I don't quite understand. Hope gurus on this forum will help me out. Does the Linux kernel internally operate with ...
52
votes
3answers
27k views

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem ...