UNIX and Network Administration


UNIX and Network Administration

Anna
Welcome to Information Security Three, a course on the basics of UNIX and network administration, with a strong emphasis on security. This is the third course in the IIT Madras information security series. The first course introduced information security from a systems perspective, including what it means to build a secure system, while the second focused on contemporary hardware features that can support secure systems.

Corey
So this course fits between hardware and the higher software layers. A typical computing system has hardware at the bottom, an operating system above that, and networks connecting multiple systems. Information Security Three concentrates on the operating-system and network-administration level, and it provides the foundation for Information Security Four and later courses that address higher layers, including applications.

Anna
The course consists of 60 modules, each about 20 minutes long, for roughly 20 hours of content. It includes eight programming assignments involving multiple-choice questions and programming work. Learners are expected to have some exposure to a basic programming language, and certification requires passing both the end-course examination and the programming assignments.

Corey
The first module begins with a useful question: who views a computer system, and what does each person care about? There are three important perspectives—the end user, the application programmer, and the operating-system or system programmer. Understanding those perspectives makes the layers of a computer system much easier to follow.

Anna
The end user simply uses applications. Someone might browse the web, edit a document, save a file, send it, or print it without knowing how the software performs those actions. The end user is concerned with the functionality offered by the application, not with the internal details of the computer.

Corey
The application programmer has a different concern. That programmer creates the software the end user relies on, but does not normally implement every low-level operation from scratch. Instead, the application programmer uses facilities provided by system software.

Anna
For example, a C programmer may need memory while a program is running. The programmer can request dynamic memory allocation using malloc, asking the operating system or related system software to provide memory. Similarly, operations such as opening files, printing with printf, or reading with scanf depend on services supplied by lower software layers.

Corey
And below the application programmer is the system programmer, sometimes called the operating-system programmer. This person must understand how to use hardware: how to read from a disk, start a printer, track a mouse, and interact with other devices. In short, the system programmer is concerned with turning hardware capabilities into usable services.

Anna
That connects the previous courses to this one. Information Security Two discussed the interfaces that hardware provides to system-software developers. Information Security Three asks how those developers use those interfaces to build and administer system software. The course can be taken independently, but studying the hardware material first can provide useful background.

Corey
So what exactly counts as system software? One example is the collection of library facilities used by a programming language. In a C program, header files such as stdio.h, stdlib.h, math.h, and string.h provide access to prebuilt functionality.

Anna
The point is that programmers do not have to implement everything themselves. If a programmer had to write the complete implementation of printf before printing a simple greeting, even a basic introductory program would become an enormous project. Instead, printf and many other functions are made available through libraries supplied by system software.

Corey
System software includes more than C libraries. The desktop environment that appears when someone logs into a computer is system software. A database management system, such as MySQL, is another example, because it provides services for storing and managing data. Device drivers, which provide resource-management functions for hardware devices, are also system software.

Anna
The operating system is another crucial part of that layer, but it should not simply be equated with an ordinary library function. Both are software, yet the operating system has a broader role: it manages and coordinates hardware resources and provides a foundation for other software.

Corey
Applications and other software access these services through an application programming interface, or API. The system software executes on the hardware, while the API provides a usable interface between the software that wants a service and the system software that supplies it.

Anna
A helpful way to picture the complete stack is with four layers. At the bottom is computer hardware. Above it is the operating system. Above the operating system are system and application programs, such as compilers, assemblers, text editors, database systems, web browsers, and games. At the top are the users who use those programs.

Corey
The operating system acts as the bridge between the programs and the hardware. Suppose an application asks for memory with malloc or asks to print something. The application makes a service request to the operating system, and the operating system translates that request into instructions the hardware can understand.

Anna
For printing, the operating system may use a device driver to communicate with the display or the graphics-processing path. For a disk read, the hardware retrieves the requested data and returns it to the operating system. The operating system then gives the result back to the application, which turns it into something the user can see or use.

Corey
Memory allocation follows the same general pattern. The application requests memory, the operating system allocates an appropriate region, and the application receives a pointer to that memory. In every case, the user interacts with an application, the application requests a service, the operating system coordinates the hardware, and the result travels back up the layers.

Anna
One key idea here is abstraction. When a programmer writes printf, they do not need to know which company made the monitor. When they open or write a file, they do not need to know the exact disk hardware where the data will be stored. The operating system hides those hardware details behind a consistent interface.

Corey
That abstraction makes computing more convenient, but it also supports efficient and reliable operation. The operating system coordinates access to resources and ensures that requested operations are carried out correctly. If an application asks to read particular bytes from a file, the operating system is responsible for retrieving those bytes and returning the result.

Anna
Operating systems come in different types because different applications have different requirements. Examples include batch-processing systems, time-sharing systems, personal-computer and workstation systems, real-time systems, network operating systems, distributed operating systems, and operating systems for small or embedded computers.

Corey
They can also be classified by how users and programs operate. A single-user, single-task operating system is designed for one user to perform one activity at a time. A single-user multitasking system allows one user to have several programs in operation at the same time, as with conventional desktop systems such as Linux or Windows.

Anna
A multiuser operating system allows many different users to use computer resources simultaneously. UNIX and Linux servers are examples, and a mail server is a familiar case because many people may log in and use it. The distinction matters for security because multiple users and processes require controlled sharing and isolation.

Corey
A system can also support networking without being a truly multiuser operating system. The material uses Windows 2000 and Novell NetWare as examples of systems that could support networks with hundreds or thousands of users, even though the operating system itself might have only one system administrator or not provide the same kind of simultaneous multiuser model as a UNIX server.

Anna
A real-time operating system has a stricter requirement than an ordinary system. In a normal system, if an operation is requested, the important expectation is that the result is correct. In a real-time system, the result must be correct and produced within a specified time limit.

Corey
Consider an aircraft-control example. If a command causes landing gear to come down, it is not enough for the wheels to descend eventually. They must descend within the time required for the aircraft to land. A delay of hours would make the system unacceptable, even if the operation eventually produced the correct physical result.

Anna
A distributed operating system manages a group of independent computers while making them appear, from the application's perspective, like one computer. Embedded operating systems are designed for small devices, including mobile devices, Internet of Things equipment, and control systems inside appliances such as washing machines. These systems are generally compact and designed to use limited resources efficiently.

Corey
The history of operating systems also shows a movement from batch processing toward interactive computing. Early mainframe systems might receive a job and produce results later. Over time, computing moved through minicomputers and desktop systems to handheld devices, where users expect to work interactively and receive results at each step.

Anna
Modern operating systems also have to deal with extensive networking. A phone or computer may communicate with enormous numbers of other devices and users. Therefore, contemporary systems are expected to be highly interactive, to provide results quickly in many situations, and to operate in heavily networked environments.

Corey
Those expectations are especially important for administration and security. Administrators must consider multiple users, multiple systems connected by networks, many applications competing for resources, and users who expect fast responses. These conditions shape how current operating systems are designed and maintained.

Anna
One major role of an operating system is resource allocation. Applications request resources such as CPU time, memory, file storage, and access to devices. The operating system decides how those resources are assigned and makes sure that different requests do not create conflicts.

Corey
Suppose two users on a mail server want to print at the same time. If their output were sent to the printer simultaneously, lines from the two files could become mixed together. The operating system resolves that conflict by serializing the jobs—allowing one file to print and then allowing the other.

Anna
Another role is controlling program execution. A process is a program in execution, and a system may run many processes at once, especially in a multitasking or multiuser environment. The operating system must prevent one process from interfering with another.

Corey
That protection applies both to accidental errors and to invalid operations. If a program goes beyond the memory assigned to it, the operating system can stop it, producing an error such as a segmentation fault or core dump. If a program attempts something computationally invalid, such as division by zero, the operating system can report the error and terminate the faulty execution.

Anna
There is no single universally accepted definition of an operating system. One reason is the enormous variety it must handle: different hardware devices, processors, disks, printers, and other peripherals below it, along with many kinds of software and applications above it.

Corey
A practical description is that the operating system is a program, or collection of components, that runs on the computer and mediates between users, applications, and hardware. The kernel is the heart of the operating system: a central part that remains active and manages core functions. The kernel is not identical to the entire operating system, because other system programs and application programs exist around it.

Anna
The primary goal of an operating system is convenience: making it easier for users and applications to use the computer. A second goal is efficient operation, meaning that resources are coordinated and used effectively. The operating system must also facilitate the execution of application programs by providing the services those programs need.

Corey
Finally, let us trace how the operating system begins running. When the computer is switched on, execution starts from instructions stored in read-only memory. This initial code is often called firmware. The firmware searches for a bootable device, such as a disk, and locates the initial boot code stored there.

Anna
The firmware loads the contents of the boot device's first sector or block, commonly described here as the master boot record, into memory and transfers control to it. That code is the bootstrap program. The bootstrap program then loads the operating-system kernel and gives the kernel control of the system.

Corey
So the sequence is: power on, execute firmware from read-only memory, find a bootable device, load the boot code, execute the bootstrap program, and then load the kernel. From startup until shutdown, the operating system remains the central software presence coordinating the computer.

Anna
That gives us the foundation for the rest of the course: the layers of a computer system, the role of system software and APIs, the operating system's abstraction of hardware, different operating-system types, and the operating system's responsibilities for allocation, coordination, protection, and execution.

Corey
And it also explains why UNIX and network administration belong together here. The operating system is the point through which applications and communication networks interact with hardware and with one another. To understand how such systems are administered securely, we first need this picture of what the operating system is, what it does, and how it starts.

Ask anything
We've read this whole study set, so questions about it get the best answers.