- 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.
- Python廣告數據挖掘與分析實戰
- 大數據可視化
- Libgdx Cross/platform Game Development Cookbook
- 大數據營銷:如何讓營銷更具吸引力
- Hadoop 3.x大數據開發實戰
- “互聯網+”時代立體化計算機組
- 探索新型智庫發展之路:藍迪國際智庫報告·2015(下冊)
- Instant Autodesk AutoCAD 2014 Customization with .NET
- 計算機組裝與維護(微課版)
- MySQL技術內幕:SQL編程
- 深入理解InfluxDB:時序數據庫詳解與實踐
- Scratch 2.0 Game Development HOTSHOT
- 成功之路:ORACLE 11g學習筆記
- 數據中心UPS系統運維
- Learn Selenium