- Hands-On System Programming with C++
- Dr. Rian Quinn
- 199字
- 2021-07-02 14:42:28
Threading and process creation
Executing multiple tasks simultaneously can be accomplished by asking the operating system to create additional threads (or even new processes). This is a common task in system programming, and there are numerous system calls to get the job done.
A process is a unit of execution that has a set of resources assigned to it (for example, memory, file descriptors, and so on.) Each application is made up of at least one process, but they can contain more than one (for example, a shell is an application that is specifically designed to run several child processes).
Each process is scheduled by the operating system to execute for a limited amount of time before the next process is given access to the CPU, and this cycle continues as needed.
Threads are like processes, but they share the same resources as other threads of the same process. Threads provide an application with an opportunity to create tasks that are capable of executing in parallel, without the need for inter-process communication methods. In Chapter 12, Learning to Program POSIX and C++ Threads, we will learn how to program threads using both POSIX and C++ APIs.
- 卷積神經(jīng)網(wǎng)絡(luò)的Python實現(xiàn)
- Live Longer with AI
- 大數(shù)據(jù):規(guī)劃、實施、運維
- 區(qū)塊鏈:看得見的信任
- 從0到1:JavaScript 快速上手
- 編寫有效用例
- Augmented Reality using Appcelerator Titanium Starter
- SAS金融數(shù)據(jù)挖掘與建模:系統(tǒng)方法與案例解析
- 聯(lián)動Oracle:設(shè)計思想、架構(gòu)實現(xiàn)與AWR報告
- 數(shù)據(jù)分析師養(yǎng)成寶典
- Unity 2018 By Example(Second Edition)
- 機器學習:實用案例解析
- SOLIDWORKS 2018中文版機械設(shè)計基礎(chǔ)與實例教程
- 數(shù)字化轉(zhuǎn)型實踐:構(gòu)建云原生大數(shù)據(jù)平臺
- 標簽類目體系:面向業(yè)務(wù)的數(shù)據(jù)資產(chǎn)設(shè)計方法論