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

Assignment Help:

 

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.

 

 


Related Discussions:- What happens when you execute a program in unix

Request or response interface - interaction using message, Explain the Requ...

Explain the Request or Response interface The Request/Response interface is ideal for a message based client-server interaction. By modeling components to interact via a reque

Defining kernel, Problem 1. What is kernel? What are the main component...

Problem 1. What is kernel? What are the main components of a kernel? Defining Kernel Explaining Main components of Kernel 2. What is mutual exclusion? What are i

Explain memory management using buddy sustem, MEMORY MANAGEMENT USING BUDDY...

MEMORY MANAGEMENT USING BUDDY SUSTEM Here we are dividing the memory as powers of two as well as we are selecting the space which is smallest but large enough to hold a process

Explain disk scheduling algorithms-scan, SCAN o Go from the outside to...

SCAN o Go from the outside to the inside servicing requests and after that back from the outside to the inside servicing requests. o Replicate this over and over. o Diminish

Write a short note about process, Write a short note about process. Unc...

Write a short note about process. Unceremoniously, a process is a program in implementation. A process is too much than the program code, which is occasionally known as the tex

PSEUDO CODE FOR PROGRAM, THE PROGRAM WILL CHOOSE TWO RANDOM NUMBERS,THEN PR...

THE PROGRAM WILL CHOOSE TWO RANDOM NUMBERS,THEN PRINT THEM OUT AS AN ADDITION PROBLEM.THE PROGRAM WILL THEN ASK THE USERTO ENTER THE CORRECT ANSWER.IF THE ANSWER IS CORRECT,THE PRO

Exdplain many-to-many model, Many-to-Many Model The many-to-many model-...

Many-to-Many Model The many-to-many model- many user-level threads to many kernel-level threads avoids several of the limitations of the one-to-one model, although extending mu

What is micro-kernel?, Question 1 What is Micro-kernel? What are the benef...

Question 1 What is Micro-kernel? What are the benefits of Micro-kernel? Question 2 Explain seven state process models used for OS with necessary diagram. Differentiate betwee

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd