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

Explain the beginthread function used in the netware, Explain the BeginThre...

Explain the BeginThread Function used in the NetWare example code BeginThread(MyThread Function, stack,size, arg) BeginThread creates a thread and places it on the NetWar

Briefly discuss on i/o hardware, Briefly discuss on I/O hardware? A con...

Briefly discuss on I/O hardware? A controller is a collection of electronics that can operate a port, a bus, or a device. A serial-port controller is an easy controller. It is

Define maintaining data on a per client basis, Define Maintaining Data on a...

Define Maintaining Data on a Per Client Basis Perhaps the most dramatic syntactical programming change for the application developer of client – server applications is maintain

Evolution of operating system, breifly write a note on about evolution of o...

breifly write a note on about evolution of operating system?

Write a script in linux to match a data directory, Write a script that uses...

Write a script that uses this idea to print output similar to the following: Files in this directory that match *~ : bash-scripts.html~ chimpanzee~ countdown~ countd

How many disks can be used effectively by one fast wide bus, Q. More than ...

Q. More than one disk drive is able to be attached to a SCSI bus. Especially a fast wide SCSI-II bus can be connected to at most 15 disk drives. Remember that this bus has a bandw

What is a dispatcher, What is a Dispatcher? The dispatcher is the modul...

What is a Dispatcher? The dispatcher is the module that gives control of the CPU to the process selected by the short- term scheduler. This function includes: Switching

Processes, draw a state diagram showing the transissions of a process from ...

draw a state diagram showing the transissions of a process from creation to termination

What is a sequential file, What is a sequential file? A file that is re...

What is a sequential file? A file that is read one record or block or parameter at a time in order, based on a tape model of a file.

Find the number of drives in the jukebox, Q. In a disk jukebox what would b...

Q. In a disk jukebox what would be the result of having more open files than the number of drives in the jukebox? Answer: Two bad results could result. One likelihood is star

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