UNIX and C Processes Flashcards
(64 cards)
What is POSIX?
Portable Operating System Interface; IEEE Computer Society standard from 1988 that enables developers to write portable applications across UNIX variants and other operating systems.
What does POSIX define?
POSIX defines an application programming interface (API), command line shells, utility interfaces, and describes fundamental services needed for applications.
What is the Single UNIX Specification?
A standard created by The Open Group in 1995 to ensure compatibility across UNIX platforms; technically conforms to POSIX.
Which Linux distributions are officially certified UNIX systems?
Only Inspur K-UX and EulerOS are officially certified UNIX systems.
What are examples of fully certified UNIX systems?
Oracle Solaris, HP-UX, IBM AIX, Apple MacOS X (version 10.5 onwards), Inspur K-UX, and Huawei EulerOS.
What are the two fundamental elements of UNIX?
Everything in UNIX is either a file or a process.
What is a PID?
Process IDentifier; a unique identifier assigned to every process in a UNIX system.
What are the parent-child relationships in UNIX processes?
Every process has exactly one parent (except the system swapper with PID 0), and can have zero or more children.
What is the system swapper/init process?
The system swapper has PID 0 and is the ancestor of every process; init or systemd (PID 1 on Linux) is part of the Linux kernel.
How is a child process created in UNIX?
A child process is created (“spawned”) when the system fork command is called.
What does the ps command do?
Shows a snapshot of processes.
What does the top command do?
Shows a real-time list of processes.
What does & do when placed after a command?
Runs the process in the background.
What does the jobs command show?
Lists the background child processes of the current process.
What does the bg command do?
Puts a paused job into the background.
What does the fg command do?
Brings a background job into the foreground.
What does the kill command do?
Terminates a process.
What does the nohup command do?
Keeps a child process running even when the parent process finishes.
What does the nice command do?
Lowers the priority of a child process as you spawn it.
What does the renice command do?
Lowers the priority of a current running process.
How do you show all processes from the same terminal?
ps
How do you show full details of your processes?
ps -f
How do you show all processes whose command line includes “python” (ignoring case)?
ps -ef | grep -i python
How do you show the parent/child hierarchy of all processes?
ps -efH | less