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
Relocation bits employed by relocating loader are specified by Relocation bits employed by relocating loader are specified by Assembler or Translator

Q. What are three benefits of dynamic (shared) linkage of libraries compared to static linkage? What are two situations where static linkage is preferable? Answer: The

Explain the basic concepts of segmentation. Segmentation definition User view of program Hardware used with diagram-segment table, base, limit & offset Protection and

PART A Question 1 Using your own words, explain what a continuous random variable and a continuous probability density function are. Give examples. Question 2 Gi

The code should be nicely formatted with plenty of comments. It should be easy to read, properly The summary section should include three parts: (1) Record the running t

LOOK o Like SCAN except stops moving inwards (or outwards) when no more requests in that direction exist. C-SCAN (circular scan) o Moves inwards servicing requests u

You have a system with two primary workloads. One performs sequential access to a set of large files, the other performs small, independent, random reads to a separate set of large

The term Operating System (OS) is often misused. It is common, for example, for people to speak of an OS when they are in fact referring to an OS and to a set of additional applica

Processes and Programs Process is a dynamic entity which is a program in execution. A process is a sequence of information executions. Process exists in a limited span of t

DIFFERENT MULTITHREADING MODELS Multithreading Models the majority multithreading models fall into one of the following categories of threading implementation: 1.      M