define system calls, Operating System


When a computer is started on, the program that executed first is named the ''operating system.'' It controls pretty much all applications in the computer. This adds who logs in, how disks are consumed, how memory is accessed, how the CPU is used.

The way that applications talk to the operating system is via ''system calls.'' A system call seems like a procedure call, but it's not same -- it is a request to the operating system to operate some application.

There are 5 basic system calls that Unix gives for file I/O.

        1.  int open(char *path, int flags [ , int mode ] );

        2.  int close(int fd);

        3.  int read(int fd, char *buf, int size);

        4.  int write(int fd, char *buf, int size);

        5.  off_t lseek(int fd, off_t offset, int whence);

The reason the operating system operates I/O is for safety -- the computer has to ensure that if my program has a exception in it, then it doesn't affect the system, and it doesn't collide other people's applications that can be running at later or the same time. Whenever you do screen or disk or network I/O, you have to go through the operating system and use system calls.




1541_System calls.png

Posted Date: 7/28/2012 8:12:03 AM | Location : United States

Related Discussions:- define system calls, Assignment Help, Ask Question on define system calls, Get Answer, Expert's Help, define system calls Discussions

Write discussion on define system calls
Your posts are moderated
Related Questions
Write a short note on Memory management. Memory management includes reallocating and allocating the memory space. The kinds of allocation of memory FIXED PARTITIONING

Multithreading - Operating systems that permit different parts of a software program to run concurrently. Operating systems that would come into this category are: Linux UNI

What are the advantages of Linked allocation? The benefits are a. No external fragmentation b. Size of the file does not require to be declared

What is external fragmentation? As process are removed from and loaded to the memory free memory space is bracken into pieces .external fragmentation take place when enough mem

Computing uses three number bases:- Binary (base 2), Octal (base 8) and Hexadecimal (base 16). Binary has been described before, although various catchphrases are used to describe

Direct communication With direct communication each process that requires to communicate must explicitly name the recipient or sender of the communication. The send and receive

Q. Why do several systems store the operating system in firm ware and others on disk? Answer: For certain devices such like handheld PDAs and cellular telephones a disk with

Define process? What is meant by state of a process? Process is a program in implementation. A process in general includes the process stack, which consists temporary data and