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
Suppose we have 3 processes running at the same time as shown in the following table. Each resource only has one instance. Show a possible scenario of resource allocation that r

Explain Wait for Graph a. Use a resource allocation graph to derive a wait-for graph.  b. Wait-for graph acquired by making an edge from p 1 to p 2 iff p 1 is waiting for

Paging: Only the needed memory pages are moved to main memory from the swap machine for execution. Process size does not matter. Produce the concept of the virtual memory. It

draw a state diagram showing the transissions of a process from creation to termination

Explain Belady's Anomaly? Also called FIFO anomaly. Usually, on enhancing the number of frames allocated to a process virtual memory, the process implementation is faster, beca

What is a thread? A thread or else called a lightweight process (LWP) is a basic unit of CPU utilization, it comprises of a thread id, a program counter, a register set and a s


ADVANTAGES AND INCONVENIENCES OF KLT Advantages: the kernel be able to simultaneously schedule many threads of the same process on many processors blocking

What are the different ways in which a thread can be cancelled? Cancellation of a target thread may happen in two different scenarios: Asynchronous cancellation: One thr

Q. Presume that the following processes arrive for execution at the times indicated. Every process will run the listed amount of time. In responding the questions use non pre-empti