Find the answer to your Linux question:
Results 1 to 4 of 4
doing a little homework here and i'm trying to find out the basic concepts of how application request services from an operating system. from what i found out, ms-dos uses ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2004
    Posts
    9

    How Do Linux Apps Request Services From The OS?


    doing a little homework here and i'm trying to find out the basic concepts of how application request services from an operating system.

    from what i found out, ms-dos uses Interrupt Services, and Microsoft Windows uses the Windows API.

    but now, how do applications running on linux/bsd/unix system request services from the os?

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Do you mean system calls?

  3. #3
    Just Joined!
    Join Date
    Mar 2004
    Posts
    9

    i think it is system calls

    someone on another forum also mentioned system calls.
    so then linux use "system calls", and windows uses "windows api" ?

    is there such a term as "linux api" ?

    i read online also about "kernel api", is this different from "system api" ?

  4. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Okay, some Linux Programming 101:

    The Linux system is divided into kernel space and user space. Each space has its own virtual address space, etc.
    In kernel space, anything goes and there is no real protection against programmer error / malicious intents.
    User space is where applications are programmed. There is generally a much larger virtual address space, and there are a few more protections against programmer error / malicious intent.
    Now the kernel provides a kernel API, which is used by device drivers. This API provides a standard interface with which to act with physical devices, and is, like I said, only used by kernel modules.
    In user space, there are three types of functions:
    - User defined
    - Library
    - System calls
    User defined functions are the sort of one-shot functions used by programmers to simplify their lives ( i.e. calculate_data() or get_input_from_user() )
    Library functions are provided by a linkable library, such as the GNU C Library. These functions are more general purpose and can be used by any program that links against them.
    System calls are functions that are provided by the kernel to do more low-level operations ( such as read(), write() or fcntl().

    I hope this clears things up,
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •