owned this note
owned this note
Published
Linked with GitHub
107-1 系統程式設計
===
- [系統程式設計目錄](https://hackmd.io/@0xff07/rJsBUhqHY)
4: File I/O: The Universal I/O Model
---
- [**I/O Basics**](https://hackmd.io/@0xff07/H1Q-ECorF)
- [**Opening/Reading/Writing a File** --- open, read, write](https://hackmd.io/@0xff07/B1MoQAorF)
- [**Changing the File Offset** --- llsleek](https://hackmd.io/@0xff07/HkVq5tcBY)
2: System Programming Concepts
---
- [**Fundamental Concepts**](https://hackmd.io/@0xff07/BkBHGncrY)
- [**System Call**](https://hackmd.io/@0xff07/SJEjV5qSt)
5: File I/O: Further Details
---
- [**Duplicating File Descriptors** --- dup](https://hackmd.io/@0xff07/ryKp3tqSY)
- [**Duplicating File Descriptors** --- dup2](https://hackmd.io/@0xff07/H1mp0Kqrt)
- [**File I/O at a Specified Offset** --- pread, pwrite](https://hackmd.io/@0xff07/SJ0opY5St)
- [**File Control Operations** --- fcntl](https://hackmd.io/@0xff07/Hydklq5BK)
- [**Operations Outside the Universal I/O Model** --- ioctl](https://hackmd.io/@0xff07/HJE9xqcSF)
13: File I/O Buffering
---
- [**Kernel Buffering of File I/O: The Buffer Cache**](https://hackmd.io/@0xff07/rkUBr55BK)
- [**Standard I/O Library**](https://hackmd.io/@0xff07/HJZBU5cSY)
- [**Alignment and Binary I/O** --- fread, fwrite](https://hackmd.io/@0xff07/BJr6w99rY)
63: Alternative I/O Models
---
- [**Non-Blocking I/O** --- O_NONBLOCK](https://hackmd.io/@0xff07/r1W63icHt)
- [**I/O Multiplexing** --- select](https://hackmd.io/@0xff07/rJis6o5rY)
- [**I/O Multiplexing** --- poll](https://hackmd.io/@0xff07/rJqGzyQIt)
55: File Locking
---
- [**File Locking** --- flock, fcntl](https://hackmd.io/@0xff07/Syg8y2qrK)
14: File System
---
- [**File-System Architecture**](https://hackmd.io/@0xff07/r1MM9q9SK)
- [**i-nodes**](https://hackmd.io/@0xff07/HJ994jcHt)
18: Directories and Links
---
- [**File Types**](https://hackmd.io/@0xff07/HyETu55BK)
- [**Hard Link and Soft Link** --- link, linkat, unlink](https://hackmd.io/@0xff07/SyPpIo5SF)
15: File Attributes
---
- [**Retrieving File Information** --- stat, fstat, lstat](https://hackmd.io/@0xff07/Hk3UtcqSK)
- [**File Timestamps** --- utime, utimes](https://hackmd.io/@0xff07/rkQjwi9HF)
- [**File Permissions** --- chmod, fchmod](https://hackmd.io/@0xff07/B1YzqjqSF)
- [**File Ownership** --- umask, chown](https://hackmd.io/@0xff07/Hy2AoscBt)
8: Users and Groups
---
- [**Users and Groups**](https://hackmd.io/@0xff07/HJwLe3qHY)
41: Fundamentals of Share Libraries
---
- [**ELF Format**](https://hackmd.io/@0xff07/B1VaMUYXi)
- [**Dynamic Linking and Loading**](https://hackmd.io/@0xff07/Bk5Gb35SK)
- [**Shared Libraries**](https://hackmd.io/@0xff07/B1ldHBK7j)
6: Processes
---
- [**Memory Layout of a Process**](https://hackmd.io/@0xff07/SkDqmncBt)
- [**Virtual Memory Management**](https://hackmd.io/@0xff07/Bkzp484UK)
7: Memory Allocation
---
- [**Allocating Memory on the Heap** --- malloc](https://hackmd.io/@0xff07/BJljZSmcK)
25: Process Termination
---
- [**Terminating a Process** --- exit, \_exit](https://hackmd.io/@0xff07/BkCL54Q9K)
24: Process Creation
---
- [**Creating a New Process** --- fork](https://hackmd.io/@0xff07/BkplS35BY)
- [**The** vfork() **System Call**](https://hackmd.io/@0xff07/HkBAr29rt)
26: Monitoring Child Processes
---
- [**Waiting on a Child Process** --- wait**](https://hackmd.io/@0xff07/rkvI_T5BY)
- [**Orphans and Zombies**](https://hackmd.io/@0xff07/rkrzUp5rY)
- [**Race Condition**](https://hackmd.io/@0xff07/SJxnLT5SY)
27: Program Execution
---
- [**Executing a New Program** --- execve](https://hackmd.io/@0xff07/S14qP6qBY)
8: Process Credentials
---
- [**Process Credentials** --- UID, GID, EUID, EGID, SUID](https://hackmd.io/@0xff07/S1BhNKRHK)
(Container Primitives)
---
- [**Container Internals**](https://hackmd.io/@0xff07/SJbhUz0Ot)
- [**Namespaces**](https://hackmd.io/@0xff07/r1wCFz0ut)
- [**User Namespaces**](https://hackmd.io/@0xff07/S1XaIEjtF)
- [**Network Namespaces**](https://hackmd.io/@0xff07/SJzOwViYF)
- [**Cgroup v2**](https://hackmd.io/@0xff07/Bkse9fRdF)
- [**Cgroup v1**](https://hackmd.io/@0xff07/SymWKMUYK)
39: Capabilities
---
- [**The Linux Capabilities**](https://hackmd.io/@0xff07/BkW8c6PYt)
29: Threads: Introduction
---
- [**Thread Overview**](https://hackmd.io/@0xff07/B1hQG9fIF)
- [**pthread Basics** --- pthread_create, pthread_exit, pthread_join](https://hackmd.io/@0xff07/rkvtmcf8K)
30: Threads: Synchronization
---
- [**Protecting Accesses to Shared Variables: Mutexes** --- pthread_muxex_t](https://hackmd.io/@0xff07/HJMgvTfIK)
- [**Reader-Writer Lock** --- pthread_rwlock_t](https://hackmd.io/@0xff07/rkGCwpzIY)
- [**Signaling Changes of State: Condition Variables** --- pthread_cond_t](https://hackmd.io/@0xff07/HJ8a1kQUK)
- [**Atomic Operations** --- (legacy) gcc `__sync` built-ins](https://hackmd.io/@0xff07/Byaz-M2Ht)
32: Threads: Thread Cancelation
---
- [**Canceling a Thread** --- pthread_cancel](https://hackmd.io/@0xff07/r1H23izUF)
(Classical Synchronization Problems)
---
- [**Introduction to Locks**](https://hackmd.io/@0xff07/rkfxnr4LF)
- [**Producer-Consumer Problem**](https://hackmd.io/@0xff07/Hkv7JxV8K)
- [**Reader-Writer Problem**](https://hackmd.io/@0xff07/r1TcklEIF)
- [**Dining Philosopher Problem**](https://hackmd.io/@0xff07/ryuzggN8K)
- [**Classic Deadlock Solutions**](https://hackmd.io/@0xff07/S1YTAAfUK)
20: Signals: Fundamental Concepts
---
- [**Signal Concepts and Overview**](https://hackmd.io/@0xff07/rk7-qpqBF)
- [**Changing Signal Dispositions** --- signal](https://hackmd.io/@0xff07/S1Wls6qSt)
- [**Changing Signal Dispositions** --- sigaction](https://hackmd.io/@0xff07/Skyh6aqSF)
- [**Sending Signals** --- kill, raise](https://hackmd.io/@0xff07/HJMZ3a5Bt)
- [**Signal Sets** --- sigemptyset, sigaddset, sigprocmask](https://hackmd.io/@0xff07/BJuZTpcrK)
34: Process Groups, Sessions, and Job Control
---
- [**Process Groups, Sessions, and Job Control** --- PGID, SID](https://hackmd.io/@0xff07/rkdiEnqBF)
21: Signals: Signal Handlers
---
- [**Interruption and Restarting of System Calls**](https://hackmd.io/@0xff07/HypisTqHY)
- [**Designing Signal Handlers**](https://hackmd.io/@0xff07/BkIPaCsHK)
22: Signals: Advanced Features
---
- [**Timing and Order of Signal Delivery**](https://hackmd.io/@0xff07/HkDwRa5BF)
- [**Waiting for a Signal Using a Mask** --- sigsuspend](https://hackmd.io/@0xff07/rJFQxR5SF)
43: Interprocess Communication Overview
---
- [**A Taxonomy of IPC Facilities**](https://hackmd.io/@0xff07/S1d6ISGFY)
44: Pipes and FIFOs
---
- [**Creating and Using Pipes** --- pipe, popen, pclose](https://hackmd.io/@0xff07/rJjRXAcHt)
- [**FIFOs** --- mkfifo](https://hackmd.io/@0xff07/rkDyHRqHK)
46: System V Message Queues
---
- [**System V Message Queue** --- msgget, msgctl, msgsnd, msgrcv](https://hackmd.io/@0xff07/BkJm-0cHt)
52: POSIX Message Queues
---
- [**POSIX Message Queue** --- mq_open, mq_send](https://hackmd.io/@0xff07/HJ63WCcHF)
47: System V Semaphore
---
- [**System V Semaphore** --- semget, semctl, semop](https://hackmd.io/@0xff07/rJ7CM09Bt)
53: POSIX Semaphore
---
- [**POSIX Semaphore** --- sem_init, sem_post, sem_wait](https://hackmd.io/@0xff07/B1iEA1VIY)
48: System V Shared Memory
---
- [**System V Shared Memory** --- shmget, shmat](https://hackmd.io/@0xff07/r18d70qrF)
37: Daemons
---
- [**Creating a Daemon**](https://hackmd.io/@0xff07/S1oGSMnBF)
(Memory)
---
- [**Memory Allocator**](https://hackmd.io/@0xff07/SkYOr8ELF)
- [**SL\[AUO\]B**](https://hackmd.io/@0xff07/r1Ya8Wc-K)
Mass Storage
---
- [**Linux Block I/O Layer**](https://hackmd.io/@0xff07/BypWKu4LY)