1. Home
  2. Explore
  3. Computer Science
  4. UNIX and Network Administration

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

UNIX and Network Administration

Basics of UNIX and Network Administration: Operating-System Fundamentals

1. Position of Operating Systems in Information Security

A computer system can be understood as a layered structure:

  1. Computer hardware provides physical resources such as processors, memory, storage devices, printers, displays, and input devices.

  2. The operating system manages the hardware and provides an interface for higher-level software.

  3. System and application programs use the operating system’s facilities to perform useful tasks.

  4. End users interact with application programs rather than directly controlling the hardware.

The operating system and network are closely connected. In a networked environment, the operating system helps applications communicate with other systems, access shared resources, manage users, and enforce security boundaries.

Understanding operating systems is important for information security because the operating system:

  • Controls access to hardware and software resources.

  • Separates users and processes.

  • Coordinates communication between applications and devices.

  • Detects and reports errors.

  • Provides security-related abstractions and controls.

  • Serves as the foundation for higher-level applications and network services.


2. Three Views of a Computer System

A computer system can be examined from three principal perspectives.

End-user view

The end user uses application software to accomplish tasks. Examples include:

  • Browsing the web.

  • Editing a document.

  • Saving and printing a file.

  • Playing a video game.

  • Sending an email.

The end user generally does not need to know:

  • How memory is allocated.

  • How files are physically stored.

  • How a printer is controlled.

  • Which processor instructions are executed.

  • What type of display or storage device is installed.

The end user interacts with the functionality provided by an application rather than with the underlying system.

Application-programmer view

The application programmer develops software for end users. The programmer uses facilities supplied by system software instead of controlling hardware directly.

For example, a C programmer may need to:

  • Request memory dynamically using malloc.

  • Open, read, write, and close files.

  • Display output using printf.

  • Obtain input using scanf.

  • Perform operations provided by standard libraries.

The programmer asks system software for these services through defined interfaces. This allows the same application to operate on different hardware configurations without being rewritten for every monitor, disk, printer, or processor.

Operating-system or system-programmer view

The system programmer develops software that manages and controls the hardware. This programmer must understand how to:

  • Read from and write to storage devices.

  • Start and control printers.

  • Track mouse and keyboard input.

  • Manage memory and processors.

  • Control device operations.

  • Coordinate multiple programs and users.

  • Provide secure and reliable services to applications.

The system programmer therefore works much closer to the hardware than the application programmer.

Relationship among the three views

The relationship can be summarized as follows:

  • The end user uses an application.

  • The application programmer creates the application using system-software services.

  • The system programmer creates system software that uses hardware capabilities.

The hardware interfaces available to system software form the foundation on which the operating system is built. Once the operating system has abstracted those hardware details, application programmers can use simpler and more general interfaces.


3. System Software

System software is software that supports the execution and development of application programs by providing reusable services, resource management, and hardware control.

Examples include:

  • C library functions.

  • Compilers.

  • Assemblers.

  • Text editors.

  • Database management systems.

  • Device drivers.

  • Graphical desktop environments.

  • Operating systems.

Libraries as system software

When a C program includes files such as:

  • stdio.h

  • stdlib.h

  • math.h

  • string.h

the header files provide declarations for functions implemented in prebuilt libraries.

A programmer can call a complex function such as printf without implementing all of its internal behavior. The underlying library and operating-system mechanisms handle tasks such as:

  • Formatting output.

  • Communicating with the operating system.

  • Sending data to the appropriate display device.

  • Managing buffers.

  • Interacting with hardware drivers.

Without these prebuilt facilities, programmers would need to implement low-level operations themselves, making even simple programs extremely difficult to write.

Database management systems

A database management system, or DBMS, is also a type of system software. A web application may use a DBMS such as MySQL to store:

  • Usernames and passwords.

  • Credentials.

  • Account information.

  • Application data.

  • Transaction records.

The application communicates with the DBMS through defined interfaces instead of directly manipulating storage hardware.

Device drivers

A device driver is system software that controls a particular hardware device. Drivers allow higher-level software to use devices without understanding their specific electrical and hardware details.

Examples include drivers for:

  • Printers.

  • Displays.

  • Disks.

  • Keyboards.

  • Mice.

  • Network interfaces.

A driver translates general requests, such as “print this document,” into device-specific operations.

Graphical environments

The desktop or graphical interface that appears after logging into a computer is also supported by system software. It provides facilities such as:

  • Windows and menus.

  • File-management interfaces.

  • Input handling.

  • Display management.

  • Interaction with applications.


4. Operating System and Its Relationship to System Software

An operating system is software, but it is not merely a collection of ordinary library functions.

A library function, such as a C function, usually provides a particular programming facility. An operating system performs a much broader role:

  • It manages hardware resources.

  • It controls the execution of programs.

  • It coordinates competing users and processes.

  • It provides protection and isolation.

  • It responds to hardware events.

  • It creates abstractions such as files, processes, and virtual memory.

  • It mediates access between applications and devices.

The operating system executes on the hardware and provides services to system and application software through interfaces.

Application Programming Interfaces

An Application Programming Interface, or API, is a set of definitions and operations through which software requests services from another software layer.

Applications use APIs to request services such as:

  • Allocating memory.

  • Opening or closing files.

  • Reading and writing data.

  • Creating processes.

  • Communicating over networks.

  • Displaying information.

  • Accessing devices.

The API hides implementation details. For example, an application can request that data be written to a file without knowing the physical disk sector where the data will be stored.


5. The Layered View of a Computer System

A complete system can be represented as four layers:

Hardware

The lowest layer consists of physical resources:

  • CPUs and other processing units.

  • Main memory.

  • Disks and other storage.

  • Displays.

  • Printers.

  • Input devices.

  • Network interfaces.

  • Other peripheral devices.

Operating system

The operating system manages hardware resources and presents abstractions to higher layers. It determines how resources are allocated, protected, and shared.

System and application programs

This layer includes programs such as:

  • Compilers.

  • Assemblers.

  • Text editors.

  • Database systems.

  • Web browsers.

  • Office applications.

  • Games.

  • Network services.

Users

Users interact with the programs in the layer below them. They normally do not issue hardware instructions directly.

The operating system acts as an intermediary between users and computer hardware, translating useful high-level requests into controlled hardware operations.


6. How the Layers Interact

The interaction among users, applications, the operating system, and hardware follows a service-request process.

General interaction sequence

  1. The user gives an input to an application.

  2. The application requests a service from the operating system.

  3. The operating system translates the request into hardware-level operations.

  4. A device driver or other low-level component communicates with the hardware.

  5. The hardware performs the requested operation.

  6. The hardware returns data or a completion status to the operating system.

  7. The operating system returns the result to the application.

  8. The application presents the result to the user.

Example: displaying output

When an application requests that text be displayed:

  1. The application makes an output request.

  2. The operating system receives the request.

  3. The operating system communicates with the display subsystem through appropriate software.

  4. Hardware instructions are issued to the display device or graphics-processing path.

  5. The text appears on the monitor.

The application does not need to know the manufacturer or technical design of the monitor.

Example: reading from a disk

When an application requests data from a file:

  1. The application specifies the file and the required data.

  2. The operating system locates the file through its file-management structures.

  3. The operating system issues appropriate commands to the storage device.

  4. The device reads the requested data.

  5. The data is returned to the operating system.

  6. The operating system provides the data to the application.

Example: dynamic memory allocation

When a C program calls malloc:

  1. The application requests a block of memory.

  2. The operating system or memory-management layer identifies available memory.

  3. The requested memory is allocated to the program.

  4. A reference or pointer to the allocated region is returned.

  5. The application uses the allocated memory without needing to know its physical location.

This process illustrates how the operating system abstracts physical memory.


7. The Kernel and Trusted Operating-System Functions

The kernel is the central and continuously active part of an operating system. It manages core system functions and acts as a trusted intermediary between hardware and higher-level software.

The kernel commonly manages:

  • Processor scheduling.

  • Memory allocation.

  • File and storage operations.

  • Device access.

  • Process creation and termination.

  • Interprocess coordination.

  • Protection and access control.

  • Network communication mechanisms.

The kernel abstracts hardware resources so that system software and applications can use them through simpler interfaces.

Resource abstraction

A higher-level programmer should not need to understand the exact hardware details of every system. For example:

  • A program can display text without knowing the display manufacturer.

  • A program can write to a file without knowing the disk’s physical layout.

  • A program can read input without directly controlling the keyboard electronics.

  • A network application can send data without directly manipulating network hardware signals.

The kernel provides this abstraction and coordinates the underlying operations.

Trusted nature of the kernel

The kernel is trusted because it operates with privileged access to system resources. Applications normally run with fewer privileges and must request sensitive operations through the operating system.

This arrangement helps prevent applications from:

  • Reading another process’s private memory.

  • Directly reprogramming hardware.

  • Overwriting protected system data.

  • Interfering with other users.

  • Bypassing access controls.

The security of the entire system depends heavily on the correct operation of the kernel and other trusted system components.


8. Why an Operating System Is Needed

Hardware abstraction

The operating system hides hardware-specific details. This makes computing more convenient and portable.

An application can use general operations such as opening a file or printing a document without being rewritten for every hardware configuration.

Resource management

The operating system allocates limited resources among competing programs and users, including:

  • CPU time.

  • Main memory.

  • Storage space.

  • Input and output devices.

  • Network access.

  • Files and other shared objects.

Coordination

The operating system coordinates activities that may occur simultaneously. It ensures that multiple programs can operate without corrupting shared resources.

Correct execution

The operating system attempts to ensure that requested operations are performed correctly. For example, if an application requests particular bytes from a file, the operating system manages the operation and returns the requested data.

Protection and isolation

In a multiuser or multitasking environment, one program should not improperly affect another. The operating system establishes boundaries between users and processes.

Error detection and reporting

The operating system detects invalid or dangerous operations and reports them to the responsible program or user. Examples include:

  • Accessing invalid memory.

  • Dividing by zero.

  • Exceeding an allocated memory region.

  • Attempting an unauthorized operation.

  • Performing an invalid file operation.

A memory violation may produce a segmentation fault or similar error. The operating system may terminate the faulty process to protect the rest of the system.


9. Types of Operating Systems

The type of operating system depends on the intended application, the number of users, the number of tasks, timing requirements, and the way computers are connected.

Batch-processing operating systems

A batch-processing operating system collects jobs and executes them with little or no direct interaction from the user during execution.

Typical characteristics include:

  • Jobs are submitted in groups or batches.

  • Execution may occur later.

  • Users do not receive immediate responses.

  • Results are collected after processing.

Early mainframe systems commonly used batch processing. A job might be submitted during one period and its output collected later.

Time-sharing operating systems

A time-sharing operating system allows multiple users or processes to interact with a computer by rapidly switching processor time among them.

Important characteristics include:

  • Interactive user sessions.

  • Short response times.

  • Multiple users or programs sharing processor time.

  • The appearance that each user has continuous access to the system.

Time-sharing systems require careful scheduling and resource protection.

Personal-computer and workstation operating systems

These operating systems support interactive use by individuals or small groups. They typically provide:

  • Graphical interfaces.

  • File management.

  • Application execution.

  • Device support.

  • Networking.

  • Multitasking.

Linux and Windows systems are examples of operating systems commonly used for personal computers and workstations.

Network operating systems

A network operating system is designed to support networked systems and network appliances, including devices such as:

  • Routers.

  • Switches.

  • Servers.

  • Specialized network equipment.

It provides services for communication, resource sharing, remote access, and network management.

Distributed operating systems

A distributed operating system manages a collection of independent computers and makes them appear to applications as though they form one unified computer.

Its goals may include:

  • Sharing processing resources.

  • Sharing storage and devices.

  • Coordinating separate machines.

  • Hiding the physical distribution of resources.

  • Providing a unified system view.

The key idea is that several independent computers are managed as a coordinated whole.

Embedded operating systems

An embedded operating system is designed for a specialized device rather than a general-purpose computer.

Examples include systems used in:

  • Washing machines.

  • Mobile devices.

  • Internet-of-Things devices.

  • Temperature sensors.

  • Pressure sensors.

  • Industrial controllers.

  • Consumer electronics.

Embedded systems are generally:

  • Compact.

  • Resource-constrained.

  • Specialized.

  • Efficient.

  • Designed for a particular hardware platform.

They may perform only a small number of functions but must perform them reliably.

Real-time operating systems

A real-time operating system, or RTOS, must complete operations within specified timing constraints.

Correctness has two parts:

  1. The operation must produce the correct result.

  2. The operation must produce that result within the required time limit.

For example, in an aircraft-control system, a landing-gear command must not only lower the wheels correctly; it must do so within a specified interval. A correct result delivered too late may be useless or dangerous.

Real-time systems are used in applications such as:

  • Aircraft control.

  • Industrial control.

  • Medical equipment.

  • Robotics.

  • Automotive systems.

  • Embedded controllers.


10. Classification by Users and Tasks

Operating systems can also be classified according to how many users and tasks they support.

Single-user, single-task operating systems

A single-user, single-task operating system is designed for one user performing one major task at a time.

Its characteristics include:

  • One primary user.

  • One active task or program.

  • Simpler resource-management requirements.

Single-user, multitasking operating systems

A single-user, multitasking operating system allows one user to run several programs at the same time.

For example, a user may simultaneously:

  • Edit a document.

  • Browse the web.

  • Play audio.

  • Transfer a file.

The operating system rapidly switches among processes and allocates resources to create the appearance of simultaneous execution.

Multiuser operating systems

A multiuser operating system allows multiple users to use the same computer resources at the same time.

Examples include:

  • UNIX servers.

  • Linux servers.

  • Mail servers.

  • Shared organizational systems.

A multiuser system must provide:

  • User authentication.

  • Access control.

  • Process isolation.

  • Resource allocation.

  • Protection of files and data.

  • Fair or policy-based sharing of devices.

Networking support versus multiuser operation

A system that supports networking is not necessarily a genuinely multiuser operating system.

A single-user operating system may still connect and communicate with many other systems. Conversely, a multiuser operating system is specifically designed to allow multiple users to log in and use resources concurrently.

Therefore, the following properties are distinct:

  • Single-user or multiuser: describes how many users can use the system.

  • Networked or non-networked: describes whether the system communicates with other systems.

  • Single-tasking or multitasking: describes how many programs can be active.

  • Single-programming or multiprogramming: describes whether several programs can be maintained in memory and managed by the system.

A networked system may support many remote users or connected systems without itself being classified as a multiuser operating system in the same sense as a UNIX server.


11. Security Implications of Operating-System Classifications

The classification of an operating system affects its security requirements.

Single-user systems

A single-user system may have fewer user-isolation requirements, but it still needs protection against:

  • Malicious software.

  • Unauthorized access.

  • Faulty applications.

  • Network attacks.

  • Data loss.

Multiuser systems

Multiuser systems require stronger controls because many users and processes share resources. The operating system must ensure that:

  • One user cannot freely read another user’s private files.

  • One process cannot overwrite another process’s memory.

  • One user’s errors do not disrupt all other users.

  • Shared devices are accessed in an orderly way.

  • Privileged operations are restricted.

  • Network services are protected.

Real-time systems

Real-time systems must balance security with timing requirements. Security checks and protective mechanisms must not cause unacceptable delays in safety-critical operations.

Embedded systems

Embedded systems often have limited memory and processing power, making security mechanisms more constrained. Their specialized nature also means that a vulnerability may affect a large number of identical devices.


12. Evolution of Operating Systems

Operating systems have evolved alongside changes in computer hardware and user expectations.

Mainframe systems

Early mainframe systems frequently used batch processing. Users submitted jobs and collected results later.

The primary concern was efficient processing of large numbers of jobs rather than immediate interaction.

Minicomputers

Minicomputers made computing resources more accessible to smaller organizations and groups. They supported more interactive use and shared access than many earlier mainframe arrangements.

Desktop and workstation systems

Desktop systems brought interactive computing to individual users. Users could expect immediate responses while working with applications.

Handheld and mobile systems

Handheld computers and mobile devices extended computing into portable, highly connected environments. They operate with:

  • Limited physical size.

  • Battery constraints.

  • Specialized sensors.

  • Wireless networking.

  • Many simultaneous applications and services.

Contemporary operating-system requirements

Modern operating systems are shaped by three major conditions:

  • Interactivity: users expect rapid feedback after each action.

  • Real-time responsiveness: many systems must respond within short and sometimes strict time limits.

  • Heavy networking: devices communicate continuously with many other systems and services.

These requirements influence operating-system design, administration, performance, and security.


13. Major Roles of an Operating System

Resource allocator

The operating system acts as a resource allocator. Programs request resources, and the operating system decides:

  • Whether the resource is available.

  • How much of it should be assigned.

  • Which program receives it.

  • How long it may use it.

  • Whether access is permitted.

  • How the resource will be reclaimed.

Examples include:

  • Allocating memory requested through malloc.

  • Assigning CPU time to processes.

  • Opening a file for an application.

  • Providing access to a printer.

  • Allocating storage space.

  • Managing network buffers.

Conflict resolution and serialization

When multiple programs request the same resource, the operating system must prevent conflicting operations.

For example, if two users send documents to one printer simultaneously, the output could become mixed together. The operating system therefore serializes the requests:

  1. It accepts the first print job.

  2. It sends that job to the printer.

  3. It waits for or tracks completion.

  4. It processes the next job.

Serialization means arranging competing operations in an orderly sequence so that shared resources are not corrupted.

Program-execution control

The operating system controls how programs execute. It may:

  • Start a program.

  • Allocate resources to it.

  • Schedule it for execution.

  • Pause or resume it.

  • Terminate it.

  • Report abnormal behavior.

A process is a program in execution. A program is a passive set of instructions, whereas a process is an active execution instance with resources and state.

Process isolation

In a multitasking or multiuser system, processes must be isolated from one another.

A process should not be able to:

  • Read another process’s memory without authorization.

  • Modify another process’s data.

  • Consume all shared resources unchecked.

  • Cause another process to terminate.

  • Corrupt the operating system.

Process isolation prevents one program’s error from affecting unrelated programs.

Error detection and handling

The operating system detects computational and operational errors. Examples include:

  • Division by zero.

  • Invalid memory access.

  • Segmentation faults.

  • Illegal instructions.

  • Unauthorized resource access.

  • Invalid file operations.

When an error occurs, the operating system may:

  1. Detect the error.

  2. Notify the process or user.

  3. Record diagnostic information.

  4. Terminate or suspend the faulty process.

  5. Preserve the operation of other processes and the system.


14. Definition and Goals of an Operating System

There is no single universally accepted definition of an operating system. The reason is that operating systems support:

  • Different users.

  • Different applications.

  • Different hardware platforms.

  • Different devices and peripherals.

  • Different timing and performance requirements.

  • Different security and networking environments.

An operating system must serve as a common layer between diverse software above it and diverse hardware below it.

A practical description is:

An operating system is the core system software that manages computer hardware, provides services to programs, controls program execution, and acts as an interface between users, applications, and hardware.

The kernel is the central part of the operating system, but the complete operating-system environment may also contain system programs, utilities, libraries, drivers, and interfaces.

Primary goals

The principal goals of an operating system are:

  • Convenience: make the computer easier for users and programmers to use.

  • Efficiency: use hardware resources effectively.

  • Program execution: provide the environment and services needed to run applications.

  • Protection: prevent unauthorized or harmful interference.

  • Coordination: manage shared resources and concurrent activities.

  • Reliability: detect errors and preserve correct system operation.


15. System Startup and Bootstrapping

The operating system must be loaded into memory when a computer is switched on. This process is called bootstrapping or booting.

Firmware

When the system starts, the processor begins executing instructions stored in a nonvolatile or read-only memory area.

This initial software is called firmware. Firmware is stored so that it is available immediately after power-on, before the main operating system has been loaded.

Firmware performs initial startup tasks and searches for a bootable device.

Bootable device

A bootable device is a storage device containing the code needed to begin loading the operating system.

Examples include:

  • A hard disk.

  • A solid-state drive.

  • Removable storage.

  • A network boot source.

Boot record

The bootable device contains an initial boot record or boot block. In traditional systems, this may be associated with a master boot record.

The startup process transfers this initial code into memory and begins executing it.

Bootstrap program

The bootstrap program is the initial program loaded from the boot device. Its purpose is to locate and load the operating-system kernel.

The sequence is:

  1. Power is supplied to the computer.

  2. The processor begins executing firmware instructions.

  3. Firmware identifies an appropriate bootable device.

  4. Firmware loads the initial boot record or boot block into memory.

  5. The bootstrap program begins execution.

  6. The bootstrap program locates the operating-system kernel.

  7. The kernel is loaded into memory.

  8. Control is transferred to the kernel.

  9. The operating system initializes devices, memory, processes, and other services.

  10. The system becomes available to users and applications.

Kernel initialization

Once the kernel receives control, it establishes the operating environment. It may initialize:

  • Processor-management structures.

  • Memory-management structures.

  • Device drivers.

  • File systems.

  • Network interfaces.

  • Security and access-control mechanisms.

  • Initial system processes and services.

From startup until shutdown, the operating system remains active in the background, managing the system and responding to application and hardware events.

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent