The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
system calls sangramdas BSD 1 05-08-2008 05:48 PM
System calls ? TECHRAMESH SUN Solaris 1 05-15-2006 10:05 PM
System calls? PlunderBunny UNIX for Dummies Questions & Answers 2 03-26-2006 06:12 PM
System calls for cp and mv gaurava99 UNIX for Dummies Questions & Answers 2 04-25-2005 07:04 AM
System Calls clickonline1 UNIX for Dummies Questions & Answers 2 10-06-2001 02:30 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-19-2008
Registered User
 

Join Date: Feb 2008
Posts: 13
System calls

why user is not able to switch from user to kernel mode by writing the function whose code is identical to system call.
Reply With Quote
Forum Sponsor
  #2  
Old 03-19-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,664
A system call usually involves a single machine language instruction that behaves very much like an interrupt. Anyone can invoke it. But it jumps to a specific routine in the kernel called syscall. syscall can only do system calls. The jump to syscall also switch into kernel mode. There is not a way to to switch to kernel mode and jump to arbitrary point in the kernel. You must jump to syscall. (At least this is what happens on a reasonably designed computer.) Also, there is no way to switch kernel mode and continue executing user code even if you are the kernel. In kernel mode you must be running code in kernel address space.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0