Linux Notes

Table of Contents

Section 4: Inside The System

The systems we're talking about here are multi-task (they can run more than one task simultaneously), multi-user (they can handle more than one person using the computer at a time) and multi-access (they allow various user authentication and access levels). A system user might run his tasks and not even notice the change of system speed.

Let us get this straight: imagine a situation like that:

There are 3 users currently working with the system. Those users are the clerk, the programmer and the salesman. The clerk writes a manual for his company department and sends it to another users via e-mail. The programmer is compiling a program and browsing the web, all at the same time. The salesman is preparing a financial report and checking the local webpage project. All of those users are working on TERMINALS. A terminal is a device which handles all input and output. The terminals are connected to the computer itself, and they handle any user communication. However, a terminal is dumb: it cannot function without a computer as it is only the I/O device.

The system tasks consist of two following groups:

  1. Communication with the user, handling all input/output/processing
  2. Resource and process management, including user processes (this means programs and applications run by the specific user)

The RESOURCES include all physical and virtual devices, processor time and operating memory. The system handles all resource management, assigning priorities, system time and memory area for each process.

The system consists of few layers. E.g. physical devices are accessible only via the system subprograms and procedures, which all together make up the system KERNEL. Any attempts to write/read data are handled only by those after a verification. Such separation allows two things:

  1. Safe and device-friendly system operation
  2. High portability

By the way, the MS-DOS kernel is made of IO.SYS and MSDOS.SYS files. Those two are the most basic system kernel when compared to UNIX/LINUX.

Resource management done by the kernel is also the user authentication. User and system data have to be secure. Same thing applies to programs. Therefore, the administrative function is very, very important, the system administrator (super-user, root) - the person authorized to access all the system resources both directly and indirectly, including all information, even individual user data.

The user-system communication is handled by the shell. The shell is a specialized system layer - a few processes, actually. In MS-DOS we had the COMMAND.COM interpreter, here we have the shell. It adresses the resources through the kernel only, but otherwise it is fully customizable.

How does the system look like? A user has his own account in the system, and he logs in. He activates a terminal:

login: _

He inputs his username, taps ENTER (RETURN) key, and inputs his secret password. Both are case sensitive! This means TC5660 and tc5660 are two different users.

login: tc5660
passwd: _

The password doesn't appear on the screen because of the security policy. Somebody might want to read it while standing next to the user - this way, the password is safe.

If the password was wrong, the system hails us:

Login incorrect.

And the login process is restarted. After few failed logins most systems lock the terminal so it is completely inactive.

However, most cases the login attempt is successful, and the user sees the shell prompt.

$

Various shells might have different prompts (like the number% in csh). Now, the user might start his work. For example, the user might want to know who is he and ask the system:

$ who am i
tc5660 tty04 Sep 17 16:40
$

The system informs that the user is named tc5660, works on a terminal which is designated tty04 and that he logged in September 17, 16:40.

How to exit? Well, most systems allow Ctrl+D or a specific command, such as:

$ logout

How to access help? Try the following commands:

  • man (most popular)
  • help
  • h
  • manual
  • helpme
  • doc