Message from discussion
Difference between process & kernel module
Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!131.211.141.196.MISMATCH!humbolt.nl.linux.org!news.nl.linux.org!mail2news
From: "Dhiman, Gaurav" <Gaurav.Dhi...@ca.com>
Newsgroups: nlo.lists.kernelnewbies
Subject: RE: Difference between process & kernel module
Date: Wed, 29 Sep 2004 14:31:30 +0530
Organization: Nl.linux.org Dutch Linux News
Lines: 492
Approved: n...@nl.linux.org
Message-ID: <577528CFDFEFA643B3324B88812B57FE2B1937@inhyms21.ca.com>
NNTP-Posting-Host: humbolt.nl.linux.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4A602.E9175CF7"
X-Trace: humbolt.nl.linux.org 1096448635 7558 131.211.141.196 (29 Sep 2004 09:03:55 GMT)
X-Complaints-To: news@nl.linux.org
NNTP-Posting-Date: Wed, 29 Sep 2004 09:03:55 +0000 (UTC)
X-Info: Long lines are cut to 950 characters max
X-To: "SiM" <face2faceonli...@yahoo.co.in>
X-Cc: <kernelnewb...@nl.linux.org>
X-list: kernelnewbies
X-original-sender: Gaurav.Dhi...@ca.com
X-ecartis-version: Ecartis v1.0.0
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on humbolt.nl.linux.org
X-List-ID: <kernelnewbies.nl.linux.org>
X-MimeOLE: Produced By Microsoft Exchange V6.0.6547.0
X-OriginalArrivalTime: 29 Sep 2004 09:01:30.0599 (UTC) FILETIME=[E935F770:01C4A602]
Content-Class: urn:content-classes:message
X-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,HTML_50_60, HTML_FONTCOLOR_UNKNOWN,HTML_MESSAGE autolearn=no version=2.63
This is a multi-part message in MIME format.
------_=_NextPart_001_01C4A602.E9175CF7
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
=20
ftp://download.intel.com/design/PentiumII/manuals/24319202.pdf
=20
The above link will download the specific Intel Arch Doc, which I was
talking about (check chapter 4, 5 and 6 of this doc for information
related to task switch and stack switching).
If you are interested in more Intel Arch Docs, refer to following link:
=20
http://www.x86.org/intel.doc/386manuals.htm
=20
=20
Cheers !!
Gaurav
=20
_____ =20
From: SiM [mailto:face2faceonli...@yahoo.co.in]=20
Sent: Wednesday, September 29, 2004 1:56 PM
To: Dhiman, Gaurav
Subject: RE: Difference between process & kernel module
=20
Hi Dhiman,
Could you please send me the links to the Indtel Arch
docs,
I'am unable to locate it !
=20
TIA,
Cheers.
Simith
"Dhiman, Gaurav" <Gaurav.Dhi...@ca.com> wrote:
=09
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.
=09
Read about it in Intel Arch Docs, which explains the Task switch
and
Stack Switching concepts.
=09
Cheers !!
Gaurav
=09
=09
-----Original Message-----
From: kernelnewbies-bou...@nl.linux.org
[mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Brandon
Niemczyk
Sent: Wednesday, September 29, 2004 1:06 PM
To: Rakesh Jagota
Cc: kernelnewb...@nl.linux.org
Subject: Re: Difference between process & kernel module
=09
On Wed, 29 Sep 2004 11:35:06 +0530, Rakesh Jagota
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?
=09
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.
=09
>=20
> Is it possible to do like whatever we are doing inside the
process,
can we
> do the same in the kernel module.
>=20
> Thanks,
> rakesh
>=20
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> FAQ: http://kernelnewbies.org/faq/
>=20
>=20
=09
=09
=09
--=20
Brandon Niemczyk
http://bniemczyk.doesntexist.com
=09
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/
=09
=09
=09
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/
Yahoo! India Matrimony
<http://in.rd.yahoo.com/specials/mailtg/*http:/yahoo.shaadi.com/india-ma
trimony/> : Find your life partner online
<http://in.rd.yahoo.com/specials/mailtg2/*http:/yahoo.shaadi.com/india-m
atrimony/> .
------_=_NextPart_001_01C4A602.E9175CF7
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40"
xmlns:ns0=3D"urn:schemas-microsoft-com:office:smarttags">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:blue;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dblue>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'><a
href=3D"ftp://download.intel.com/design/PentiumII/manuals/24319202.pdf">f=
tp://download.intel.com/design/PentiumII/manuals/24319202.pdf</a><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>The above link will download the =
specific
Intel Arch Doc, which I was talking about (check chapter 4, 5 and 6 of =
this doc
for information related to task switch and stack =
switching).<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>If you are interested in more Intel =
Arch Docs,
refer to following link:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'><a
href=3D"http://www.x86.org/intel.doc/386manuals.htm">http://www.x86.org/i=
ntel.doc/386manuals.htm</a><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>Cheers =
!!<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>Gaurav<o:p></o:p></span></font></p>
<div>
<div>
<p class=3DMsoNormal><font size=3D1 color=3Dblue face=3DArial><span =
style=3D'font-size:
9.0pt;font-family:Arial;color:blue'> </span></font><font size=3D1
face=3DArial><span =
style=3D'font-size:9.0pt;font-family:Arial'><o:p></o:p></span></font></p>=
</div>
</div>
<div>
<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>
<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>
</span></font></div>
<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'> SiM
[mailto:face2faceonli...@yahoo.co.in] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Wednesday, =
September 29,
2004 1:56 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> Dhiman, Gaurav<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: Difference =
between
process & kernel module</span></font><o:p></o:p></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Hi Dhiman,<o:p></o:p></span></font></p>
</div>
<div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>  =
;
Could you please send me the links to the Indtel Arch =
docs,<o:p></o:p></span></font></p>
</div>
<div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>I'am unable to locate it !<o:p></o:p></span></font></p>
</div>
<div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>TIA,<o:p></o:p></span></font></p>
</div>
<div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Cheers.<o:p></o:p></span></font></p>
</div>
<div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Simith<br>
<br>
<b><i><span style=3D'font-weight:bold;font-style:italic'>"Dhiman,
Gaurav" <Gaurav.Dhi...@ca.com></span></i></b> =
wrote:<o:p></o:p></span></font></p>
</div>
<blockquote style=3D'border:none;border-left:solid #1010FF =
1.5pt;padding:0in 0in 0in 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'>
<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><br>
There is no kernel stack as such.<br>
When we make system call, we enter the kernel mode and CPU SS and SP =
to<br>
the Process specific ring 0 stack (this stack is used in kernel =
space<br>
but belong to specific process). So if Process P1 makes system call =
and<br>
at the same time P2 Also make the system call both the execution =
threads<br>
will have different stacks in kernel mode. There is not kernel stack =
as<br>
whole which is shared by all the process in kernel mode.<br>
<br>
Read about it in Intel Arch Docs, which explains the Task switch and<br>
Stack Switching concepts.<br>
<br>
Cheers !!<br>
Gaurav<br>
<br>
<br>
-----Original Message-----<br>
From: kernelnewbies-bou...@nl.linux.org<br>
[mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Brandon =
Niemczyk<br>
Sent: Wednesday, September 29, 2004 1:06 PM<br>
To: Rakesh Jagota<br>
Cc: kernelnewb...@nl.linux.org<br>
Subject: Re: Difference between process & kernel module<br>
<br>
On Wed, 29 Sep 2004 11:35:06 +0530, Rakesh Jagota<br>
<J.RAK...@GDATECH.CO.IN>wrote:<br>
> Hi all,<br>
> what is the difference between provcess and kernel module? As =
process<br>
> contains text, data, bss, stack & heap, Will all this present =
for<br>
kernel<br>
> Module also? asking silly Q?<br>
<br>
IIUC a kernel module uses the kernel's stack and heap. And because =
of<br>
this modules which use a lot of stack space can cause some serious<br>
problems.<br>
<br>
> <br>
> Is it possible to do like whatever we are doing inside the =
process,<br>
can we<br>
> do the same in the kernel module.<br>
> <br>
> Thanks,<br>
> rakesh<br>
> <br>
> --<br>
> Kernelnewbies: Help each other learn about the Linux kernel.<br>
> Archive: http://mail.nl.linux.org/kernelnewbies/<br>
> FAQ: http://kernelnewbies.org/faq/<br>
> <br>
> <br>
<br>
<br>
<br>
-- <br>
Brandon Niemczyk<br>
http://bniemczyk.doesntexist.com<br>
<br>
--<br>
Kernelnewbies: Help each other learn about the Linux kernel.<br>
Archive: http://mail.nl.linux.org/kernelnewbies/<br>
FAQ: http://kernelnewbies.org/faq/<br>
<br>
<br>
<br>
--<br>
Kernelnewbies: Help each other learn about the Linux kernel.<br>
Archive: http://mail.nl.linux.org/kernelnewbies/<br>
FAQ: http://kernelnewbies.org/faq/<o:p></o:p></span></font></p>
</blockquote>
<p><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'><a
href=3D"http://in.rd.yahoo.com/specials/mailtg/*http:/yahoo.shaadi.com/in=
dia-matrimony/"
target=3D"_blank"><b><span style=3D'font-weight:bold'>Yahoo! India =
Matrimony</span></b></a><b><span
style=3D'font-weight:bold'>:</span></b> Find your life partner <a
href=3D"http://in.rd.yahoo.com/specials/mailtg2/*http:/yahoo.shaadi.com/i=
ndia-matrimony/"
target=3D"_blank">online</a>.</span></font><o:p></o:p></p>
</div>
</body>
</html>
------_=_NextPart_001_01C4A602.E9175CF7--
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/