kuntilanak
asked on
system calls in operating system
what is the purpose of a system call in an OS?
ASKER
It's not homework at all.. I just started a class in operating system and I just don't get it.. is it like a call to a program?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is it the same basically to ask the operating system to have certain access/features that the kernel mode supplies?
ASKER
Can you give me an example of an system call in windows?
From:
http://msdn.microsoft.com/en-us/library/bb540534(VS.85).aspx
Which has sample code using CreateFile, ReadFile, and WriteFile
http://msdn.microsoft.com/en-us/library/bb540534(VS.85).aspx
Which has sample code using CreateFile, ReadFile, and WriteFile
HANDLE hFile;
hFile = CreateFile(argv[1], // file to open
GENERIC_READ, // open for reading
FILE_SHARE_READ, // share for reading
NULL, // default security
OPEN_EXISTING, // existing file only
FILE_ATTRIBUTE_NORMAL, // normal file
NULL); // no attr. template
http://en.wikipedia.org/wiki/System_call