OS-Process in Unix

When Unix is started, the kernel ‘kick-starts’ process generation by creating an initial process with an process-id (PID) of O and hence oft...

When Unix is started, the kernel ‘kick-starts’ process generation by creating an initial process with an process-id (PID) of O and hence often referred to as process 0 sched, since it is responsible for process scheduling.
  •  In some systems process 0 is called as swapper which is responsible for memory management responsible for memory management.
  •  Another function of process 0 is to spawn another process, with an PID of 1, which is called process1 or Init. Init is ancestor of all other processes in the system.
  •  Init is responsible for users login & initiate their own processes.
  •  Getty is a process one for each process which monitor the terminal.
  •  When user try to login getty runs a login process, starts a shell process for the user.
  •  The processes to be activated by init are specified in a file called /etc/init tab. Subsequently the shell may spawn further process on the request of the user.

When the user logs out init will re-spawn getty to coninue ot monitor the terminal. Init will generally also spawn other processes called daemons, which are not associated with individual users but continuously unattached to attend to certain system administration functions such as line printer. Spooling, monitoring network activity etc.

Creation of new process in Unix involves two system calls namely fork & exec.
  •  Fork will create a copy of the calling process. Hence after execution processes running.
  •  The exec is to load another program which replaces the original code of child process in memory. The fork system call returns a value which for the child process is 0 and for the parent process is the new PID of the child process.

Best Online Tutorials | Source codes | Programming Languages: OS-Process in Unix
OS-Process in Unix
Best Online Tutorials | Source codes | Programming Languages
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content