Pages

Thursday 24 May 2012

System Calls

System Calls
System calls provide the interface between a process and the operating system. System calls to be made
directly from a higher level language program. System calls for modern Microsoft Windows platforms
are part of the Win32 application programmer interface (API), which is available for use by all the
compilers written for Microsoft Windows. Consider writing a simple program to read data from one
file and to copy them to another file. the first input that the program will need is the names of the two
files: the input file and the output file. Once the two file are obtained, the program must open the input
file and create the output file. these operations requires another system call and may encounter possible
error conditions. open the input file, it may file that no file of the name exists or that the file is protected
against access. The Program should print a message on the console and then terminate abnormally input
file exists, then create a new output file. We may find on output file with the same name. Both files are
set up, we enter a loop that reads from the input file and writes to the output file read and write must
return status information regarding various possible error conditions. on input end of the file has been
reached, hardware failure occurred in the read after the entire file is copied, the program may close both
files, write a message to the console finally terminate normally. System calls occur in different ways,
depending on the computer in use. System calls cab be grouped roughly into five major categories:
process control, file management, device management, information maintenance and communications.

No comments:

Post a Comment