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
What are the different types of semaphore? Principally the semaphore is able to be classified into two on the basis of their values a)      Counting semaphore: In counting s

What are the drawbacks of contiguous allocation of disk space? The disadvantages are a. Suffers from internal fragmentation b. Suffers from external fragmentation c. F

File System Interface and Implementation The Nachos file system, as distributed, uses a single-level index allocation method for data allocation of files. In the current design,

Define I/O and CPU Bursts   Applications typically to through cycle of CPU bursts and Input/output bursts. Since the CPU sits idle during I/O operations, efficiency is improved

Applications allocate memory in terms of the number of bytes that they need, but this level of granularity is too ?ne-grained for the operating system to manage the system memory i

Why interrupt can be used? The majority of the different parts of the PC need to send information to and from the processor and they expect to be able to get the processor's at


How can a user program disturb the normal operation of the system? a) Issuing illegal I/O operation. b) By accessing memory locations within the OS itself. c) Refusing to

advantage and dis advantage of threads

I am not getting what you have tried to describe here. Can you elaborate more about this, i will be thankful to you. Vinay