Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

starting process

0 views
Skip to first unread message

asit

unread,
Sep 17, 2008, 2:57:54 PM9/17/08
to
After booting, GRUB gives control to the starting process.(my teacher
told me).

the starting process may be init or shed. it depends upon
implementation.

I know shed is the scheduler in unix. What does this init do ????


Moi

unread,
Sep 17, 2008, 3:25:11 PM9/17/08
to

Nothing. Everything.
... well, basically just fork() and wait().

HTH,
AvK

John Gordon

unread,
Sep 17, 2008, 3:40:36 PM9/17/08
to

> What does this init do ????

As with any other unix program, you can use the "man" facility to learn
more about it.

man init

--
John Gordon A is for Amy, who fell down the stairs
gor...@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

ksash...@gmail.com

unread,
Sep 18, 2008, 12:08:38 AM9/18/08
to
On Sep 17, 11:57 pm, asit <lipu...@gmail.com> wrote:
> After booting, GRUB gives control to the starting process.(my teacher
> told me).

OMG ...

GRUB is the bootloader which gives control to an operating system, and
not to any "process".
The Operating System boots and then in the final stage of booting
gives control to init.

>
> the starting process may be init or shed. it depends upon
> implementation.
>
> I know shed is the scheduler in unix. What does this init do ????

Init is the first process that the OS spawns. It is the parent of all
the processes.

AFAIK, shed is a hex editor.
http://sourceforge.net/projects/shed

asit

unread,
Sep 18, 2008, 4:19:14 AM9/18/08
to
But if i execute ps -e, shed has pid 0 and init has 1 .

so shed gets executed first, then init.

wilson

unread,
Sep 18, 2008, 7:57:55 AM9/18/08
to
On Sep 18, 1:19 pm, asit <lipu...@gmail.com> wrote:
> But if i execute ps -e, shed has pid 0 and init has 1 .
>
> so shed gets executed first, then init.

It is the first process when the system starts.All the other process
spawns from this .

Gordon Burditt

unread,
Sep 18, 2008, 8:38:28 AM9/18/08
to
>But if i execute ps -e, shed has pid 0 and init has 1 .

I thought 'shed' was a container process in the back yard for
lawn mowers and garden tools when they are idle.

>so shed gets executed first, then init.

Are you sure this isn't spelled 'sched'?

My system has a process 'schedcpu' which is process 47.

jellybean stonerfish

unread,
Sep 18, 2008, 12:26:36 PM9/18/08
to
On Wed, 17 Sep 2008 11:57:54 -0700, asit wrote:

> After booting, GRUB gives control to the starting process.(my teacher
> told me).

You will learn faster and better if you boot a unix-type system yourself.

>
> the starting process may be init or shed. it depends upon
> implementation.
>
> I know shed is the scheduler in unix. What does this init do ????

Init, processes a file, commonly /etc/inittab and then spawns processes
as needed. Using this file, it will know what to do. As init reads this
file, it will find a line that tells it what the default runlevel is.
Each runlevel has different scripts, which control how your system
starts. These script may be in a folder /etc/init.d Often init will
spawn tty's so you have access to a command prompt. It will also start
your graphical interface if it is set up to do so. All other processes
are started by init. Commands can be sent to init with telinit. You can
tell init to jump into a different runlevel. What processes are started
or stopped in different runlevels is dependent on your system, and set in
the file /etc/inittab and or folders in /etc/init.d or /etc/rc.d.

By default, the kernel will start init as the first process.
The kernel can be told to start another program instead of init. This
way you can bypass the init process, and jump straight into a shell.
Using grub to start linux this is done by appending init=/bin/program to
your kernel boot line. I don't know what shed is, but if you read your
grub boot menu, you may see something like this on the kernel line
init=/bin/shed

Perhaps your shed program does some bookkeeping and then spawns init for
you. If you post you grub menu list, and tell us what unix system you
are on, we can better help you understand what init does on your system.

There are different methods used by different OS's. Two common methods
are system-v style and bsd style.

A beginners introduction..... http://en.wikipedia.org/wiki/Init

Sorry if I am a bit confusing, but my consulting fees are very low....

stonerfish

Bill Cunningham

unread,
Oct 7, 2008, 8:27:41 AM10/7/08
to

"jellybean stonerfish" <stone...@geocities.com> wrote in message
news:0jvAk.628$be....@nlpi061.nbdc.sbc.com...

> On Wed, 17 Sep 2008 11:57:54 -0700, asit wrote:
>
>> After booting, GRUB gives control to the starting process.(my teacher
>> told me).
>
> You will learn faster and better if you boot a unix-type system yourself.
>
>>
>> the starting process may be init or shed. it depends upon
>> implementation.
>>
>> I know shed is the scheduler in unix. What does this init do ????
>
> Init, processes a file, commonly /etc/inittab and then spawns processes
> as needed. Using this file, it will know what to do. As init reads this
> file, it will find a line that tells it what the default runlevel is.
> Each runlevel has different scripts, which control how your system
> starts. These script may be in a folder /etc/init.d Often init will
> spawn tty's so you have access to a command prompt. It will also start
> your graphical interface if it is set up to do so. All other processes
> are started by init. Commands can be sent to init with telinit. You can
> tell init to jump into a different runlevel. What processes are started
> or stopped in different runlevels is dependent on your system, and set in
> the file /etc/inittab and or folders in /etc/init.d or /etc/rc.d.
>
Runlevels on my linux 0 for halt. 6 for reboot 5 for X which I remove from
my system's init table because I don't run X. 1 for normal running. Instead
of calling halt I always use init 6 for reboot and init 0 to halt. Try calls
init yourself.. I think it's probably close to System V and BSD.

Bill


0 new messages