简体   繁体   中英

How Program Becomes a Process. How OS makes Program a process

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM