What happens when you execute a program in unix, Operating System

 

When you run a program on your UNIX system, the system prepares a special environment for that program. This environment owns everything needed for the system to execute the program as if no other process were running on the system. Each and every process has process context, which is everything that is simple about the state of the program you are currently running. Every time you run a program the UNIX system does a fork, which acts a series of operations to make a process context and then execute your program in that context. The steps add the following:

 

  • Locate a slot in the process table, a list of currently running process kept by UNIX.
  • Give a unique process identifier (PID) to the program.
  • Copy the text of the process, the parent that requested the spawning of the new program.
  • Give the new PID to the parent process. This active the parent process to control or examine the process directly.
  • After the fork is complete, UNIX executes your program.

 

 

Posted Date: 7/28/2012 8:42:46 AM | Location : United States







Related Discussions:- What happens when you execute a program in unix, Assignment Help, Ask Question on What happens when you execute a program in unix, Get Answer, Expert's Help, What happens when you execute a program in unix Discussions

Write discussion on What happens when you execute a program in unix
Your posts are moderated
Related Questions
what is the function of operation management?

Q. Explain about diffrent Process State? Process State When process executes, it changes its state. Process state is defined as the current activity of the process. Fi

Problem: (a) (i) Explain what a single system image is and how it is related to the concept of a distributed operating system? (ii) What are the main differences between a

Is disk scheduling, other than FCFS scheduling, useful in a single-user environment? Explain your answer. In a single-user environment, the I/O queue usually is blank. Requests

Translation Look aside Buffer In a cached system, the base addresses of the last few indexed pages is maintained in registers named the TLB that adds in faster lookup. TLB has

Define UnixWare UnixWare manages resources at the process level. Each resource allocated to the application is actually allocated to the process representing the application. C

Q. What are the major advantages of the microkernel approach to system design? Answer: Benefits usually include the following (a) Adding a new service doesn't require modify

Q. Consider a system that holds 5000 users. Presume that you want to allow 4990 of these users to be able to access one file. a. How would you denote this protection scheme in

Write short note on recovery regarding the file system in Windows 2000. In many file systems a power breakdown at the wrong time can damage the file system data structures so s

Q. Name two differences between logical and physical addresses? Answer: A logical address doesn't refer to an actual existing address rather it refers to an abstract address in