LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-04-2008, 11:41 AM   #1
Harini1111
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
Userspace Executable are kernel independent?


Hi,

User space applications are kernel independent? For example the application was build in kernel 2.4.20. Is that application will run on the machine which has kernel 2.6.24?

Thanks,
Harini.
 
Old 12-05-2008, 03:53 AM   #2
vladmihaisima
Member
 
Registered: Oct 2002
Location: Delft, Netherlands
Distribution: Gentoo
Posts: 196

Rep: Reputation: 33
Short answer: yes.

Long answer: the user space applications are linked with several libraries (like the c library) which use system calls to 'access' the kernel. If the interfaces don't change (like what the library provides to the application and what system calls the operating system provides) things will work.
 
Old 12-05-2008, 10:26 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
The comment about "libraries" is very important.

Applications may run in many different environments, where the actual mechanisms for "making a system call" may vary (as will the actual list of calls available). So, they don't make system-calls directly.

Instead, they avail themselves of libraries of existing code. (There are many hundreds in any system.) The libraries eventually make the system calls.

Libraries have major, minor, and tertiary version-numbers. What matters is the version of the library, not the version of the kernel. As long as the library is installed-and-working on a particular system, you may safely assume that it is, in fact, the appropriate library-version for use with that kernel (because it is, after all, "working").

If you, say, use "threads" in a 2.4.x-kernel system, they will "work," but they will work in a different way on a 2.6.x system. Your app may see the difference but it won't care about the difference. It's using "POSIX threads." It's using a library with a stable interface. The library that implements "POSIX threads," however, will have a very different implementation (and more capability, in the 2.6.x world).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Efficient kernel<->userspace data transfering maverik Programming 2 05-31-2008 02:24 AM
Using kernel functions and macros in userspace karimasif Linux - General 1 01-16-2008 11:34 PM
Passing IP options data to kernel from userspace kaushik1 Programming 2 12-26-2007 11:38 PM
a question about kernel copy userspace data linwenyuan Programming 0 03-28-2007 09:55 AM
Jiffies a kernel only entity, or is it allowed in userspace also? pat_and_cami Programming 0 03-10-2006 12:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration