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

Define abbreviation of sstf, SSTF stands for Abbreviation of SSTF is S...

SSTF stands for Abbreviation of SSTF is Shortest-Seek-time-first scheduling

Explain acyclic-graph directories, Acyclic-graph directories An acyclic...

Acyclic-graph directories An acyclic graph permits directories to have shared subdirectories and files. The similar file or subdirectory may be in two dissimilar directories. A

Transfer time, A hard-disk drive reads “120 GB HDD 7200 rpm 3 GB/sec transf...

A hard-disk drive reads “120 GB HDD 7200 rpm 3 GB/sec transfer rate”. If the drive has a sector size of 512 bytes, what is the average rotational latency and transfer time to read

Define secondary memory, Define secondary memory. This memory holds tho...

Define secondary memory. This memory holds those pages that are not there in main memory. The secondary memory is usually a high speed disk. It is called as the swap device, an

Define middleware to ease the low-level protocol burden, Define Middleware ...

Define Middleware to Ease the Low-Level Protocol Burden Fortunately, many products are available today to ease the low-level protocol burden on the application programmer. Midd

What is graceful degradation, What is graceful degradation? In multipro...

What is graceful degradation? In multiprocessor systems, failure of single processor will not halt the system, but only slow it down by sharing the work of failure system by ot

Could you replicate a multilevel directory structure, Q. Could you replica...

Q. Could you replicate a multilevel directory structure with a single-level directory structure in which arbitrarily long names can be used? If your answer is yes describe how you

Research proposal, what topic i choose for os research proposal

what topic i choose for os research proposal

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