Re: [Bulk] Re: fork and exec

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

 



On Sun, May 25, 2008 at 12:28 AM, William Case <billlinux@xxxxxxxxxx> wrote:
> Thank you Manish;
>
> I think I am starting to approach an answer I hadn't thought of.  Let me
> try it out below.  Please correct me if I am wrong.
>
>
> On Sat, 2008-05-24 at 23:40 +0530, Manish Katiyar wrote:
> [snip]
>
>> I don't know about other OS's, but swapper is *handcrafted* using the
>> macro INIT_TASK() macro.
>
> If anyone can confirm that there are other OS's that initiate prcesses
> differently from the Linux parent-child process.  No details are really
> needed, I would just like to satisfy myself that either all OS's
> basically use the parent-child modal or that there are several different
> ways that it can be done.  For example, would the Windows registry
> system be an alternative??
>
>> Suppose if we had to start all the processes
>> from raw probably setting the initial values for the task just as
>> swapper will take some time, and you might want to use some kind of
>> template from you can derive the default values of the raw process
>> quickly.....isn't it ??? .......  And isn't it more beneficial if you
>> get the values from the process which is  *most* closest in nature to
>> yours so that you have to change only the few key values like tgid,
>> ppid etc.
>>
> To test my understanding by restating:
>
> At boot time, when starting PID 0 (the swapping process) some?,
> several?, all? of the environmental CONSTANTS for my particular system
> are loaded and initialized.  By passing those constant values on through
> a parent-child modal to each new process those new processes don't have
> to re-initialize those constants.

And if I am not wrong, that is *one of the reasons* why you have some
members as pointers and some as normal variables in task_struct, so
that the required information can be quickly copied by just setting
the proper pointer without copying the whole info. Members like *fs,
*files and many other.

>
> Is this true?  And, might there be other reasons to use a parent-child
> modal?
>
>> Ohh and isn't it the same parent child relationship that we were
>> discussing, or in other words it is a raw process getting default
>> values from a closest template ?
>>
>
> As stated above, this sounds close to a BINGO.
>>
>
> [snip
>> >
>
>> --
>> Thanks & Regards,
>> ********************************************
>> Manish Katiyar ( http://mkatiyar.googlepages.com )
>> 3rd Floor, Fair Winds Block
>> EGL Software Park
>> Off Intermediate Ring Road
>> Bangalore 560071, India
>> ***********************************************
> --
> Regards Bill
>
>



-- 
Thanks & Regards,
********************************************
Manish Katiyar ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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