What's the difference and connection between API(Application Programming Interface) and SC(System Call)?

Q1.Why user program cannot access the services provided by kernel directly?

 

A1:  For in linux, the space of program operating is divided by two.the one is kernel space,the other is user space.This two spaces are isolate in logic.So user program cannot access the kernel directly.

 

Q2. What is SC?

 

A2: SC is a special kind of interface. Through it, user can access the kernel.The System Call decided the position that user accesses.

 

Q3. What is API?

 

A3: API is application programming interface that make up by some predefined functions.There is no necessary connection between API and kernel.

 

Q4: Difference and connection between each other?

 

A4: Difference: SC needs to contact with kernel,but API don not.

      Connection: An API may be needed one or more SCs to finish the specified function,or maybe do not. Simply speaking, when an api needs to access the kernel, system call is needed. or else not.

 

Above is reference to the blog of http://mwtx.blog.163.com/blog/static/389391292009102510154927/

Thanks a lot to the author.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值