difference between command , function and systemcall
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.
精彩评论