Skip to main content
Top

2018 | OriginalPaper | Chapter

3. Process Management in Unix/Linux

Author : K. C. Wang

Published in: Systems Programming in Unix/Linux

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

This chapter covers process management in Unix/Linux. It explains the principle of multitasking and introduces the process concept. It uses a programming example to illustrate the principles and techniques of multitasking, context switching and processes. The multitasking system supports dynamic process creation, process termination, process synchronization by sleep and wakeup, process relations and implementation of process family tree as a binary tree, allowing parent process to wait for child process termination. It provides a concrete example of how process management functions work in an operating system kernel. Then it explains the origin of processes in Unix/Linux, from the initial process during booting to INIT process, daemon processes, login processes and sh process for user command execution. Next, it explains the execution modes of processes, transitions from User mode to Kernel mode by interrupts, exceptions and system calls. Then it describes Unix/Linux system calls for process management, which include fork, wait, exec and exit. It explains the relationship between parent and child processes, including a detailed description between process termination and the wait operation by parent process. It explains how to handle orphan processes by the INIT process, including subreaper processes in current Linux, and it demonstrates subreaper process by example. Then it explains changing process execution image by exec in detail, which includes the execve system call, command-line parameters and environment variables. It explains the principles and techniques of I/O redirections, pipes and shows pipe programming by examples. The programming project of this chapter is for the reader to integrate the concepts and techniques of process management to implement a sh simulator for command execution. The sh simulator works exactly the same as the standard sh. It supports executions of simple commands, commands with I/O redirections and multiple commands connected by pipes.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literature
go back to reference Bach, M. J., “The Design of the Unix operating system”, Prentice Hall, 1990 Bach, M. J., “The Design of the Unix operating system”, Prentice Hall, 1990
go back to reference Bovet, D. P., Cesati, M., Understanding the Linux Kernel, O’Reilly, 2005 Bovet, D. P., Cesati, M., Understanding the Linux Kernel, O’Reilly, 2005
go back to reference Silberschatz, A., P.A. Galvin, P.A., Gagne, G, “Operating system concepts, 8th Edition”, John Wiley & Sons, Inc. 2009 Silberschatz, A., P.A. Galvin, P.A., Gagne, G, “Operating system concepts, 8th Edition”, John Wiley & Sons, Inc. 2009
go back to reference Love, R. Linux Kernel Development, 2nd Edition, Novell Press, 2005 Love, R. Linux Kernel Development, 2nd Edition, Novell Press, 2005
go back to reference Stallings, W. “Operating Systems: Internals and Design Principles (7th Edition)”, Prentice Hall, 2011 Stallings, W. “Operating Systems: Internals and Design Principles (7th Edition)”, Prentice Hall, 2011
go back to reference Tanenbaum, A.S., Woodhull, A.S., “Operating Systems, Design and Implementation, third Edition”, Prentice Hall, 2006 Tanenbaum, A.S., Woodhull, A.S., “Operating Systems, Design and Implementation, third Edition”, Prentice Hall, 2006
go back to reference Wang, K.C., “Design and Implementation of the MTX Operating System”, Springer A.G. 2015 Wang, K.C., “Design and Implementation of the MTX Operating System”, Springer A.G. 2015
Metadata
Title
Process Management in Unix/Linux
Author
K. C. Wang
Copyright Year
2018
DOI
https://doi.org/10.1007/978-3-319-92429-8_3

Premium Partner