开发者

difference between command , function and systemcall

开发者 https://www.devze.com 2023-02-20 20:18 出处:网络
What is the difference between a comm开发者_如何转开发and, function and systemcall?This is probably homework help, but anyhow:

What is the difference between a comm开发者_如何转开发and, function and systemcall?


This is probably homework help, but anyhow:

  • Command - A program (or a shell built-in) you execute from (probably) your command shell.
  • Function - A logical subset of your program. Calling one is entirely within your process.
  • Systemcall - A function that is executed by your operating system; a primary way of using OS features like working with a file system or using the network.


A command can be a program, which in turn is comprised of functions, which themselves can execute system calls.

For example, the 'cp' command in Unix-like systems copies files. Its implementation includes functions which perform the copying. Those functions themselves execute system-calls like open() and read().

They are all just abstractions of a set of computer instructions which perform a given task.

0

精彩评论

暂无评论...
验证码 换一张
取 消