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

In JavaScript, Ask quesIn JavaScript, what is event handling tion #Minimum ...

Ask quesIn JavaScript, what is event handling tion #Minimum 100 words accepted#

Define paging , Paging: Only the needed memory pages are moved to main me...

Paging: Only the needed memory pages are moved to main memory from the swap machine for execution. Process size does not matter. Produce the concept of the virtual memory. It

Program of calculator and controller - fork, Program of Calculator and Con...

Program of Calculator and Controller with the fork, exec, and wait system calls The objective of this assignment is to get you to be comfortable with the fork(), exec(), and wai

Use of the computing hardware, Q. We have stressed the require for an oper...

Q. We have stressed the require for an operating system to make efficient use of the computing hardware. When is it suitable for the operating system to forsake this principle and

Explain the architecting for threads, Explain the Architecting For Threads ...

Explain the Architecting For Threads When available, threads are an integral part of any multitasking server application program. It is important that the operating system prov

Can a direct access file be read sequentially, Can a direct access file be ...

Can a direct access file be read sequentially? Explain. Yes. Keep a counter, cp, initially set to 0. After reading record cp, increment cp.

What is the basic function of assembler, Q. What is the basic function of A...

Q. What is the basic function of Assembler ? Input to an assembler is an assembly language program. Output is an object program and information which enables the loader to prep

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