views:

264

answers:

3

I wanted to know How OS actually makes a program in to process. what are steps Os engages to make program a process.

I mean How a Program becomes a Process, what are the parameter OS adds to kernel datastructure before making a program a process

Thank you in advance.

A: 

There's a tonne of info on the net...

Cheers. Keith.

corlettk
Those 2 are different from my question :)
mahesh
@mahesh: Then you should elaborate on what you're looking for as they seem perfectly germane to your question.
Jason
+3  A: 
Jason
+6  A: 

Every operating system is going to do this in a different manner.

However, in general the following steps will occur in a modern operating system:

  • New address space created
  • Program image loaded into an agreed upon address
    • This may involve relocation of the image, or a dependency.
  • Execution "context" setup
    • Includes stack, and a call into an agreed upon "main" function by a logical thread of execution

I'm glossing over lots of nasty little details, but that's a basic overview.

Kevin Montrose
@Kevin. Thank you so much for the answer. I am in need of bit detail. i would request you to explain a bit or give me some link/doc. i am interested in low level stuff. LIke you answer :)
mahesh
@mahesh - I confess I do not routinely work on operating systems :) Pretty much everything I learned in this area came from a project (http://www.owlnet.rice.edu/~comp421/projects/lab2.html which focuses on "imaginary" hardware) and a later edition of Jason's linked book. If you're looking for something in particular I might know though.
Kevin Montrose
@kevin, thank you so much for timely reply. I am crazy about OS, Loader, Linker and Compilers. If you have something related to that, i hope you have :), please let me know links/docs etc. Would be great if you could provide :). Thanks once again.
mahesh