system calls in operating system

what is the purpose of a system call in an OS?
kuntilanakAsked:
Who is Participating?
 
mr_egyptianCommented:
Did you read the above article?  Do you have further/specific questions?

In essence, a system call is a request made to the operating system to perform some generally low-level operation, such as access to underlying hardware, file systems, network protocols, etc.
0
 
mr_egyptianCommented:
0
 
kuntilanakAuthor Commented:
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?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
kuntilanakAuthor Commented:
is it the same basically to ask the operating system to have certain access/features that the kernel mode supplies?
0
 
mr_egyptianCommented:
0
 
kuntilanakAuthor Commented:
Can you give me an example of an system call in windows?
0
 
mr_egyptianCommented:
From:

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

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.