mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
vault backup: 2022-09-29 09:51:54
This commit is contained in:
parent
1ebb7e67cb
commit
7ea7075614
@ -4,6 +4,9 @@ aliases:
|
|||||||
tags:
|
tags:
|
||||||
- cosc204
|
- cosc204
|
||||||
- lecture
|
- lecture
|
||||||
|
sr-due: 2022-10-02
|
||||||
|
sr-interval: 3
|
||||||
|
sr-ease: 250
|
||||||
---
|
---
|
||||||
|
|
||||||

|

|
||||||
@ -41,6 +44,30 @@ automatically executes exit after the last statement.
|
|||||||
- all rsouces are dallocated by the OS
|
- all rsouces are dallocated by the OS
|
||||||
|
|
||||||
they can also die more violently
|
they can also die more violently
|
||||||
|
- `kill` command
|
||||||
|
- you can only processes you 'own'
|
||||||
|
- Orphan process: a process whose parent terminated (inherited by init)
|
||||||
|
- Zombie process: one which terminated, but its live parent process is not WAITING for it. Since no process is receiving its exit status, it stays in the process table
|
||||||
|
|
||||||
# signal and pipe for inter process communication
|
# signal and pipe for inter process communication
|
||||||
|
## signal
|
||||||
|
communication between OS kernel and processes and between processes
|
||||||
|
|
||||||
|
- process can install a handler (function) for a signal using the system call signaction() except for SIGKILL
|
||||||
|
- The default action for a signal is usually to kill/terminate the process if a handler is not installed.
|
||||||
|
- Other actions are ignore, core (dump a large file for debugging), stop(stop the process), and continue. The last two actions are used by debuggers like gdb to debug a program.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## pipe
|
||||||
|
connect process output and another process input.
|
||||||
|
|
||||||
|
uni-directional channel
|
||||||
|
|
||||||
|
file descriptors
|
||||||
|
- 0 - stdin
|
||||||
|
- 1 - stdout
|
||||||
|
- 2 - sterr
|
||||||
|
|
||||||
|
you can make file descriptors point to the same file using dup/dup2/dup3
|
||||||
@ -45,6 +45,8 @@ tags:
|
|||||||
- [14-processes-and-system-calls](notes/14-processes-and-system-calls.md)
|
- [14-processes-and-system-calls](notes/14-processes-and-system-calls.md)
|
||||||
- [15-file-systems](notes/15-file-systems.md)
|
- [15-file-systems](notes/15-file-systems.md)
|
||||||
- [16-device-drivers](notes/16-device-drivers.md)
|
- [16-device-drivers](notes/16-device-drivers.md)
|
||||||
|
- [17-processes-communication](notes/17-processes-communication.md)
|
||||||
|
-
|
||||||
|
|
||||||
# Archive
|
# Archive
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user