Question

I'm studying about operating system, and i cant understand about processes resource sharing. In ppt, it says

 Process Creation (title)
   *Resource sharing
      Parent and children share all resources
      Parent and child share no resources

with my poor english, can not understand why children is sharing all resources and why child share no resources.

Was it helpful?

Solution

This is an abstraction over the very concrete fork function. I guess for academical purposes.

When a sub-process is spawned using fork, it inheritates the parent's process opened handles, files, console input/output, and anonymous pipes. These are the resources your document is talking about.

There are other ways for process to share resources, it is by using named pipes, and named files. A file can be memory mapped so this effectively just creates a shared buffer space.

This is all relative to IPC : Inter Process Communication.

Frankly, it is not very important to deal with this things on an abstracted level like your course seems to be doing. Your teachers should just go with concrete terms, concrete function names, and take POSIX as a base. Students will figure the generalization themselves.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top