Tim
Tim

Reputation: 99428

Are " process image" and "address space of a process" the same concept?

I just saw "process image" in the description for exec- functions in GNU Libc's manual. Is it the same concept as the address space of a process? Thanks.

Upvotes: 0

Views: 1295

Answers (2)

user3344003
user3344003

Reputation: 21627

A process consists of:

  1. An address space
  2. One or more threads of execution.

That which is sometimes called the process image consists of both.

An exec- function will:

  1. Create a new address space
  2. Wipe out all the threads and create a main thread.

A process image is really the same as a process.

Upvotes: 1

Arlie Stephens
Arlie Stephens

Reputation: 1176

I'd say they are related, but not quite the same.

The process image is everything you get from the program executable and load into memory, plus everything that gets added or modified at load time.

The address space is all its virtual addresses, and whatever is in them.

Same stuff - almost - but different viewpoint.

Much of the time, when I'm concerned about address space, I just want to know whether some particular address is valid for that process, and/or whatever addresses are currently available. Maybe I care about details like "this one's currently resident; that one's paged out; this other one will be initialized with zeroes when it's first accessed". But I really don't care about the contents, and I don't care about details like text/data/bss/heap/stack/mmap etc.

When I'm concerned about a process image, I'm pretty much concerned with the stuff that comes from the executable file, and getting it set up right. And if the program's already started running, I care about things like its registers, not just its memory.

Upvotes: 1

Related Questions