From: Shriramana Sharma <samjnaa@gmail.com>
To: Linux C Programming List <linux-c-programming@vger.kernel.org>
Subject: Re: threads and kernel
Date: Mon, 22 Oct 2007 13:25:03 +0530 [thread overview]
Message-ID: <471C5757.3040501@gmail.com> (raw)
In-Reply-To: <6a00c8d50710211023t898f17idf77bcad37c37a9b@mail.gmail.com>
Steve Graegert wrote:
> your questions can be answered in very great detail and fill whole
> books (which has actually happened), so please forgive my brief
> answers.
Brief answers are sufficient. Thank you. :)
> and the init process (PID 1) separately. The scheduler then takes
> control over the system as soon as the kernel goes idle and init
> starts the /etc/rc.d/rc.sysinit script.
So would the kernel be "reawakened" by some external event occurring, as
Glynn wrote? I am thinking like -- the kernel is a body of instructions,
just like any other program. So like I do something (type "cp" at a
terminal, for ex) to have the program called "cp" to be processed --
that is, the instructions in it are executed. Similarly when a system
call is made by any program, the instructions contained in the kernel
would be executed. Is this understanding right?
> When a system call is invoked, the process which has invoked is being
> interrupted and all the information needed to continue this process is
> stored for later use. Now, the process executes higher privileged
> code that determines what to do next from examining the stack of the
> less privileged code. It contains information about the request to be
> served by the kernel. When it is finished, it control is returned to
> the program, restoring the saved state and continuing program
> execution.
So technically the kernel instructions would be processed "in" the same
process and thread that makes the system call, albeit with different
privelege, right? Or is the process *making the system call* totally
"paused", as in a "wait" situation when one process waits for another to
finish?
Do I also understand right that the kernel resides in a special section
of memory the boot loader puts it in? The core of the kernel (apart from
dynamically loadable kernel modules) is the vmlinuz file sitting in my
/boot dir, right?
> Yes, I know. You are a well known member of this list. No need to apologize.
Oh thanks -- that was very nice of you to say. I only thought -- these
are probably very basic questions for my friends here, and so may seem
like homework questions. :)
Have a nice day, all! :)
Shriramana Sharma.
next prev parent reply other threads:[~2007-10-22 7:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 13:21 threads and kernel Shriramana Sharma
2007-10-21 16:26 ` Irfan Habib
2007-10-21 17:23 ` Steve Graegert
2007-10-22 6:50 ` Benoit Fouet
2007-10-22 13:01 ` Steve Graegert
2007-10-22 13:27 ` Benoit Fouet
2007-10-22 13:31 ` Steve Graegert
2007-10-22 13:38 ` Benoit Fouet
2007-10-22 14:20 ` Steve Graegert
2007-10-22 14:34 ` Benoit Fouet
2007-10-23 4:32 ` vibi
2007-10-23 5:14 ` Steve Graegert
2007-10-23 5:53 ` vibi
2007-10-23 6:58 ` Steve Graegert
2007-10-23 7:10 ` vibi
2007-10-23 7:30 ` Steve Graegert
2007-10-22 7:55 ` Shriramana Sharma [this message]
2007-10-22 13:41 ` Steve Graegert
2007-10-22 17:18 ` Glynn Clements
2007-10-21 17:36 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=471C5757.3040501@gmail.com \
--to=samjnaa@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).