Solved What is Userland

Hi Phishfry

In wikipedia the agreed upon definition is: The term userland (or user space) refers to all code that runs outside the operating system's kernel.[1] Userland usually refers to the various programs and libraries that the operating system uses to interact with the kernel: software that performs input/output, manipulates file system objects, application software etc. (https://en.wikipedia.org/wiki/User_space).

For a thread about the difference between userland and kernel please see: http://unix.stackexchange.com/questions/137820/whats-the-difference-of-the-userland-vs-the-kernel

Both Linux and FreeBSD use the term in the same way but code implementation etc. can be different. See: http://unix.stackexchange.com/quest...ifferences-between-bsd-and-gnu-linux-userland

For more about GNU and Linux see: https://www.gnu.org/gnu/linux-and-gnu.en.html

Hope that answered some of your questions.

Regards Stig
 
That was an excellent reply.

So would clang compiler and the make system tools be considered kernelspace or userspace applications?

edit++ I see they are userspace
 
Sometime ago I have heard that "usr" is the short form of "unix system resources" and not of "user". It can be mixed up easily.
I've never heard that one. I strongly suspect that is a (relatively) modern incorrect invention. DMR's 1979 Unix V7 home directory was /usr/dmr (V7/etc/passwd). Similarly for 4BSD in 1980, they were all /usr/username (4BSD/etc/passwd). /home is a relatively modern convention.

That all tends to support the simple explanation that it's an abbreviation of "user", both at Bell Labs and Berkeley. Additionally, the system stuff is outside /usr throughout history (from Bell Labs to FreeBSD CURRENT), which contradicts that other meaning. Things inside /usr are generally for user use/service rather than system use (i.e. the system is intended to retain basic functionality without the /usr filesystem mounted). Some of the history behind the traditional filesystem layout is down to the need to split Unix across multiple disk packs on the PDP-11, if memory serves.
 
Dear Murph,
now I have googled "usr" + "unix system resources". There are basically two opinions but I have not digged long. Your opinion seems more logic to me. From the search results this questions seems to have a high potential to start some flame war. This was not my intention. Thank you for your detailed answer. Just "flugelhorn" and "bullfrog" are better :D.
 
I strongly suspect that is a (relatively) modern incorrect invention.

https://en.wikipedia.org/wiki/Backronym

My guess is that most of the root-level directories with names more than three characters long came along years after AT&T UNIX was developed. (Obvious ones are the FreeBSD- and NetBSD-specific /rescue, and /media, as mounting external storage media wasn't a common---or perhaps not even a possible---thing to do back in the 1970s.) /usr is just shortened to three letters to fit the naming convention.
 
I'm not sure if the story is correct or somewhat apocryphal but how I've heard it is that the /usr hierarchy was only invented because there was a disk space problem on one of the servers running a very early version of UNIX (possibly the original AT&T UNIX). The system admin had to quickly decide how fix the problem and he just basically mounted another disk onto the system for moving some of the system files to it and called the mountpoint /usr for whatever reason. Of course he had to hack it with symlinks and such to make it work.
 
I'm not sure if the story is correct or somewhat apocryphal but how I've heard it is that the /usr hierarchy was only invented because there was a disk space problem on one of the servers running a very early version of UNIX (possibly the original AT&T UNIX). The system admin had to quickly decide how fix the problem and he just basically mounted another disk onto the system for moving some of the system files to it and called the mountpoint /usr for whatever reason. Of course he had to hack it with symlinks and such to make it work.
As far as I'm aware, there is some truth in that. The "system admin" was quite likely Ken Thompson or Dennis M. Ritchie, or someone working closely with them, so pretty much counts as a design decision. The system would have been a PDP-7, PDP-8, or PDP-11. The choice, as best as I have been able to tell over the decades, was to split it down the middle between system and user stuff (sometimes a slightly grey area). Sometime in that same era, /var also appeared as a separate filesystem, for the system's "variant" data, and would also have been due to the need to split across multiple DEC disk packs. By the time they had split into 3 filesystems / disk packs, that would have been using somewhere around a half-rack of disk packs/drives in the technology of the day (each drive was around 11–12 vertical inches, if memory serves). That would all be in the days of "Research Unix" at Bell Labs.
 
Just wanted to say "thank you" for this extremely informative discussion on "userland" and key system directories. I remember I tried figuring this out on my own as well, because even the Gentoo wiki was not clear on the matter. /usr always sounded to me like "user", but then I thought that was just my tendency to directly read acronyms.
 
code that runs outside the operating system

My mental image is other way around, OS is a ball, fully covered on the surface by device warts and in the inside, there's the userland, cosy and protected.

Juha

Hmm, just realized, it's in embargo :/
 
Back
Top