RE: Difference between process & kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is no kernel stack as such.
When we make system call, we enter the kernel mode and CPU SS and SP to
the Process specific ring 0 stack (this stack is used in kernel space
but belong to specific process). So if Process P1 makes system call and
at the same time P2 Also make the system call both the execution threads
will have different stacks in kernel mode. There is not kernel stack as
whole which is shared by all the process in kernel mode.

Read about it in Intel Arch Docs, which explains the Task switch and
Stack Switching concepts.

Cheers !!
Gaurav


-----Original Message-----
From: kernelnewbies-bounce@xxxxxxxxxxxx
[mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Brandon Niemczyk
Sent: Wednesday, September 29, 2004 1:06 PM
To: Rakesh Jagota
Cc: kernelnewbies@xxxxxxxxxxxx
Subject: Re: Difference between process & kernel module

On Wed, 29 Sep 2004 11:35:06 +0530, Rakesh Jagota
<j.rakesh@xxxxxxxxxxxxx> wrote:
> Hi all,
> what is the difference between provcess and kernel module? As process
> contains text, data, bss, stack & heap, Will all this present for
kernel
> Module also?  asking silly Q?

IIUC a kernel module uses the kernel's stack and heap.  And because of
this modules which use a lot of stack space can cause some serious
problems.

> 
> Is it possible to do like whatever we are doing inside the process,
can we
> do the same in the kernel module.
> 
> Thanks,
> rakesh
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 



-- 
Brandon Niemczyk
http://bniemczyk.doesntexist.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux