Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linux Fundamentals: Computer Hardware and Storage, Study notes of Database Programming

This chapter provides an overview of linux, focusing on its role as an operating system and its relationship with computer hardware. Topics include power supplies, motherboards, cpu, system memory, disk drives (ide and scsi), raid, networking, and system management. The text also discusses the concept of linux distributions and their role in making a computer functional.

Typology: Study notes

Pre 2010

Uploaded on 08/19/2009

koofers-user-ihw-1
koofers-user-ihw-1 🇺🇸

10 documents

1 / 7

Toggle sidebar

Related documents


Partial preview of the text

Download Linux Fundamentals: Computer Hardware and Storage and more Study notes Database Programming in PDF only on Docsity! Chapter 1 Linux Introduction What is Linux? Is Linux a kernel? An operating system? A distribution? What’s a kernel and a distribution? To explore these questions, let’s start at the beginning. 1.1 Computer Hardware In this section, I will give a loose overview of components that make up a typical computer system that would be used in a cluster. It is necessary to understand a single system and its limitations prior to discussing the motivations for connecting them together. 1.1.1 Case and Power A functional computer consists of many parts and often most of these parts are highly integrated. The first required part is a power supply and case. Typical power rating for power supplies is about 300 Watts and the cases today are mostly tower cases (mid- and full-size). Power rating is extremely critical because you have to provide stable power to every device in your system. Often, this component is the most overlooked part in the entire system. Too little power and your computer becomes unstable: crashing at odd times, unable to boot, or causing damaging to otherwise good components. The power cables and connectors on the power supply are typically designed for a specific class of motherboards. 1.1.2 Motherboard The motherboard is the heart of the system. It receives and distributes power from the power supply to the central processor units (CPUs), system memory, Peripheral Component Interconnect (PCI) add-on cards, and a variety of cooling fans for the system. The motherboard contains hard-coded instructions that define a Basic Input/Output System (BIOS) in order for simple communication on the motherboard to take place. This framework allows the system to receive power, setup itself in a controlled manner, and 1 Power Supply  Motherboard CPU 0 CPU 1 System Memory Network Peripheral Component Interconnect (PCI) Bus Storage (IDE or SCSI) CDROM Floppy I/O Controllers "Disk Subsystem" Keyboard Video Mouse Remote Management Faster Networking Figure 1.1: Overview schematic of typical computer prepare itself to run more complicated instructions that originate from the operating system stored on the system. An example set of operations could be: power on all subsystems, reset/count processors, reset/count/test system memory, reset/initialize all subsystem BIOS functions (i.e. disk, network, video). 1.1.3 Disk Drives, Data Storage There are two basic types of general disk storage that exist: Integrated Drive Electron- ics (IDE) and Small Computer System Interface (SCSI). These techonologies are 15-20 years old but their robustness has made them a solid basis for drive capacities ranging from 1 MEGAbyte all the way up to 250 GIGAbytes and sizes ranging from 5.25 inches wide by 2 inches tall down to 2.5 inches wide by 0.25 inch tall. We won’t even mention the weight differences. It is generally considered that SCSI drives are more robust and tolerant to a wide variety of environmental conditions as compared to IDE drives. IDE drives, however, are cheaper and have a much larger capacity than SCSI drives. Recent technologies developed in the past 10 years have been applied to IDE drives to enhance their apparent reliability allowing them to compete in the demanding, high performance, server market. RAID! Use drawings on boards to illustrate RAID functionality. A technology available to both drive sets to enhance performance and reliability is called Redundant Array of Independent/Inexpensive Drives (RAID). There are several “levels” of 2 Core Functions Disk Subsystem Virtual Memory Filesystems Device Drivers System User Network Interfaces Figure 1.2: Extremely basic layout of the Linux kernel. Your MP3 player opens the MP3 file on the disk. To do this, the kernel is given a filename and locates the correct partition. Each partition can have a different filesystem (a particular standard by which files are stored, located, and accessed) on it. The kernel queries the filesystem on that partition to determine where the file is located. The filesystem returns the location on the partition where the file begins. The file is read into memory by copying the physical data on disk into buffers in the available system RAM. On Linux, these buffers are flagged in a special way and serve as a disk cache in order to speed up subsequent access to that particular file data. The buffers are passed to the program to read and process. At this point, all previous work was done in “kernel space”. The computation done on the MP3 file to convert it into raw audio for output happens in “user space”. The MP3 player sends the output to a device driver interface for the sound card, /dev/audio or /dev/dsp for example. Once sent to the device driver, the playing of the processed audio returns us back to kernel space. The driver copies the data from the input buffers, transfers them to the audio card, and activates the card specific functionality for playing the audio. Pull up /var/log/dmesg output from laptop to point out various steps in the boot process. Let’s return to the boot process that we conveniently left behind when talking about MP3s. The kernel boots and initializes the processor(s) on the system. The memory sub- system initializes the hardware RAM and prepares the system to allocate memory to tasks that request it. The system motherboard is identified and system busses are scanned for hardware. This generates a list of PCI, AGP, and ISA hardware components that are tasked to be initialized and configured by the kernel. The component initialization has a preferred order of action: disks, network, in- put/output, and other miscellaneous devices (i.e. sound card). When all devices are ini- tialized, the kernel boot process is finished. 5 Figure 1.3: Extremely basic layout of the Linux kernel taken from The Linux System Admin- istrator’s Guide, version 0.7 found on The Linux Doc Project website: http://www.tldp.org/. 1.2.2 The Distribution Everything else that is needed to make a computer completely functional and useful to a user composes the distribution. The kernel knows how to load itself, initialize all the supported hardware, and be ready to run software... but it doesn’t have any software to run. Initializing a network card does not actually configure the network settings for your system. Initializing the sound card does not make it play MP3s. After the kernel has finished booting, it runs the “init” program. Init is “the mother of all processes”2. Based on configuration files and parameters passed to it, init determines how to start up and configure the system for users. This process is typically controlled by a set of “run-level control” (RC) scripts. Each service the system provides to its users (either local or remote) typically has an rc script that the system runs at boot time. A general sequence of 2Taken from the init(8) man page 6 events for booting the system include: configuring local hardware (keyboard and/or mouse), mounting filesystems, setting up the network, starting local and network based services, and at the end starting the graphical login service. Despite all the software being found in one given distribution, each service and utility is generally written, developed, and maintained by a distinctly separate group of program- mers/hackers/coders. The graphical interface (XFree86) coders generally have no regular contact with the Windows File and Printer Sharing (Samba) coders. What makes a distribution? Also, each distribution has a general philosophy that serves as a guideline for how it is constructed. For example, the Debian distribution prides itself on being containing only freely licensed, freely available open source software. They also release software in a very controlled and stable manner to minimize confusion, instability, and security problems. The RedHat distributions have long been the industry standard for usability and compatibility. They also target corporate interests for sales and service as their focus has been on building a sustainable business model for Linux. While the majority of their software is open source, they do provide some “closed source” software solutions3. Licensing Most software in the Linux world is licensed under the GNU Public License (version 2). This license guarantees that software released under it must be freely available in source code form for open distribution. It also guarantees that any derived work from GPL’d code must be released under the GPL and thus made freely available for all. Finally, any code which uses GPL code must be released in its entirety under the GPL. The remaining software is typically licensed under the BSD license. This license is not as restrictive in terms of redistribution of derived works as the GPL but does allow the unfortunate circumstance of a corporation copying the code, using it without paying for it, and selling the code to make a profit. 3Although the focus on these products has been reduced in recent years. 7
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved