이 블로그 검색

2012년 3월 30일 금요일

System Call


API - System Call - OS Relationship

System Calls

  • Programming interface to the services provided by the OS
  • Typically written in a high-level language (C or C++)
  • Mostly accessed by programs via a high-level Application Program Interface(API) rather than direct system call use
  • Three most common APIs are Win32 API for Windows, POSIX API for PISIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM)

System Call Implementation

  • Typically, a number associated with each system call
    • System-call interface maintains a table indexed according to these numbers
  • The system call interface invokes intended system call in OS kernel and returns status of the system call and any return values
  • The caller need know nothing about how the system call is implemented
    • Just needs to obey API and understand what OS will do as a result call
    • Most details of OS interface hidden from programmer by API
      • Managed by run-time support library (set of functions built into libraries included with compiler)
Standard C Library Example
C program invoking printf() library call, which calls write() system call

참고  : Operating System Concepts by WILEY 

댓글 없음:

댓글 쓰기