General questions about (UNIX) OS architecture

learn more… | top users | synonyms

1
vote
3answers
47 views

Get Linux architecture from /proc filesystem

I'm writing a program in Java and I need to determine the architecture for which Linux was compiled. I need something like uname -m, but without running any program, but instead from the /proc ...
1
vote
1answer
25 views

apt mirror chooses wrong architecture

I tried to do a repository mirror using apt-mirror and it inexplicably choose the wrong architecture. This is the architecture of the mirroring machine: uname -a Linux MyWorkStation 3.2.0-76-generic ...
-2
votes
5answers
119 views

Why does superuser exist in Unix/Linux?

I know that some system tasks are permitted only to privileged users/processes, but still a super user (usually the root in Unix/Linux) or administrator can present so much problems in regards to ...
2
votes
1answer
34 views

Difference between architecture and platform in linux kernel

I want to know the difference between architecture and platform in Linux kernel. When I had downloaded the latest kernel tarball, observed that a directory named with arch, it contains different names ...
1
vote
3answers
63 views

How could Linux use 'sda' device file when it hasn't been installed?

I am installing CentOS Linux distribution on a fresh new machine. Just for learning. I am new to Linux. At the partition step, CentOS tells me that it has detected a sda HD in my machine and I should ...
2
votes
1answer
31 views

How do permissions work with the GUI

There are several things that you must have superuser privileges to do from a terminal that can be done from a normal user account via the gui. e.g. Poweroff/reboot mount/unmount media I ...
50
votes
8answers
6k views

On Unix systems, why do we have to explicitly `open()` and `close()` files to be able to `read()` or `write()` them?

Why do open() and close() exist in the Unix filesystem design? Couldn't the OS just detect the first time read() or write() was called and do whatever open() would normally do?
0
votes
1answer
32 views

Purpose of the binary-all architecture folder folder on debian repositories?

Which is the purpose of the binary-all architecture folder on debian repositories?
45
votes
2answers
4k views

Why is rm allowed to delete a file under ownership of a different user?

From the post Why can rm remove read-only files? I understand that rm just needs write permission on directory to remove the file. But I find it hard to digest the behaviour where we can easily delete ...
2
votes
2answers
46 views

Usability of /usr/share today

How is separating architecture dependent static data from architecture independent static data useful today? I imagine it could theoretically be useful in multi-architecture networks with a ...
4
votes
2answers
510 views

How does the Linux login work? [duplicate]

I am wondering how the login actually works. It certainly is not part of the kernel, because I can set the login to use ldap for example, or keep using /etc/passwd; but the kernel certainly is able to ...
3
votes
1answer
211 views

Why can the waitpid system call only be used with child processes?

The man page wait(2) states that the waitpid system call returns the ECHILD error if the specified process is not a child of the calling process. Why is this? Would waiting on a non-child process ...
2
votes
2answers
282 views

Meaning of hardware platform in uname command ouput

man uname -m, --machine print the machine hardware name -i, --hardware-platform print the hardware platform or "unknown" What exactly is meant by hardware platform here and ...
1
vote
1answer
694 views

When to use arch vs. noarch when building RPMs?

Preface By building RPMs I do not mean compiling from source code. I purely mean taking a tar or a 'zip' file with source code or binaries and repackaging it as a RPM. I've been building RPMs from ...
1
vote
2answers
612 views

Are “kernel mode” and “user mode” hardware features or software features?

I read that there are two modes called “kernel mode” and “user mode” to handle execution of processes. (Understanding the Linux Kernel, 3rd Edition.) Is that a hardware switch (kernel/user) that is ...
2
votes
1answer
995 views

CUPS not working correctly after Debian Wheezy -> Jessie upgrade because of a faulty libpam

I just upgraded a Debian Wheezy to Jessie, by changing the /etc/apt/sources.lst. If important: I pinned systemd to stay with sysvinit, and after the upgrade I removed the pin. If I now do apt-get ...
2
votes
1answer
447 views

Relation between system calls and shell commands/utilities

In POSIX, Does a system call function often but not always have a command or utility in shell? Is there some rule of thumb about what kinds of system calls have corresponding commands or utilities ...
2
votes
1answer
67 views

Why can X11 access the video card?

This one is maybe a bit theoretical, but... How the heck can X11 touch the video hardware? As I understand it, X11 is an unprivileged user-mode program. But only kernel-mode software can access the ...
1
vote
2answers
33 views

Running application compiled on another distribution

I wonder whether I can compile application on one Linux distribution and use it on another Linux distribution (same CPU architecture). If not what problems I can run into? Only problems which came to ...
12
votes
1answer
784 views

Why is architecture listed thrice in uname -a?

$ uname -a Linux 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Running ubuntu 12.04.1 LTS. Why does it have the architecture (x86_64) listed thrice?
1
vote
2answers
645 views

What are the very fundamental differences in architecture between Unix and Linux? [duplicate]

I watched a short intro to Unix from the 70s (https://www.youtube.com/watch?v=7FjX7r5icV8 3D animation starts at 1:56), at the end the general tripartite architecture of Unix was displayed as a 3D ...
2
votes
1answer
1k views

Easy command line method to determine specific ARM architecture string?

I'm trying to write a script which will determine actions based on the architecture of the machine. I already use uname -m to gather the architecture line, however I do not know how many ARM ...
3
votes
2answers
427 views

how is a keyboard shortcut given to the correct program?

in Ubuntu (or for that matter most other linux distros), I could use the shortcut ctrl+t to open a new tab (in firefox or similar), or I could use alt+tab to make unity switch highlighted window, or I ...
2
votes
0answers
151 views

How to determine the wordsize in Linux kernel programming? [closed]

In userspace code, the macro __WORDSIZE is used, included in <bits/wordsize.h>. However, when I do Linux kernel programming, the __WORDSIZE seems not available. If <bits/wordsize.h> is ...
1
vote
1answer
223 views

Compiling from source: What are the options for config script “build”?

When I am running a line like: ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu {*shortened*} \ --with-imap-ssl=/usr/include/openssl/ --enable-ftp --enable-mbstring ...
0
votes
1answer
57 views

Linux packages - Separate Python's external libraries from the system

I read this articles (check What About Python CLI Tools?). Well, this is obivous, separate external Python packages from your System Python's site-packages. When doing a sudo apt-get install package ...
1
vote
2answers
162 views

What is the relationship between command line code and higher level language code?

I'm learning to use the terminal on my Ubuntu 14.04 and I'm running command line code in my shell (which I'm told is what is inside the terminal) to install programs. But I can also start my node.js ...
10
votes
3answers
2k views

A layman's explanation for “Everything is a file” — what differs from Windows?

I know that "Everything is a file" means that even devices have their filename and path in Unix and Unix-like systems, and that this allows for common tools to be used on a variety of resources ...
0
votes
2answers
250 views

How to catch keystrokes in Linux environment

I need a C code to be executed when some particular keys are pressed in Linux "Desktop" environment. What are the ways to register for such an event and How? Should I write ISR for that? I need an ...
4
votes
3answers
497 views

Where is the source code for copy-paste?

I've been working with copy paste functionality on a Linux system. I downloaded the kernel source for the first time. Where can I find the code related to copy paste functionality? My guess is that ...
62
votes
4answers
15k views

Why do we need to fork to create new processes?

In Unix whenever we want to create a new process, we fork the current process, creating a new child process which is exactly the same as the parent process; then we do an exec system call to replace ...
2
votes
1answer
71 views

How are files opened in unix?

What's the internal process of opening a file? To open a file, the system converts the pathname to inode and from the inode search the corresponding driver disk portion to look for the content of the ...
8
votes
3answers
4k views

What are the minimum root filesystem applications that are required to fully boot linux?

It's a question about user space applications, but hear me out! 3 'applications', so to speak, are required to boot a funcitonal distro of Linux: Bootloader - For embedded typically that's U-Boot, ...
2
votes
1answer
143 views

Minimizing hardware interrupts

I am using a modified Linux kernel as a soft real-time OS, on a system that has an architecture like this: CPU1 and CPU2 have 8 cores each. I have 4 processes that need to be run with minimum ...
3
votes
2answers
729 views

Are system calls the only way to interact with the Linux kernel from user land?

Are there any other interfaces, e.g. the /proc filesystem?
3
votes
1answer
163 views

Structure of graphical modules in Linux Lubuntu

I am trying to understand the layers of the Linux GUI system. I am running a netbook with Lubuntu, and I was told it's running LXDE as desktop environment. However, there are processes with 'gnome'. ...
5
votes
2answers
1k views

Process in user mode switch to kernel mode. Then the process will have root privileges?

According to http://www.linfo.org/kernel_mode.html in paragraph 7: When a user process runs a portion of the kernel code via a system call, the process temporarily becomes a kernel process and is ...
1
vote
1answer
124 views

Daemons fall into what category?

Above system call, there are library routines, utilities and applications. Do daemons fall into any of these categories or they have their own category?
2
votes
1answer
129 views

Are application layer protocols part of library routines?

Where do application layer protocols reside? Are they part of library routines of language e.g. C, C++, Java? As goldilocks says in his answer, this is about the implementation of application layer ...
16
votes
2answers
3k views

How are system commands like ls created?

I'm a *nux newbie and I have some doubts regarding *nix. I don't know which type of executable file is ls, whether it is .sh or .ksh or any other kind of system executable if it is, what is that? ...
3
votes
6answers
2k views

When does a shell get executed during the linux startup process

I do not understand when does a shell, lets say bash, get executed, which program runs bash initially first.
4
votes
3answers
173 views

Why are file handles a scarce resource?

I feel like every tutorial I read on resource management in server settings starts by asserting that file handles are a scarce resource, and we should therefore aim to keep the list of open files to a ...
4
votes
1answer
250 views

What is the default or most commonly used multiprocessing model in Linux? Symmetric or Asymmetric?

What the multiprocessing model for Linux? Is there a default or most commonly used model? Is it similar or very different from say BSD or even the MS Windows kernel? If SMP is used normally, can ...
42
votes
2answers
5k views

How do keyboard input and text output work?

Suppose I press the A key in a text editor and this inserts the character a in the document and displays it on the screen. I know the editor application isn't directly communicating with the hardware ...
5
votes
1answer
140 views

What are the equivalent architecture of alphanumeric numbers in Debian?

On the Debian website, I found a list of the releases of Debian associate with alphanumerical architectures. Do you know to what those architectures numbers and letters stand for?   
3
votes
2answers
292 views

How to check Linux kernel?

I want to install a package, and it has different versions for different OSes. The description in the package site is like this X86-64 Linux 3.0 Kernel I looked it up and found people saying to use ...
3
votes
1answer
1k views

Interpret the output of lstopo

I have a output from lstopo --output-format txt -v --no-io > lstopo.txt for a 8-core node in a cluster, which is https://dl.dropboxusercontent.com/u/13029929/lstopo.txt The file is a text drawing ...
3
votes
2answers
538 views

What is a windowing system?

Can someone provide me with a very clear and practical example of a "windowing system"? I was reading on Linux, and although I've always known that it's a kernel, I didn't really know what a kernel is ...
1
vote
0answers
142 views

Which Unixes support cross-device filesystem links (in particular for rename)?

Just read the following on the FreeBSD man page for the rename syscall: ... [EXDEV] The link named by to and the file named by from are on different logical devices (file systems). Note that ...
4
votes
3answers
2k views

Rings and run levels

The question stated below might not be technically correct(misconception) so it would be appreciable if misconception is also addressed. Which ring level do the different *nix run levels operate in? ...