官术网_书友最值得收藏!

Understanding system calls

An operating system is a piece of software designed to execute one or more applications simultaneously, while also providing the resources needed for those applications to execute. To accomplish this, the operating system must be capable of dividing hardware resources between all the applications executing on the system at the same time.

For example, most personal computers (PCs) have a single hard disk that stores all the files being used by the owner of the PC. On modern PCs, it's likely the user will want to execute several applications at oncefor example, a web browser and an office suite.

Both of these applications will need exclusive access to the hard disk at various times while executing. In the case of the web browser, this might be to cache websites to disk, while in the case of the office suite, this might be to store documents.

It's the operating system's responsibility to manage the applications and their access to the hard disk, to ensure that both the web browser and the office suite are able to execute properly. 

To accomplish this, operating systems provide an application programming interface (API) that applications can leverage to accomplish their tasks. Accessing the hard disk is an example of one of these tasks. The read() and write() functions are examples of APIs provided by POSIX-compliant operating systems for reading from and writing data to file descriptors.

Under the hood, these APIs make calls to the operating system using an application binary interface (ABI) called a system call. The act of making system calls to accomplish tasks provided by the operating system is called system programming, which is the main focus of this book. 

主站蜘蛛池模板: 黔西| 新宁县| 陕西省| 宾阳县| 崇文区| 哈尔滨市| 马山县| 子洲县| 裕民县| 西乌珠穆沁旗| 西城区| 巢湖市| 德钦县| 大安市| 锦屏县| 密云县| 准格尔旗| 金秀| 高安市| 镶黄旗| 芒康县| 安阳市| 蓝山县| 工布江达县| 山东| 阿拉善右旗| 太湖县| 峡江县| 河南省| 南充市| 微博| 兴和县| 饶河县| 临安市| 大石桥市| 长白| 玛多县| 云梦县| 嫩江县| 兴安县| 松桃|