Operating system Brief

Source: Internet
Author: User

This article is divided into several parts:A simple overview of the systemHow the computer system is loadedthe concept of partitioningSystem Installation Extensionsthe installation process of the systemfeatures of the Linux system 1. Simple overview of the system

The operating system is the middle layer between the general application system and the computer hardware, the computer hardware is organized and taken over by the operating system, the system manages the memory, the Cup resources and so on, the application obtains the resources by using the system's API to the system, and obeys the system scheduling in the computer system in the form of process. It involves process synchronization, prioritization, resource locking, job scheduling, and so on.

To put it simply, the operating system seems to me to have three dimensions:
    • For users: Provide a set of easy-to-use operations (graphical and command) for system operation, complete assigned to the system tasks (loading the application, using the application), the user to the system between the resource input and output (various file preservation and display).
    • Computer hardware: Computer hardware mainly includes memory, cup, IO, storage device, through the system organization, can form a whole, complete automation
    • For general applications: only need to apply resources to the system to complete their own operations, different concerns about the underlying implementation, but also different concerns and other applications between the interaction.
2. How the computer system is loaded
    • The BIOS (basic input and output system) is the underlying code that deals directly with the hardware, and the general cure is stored in ROM. When the computer is powered on, the cup reads the first instruction of the default address, which jumps to the BIOS and starts the BIOS system.
    • BIOS system mainly performs two functions, computer self-test, loading boot sector
    1. Self-test, the system BIOS looks for BIOS programs for various devices and invokes the initialization code inside these bios to initialize the associated device. Complete the computer inspection of various key equipment and the initialization of various hardware devices.
    2. System BIOS update ESCD (extended system Configuration data), this process is the BIOS to save the basic hardware in a CMOS (special RAM motherboard battery-powered), to provide the system after the call.
    3. To load the concepts in the boot sector:

The BIOS loads the first physical sector (512 bytes) of the disk into memory, which is called the Boot Sector (boot sector) and consists of the MBR, DPT, boot Record ID three parts:

The MBR master boot record, which accounts for the first 446 bytes of the boot sector, holds the system master Boot program and is responsible for loading the running system boot from the hard disk, where the code defines whether the operating system is already installed on the disk and defines the method to start.

The DPT primary partition table, which accounts for 64 bytes, records the basic information about the disk (16 bytes for each primary partition, and therefore the disk has a maximum of 4 primary partitions), which defines whether the disk is an active partition, that is, determines that the disk can be operated by the system.

Boot Record ID boot area tag, which is a valid partition, accounting for two bytes.

    1. To load the boot sector:
      • The above-mentioned MBR to check, if any, will be loaded MBR into memory, the control of the system to the main boot program;
      • Next, the MBR program searches the active partition table, the first sector of the PBR load, the installation of different operating systems in the DBR content is not the same;
      • In Win7, this is bootmgr, after loading the file, it will find the hard disk of the PCD (boot settings data) file, this file is a multi-operating system menu, that is, when the multi-system can record the different system startup program address, you can choose which system to start. After that, the EXE file is executed for Win7.
      • In Linux, the common grub boot, grub can be built in the MBR, can also be established in the active partition, that is, the BCD file in the win system point to an active partition of the Linux boot program grub, to load.
      • Grub can be understood as a small operating system that points to the Linux kernel image, after booting, grub extracts the kernel, initializes the main function into memory, executes the first process init, and begins the initialization of the system.

    

3. The concept of partitioning
    • The purpose of the partition is to format the hard disk, the process of creating a partition is to set the physical parameters of the hard disk, specify the location of the hard disk MBR.
    • The primary partition is a relatively simple partition, formatted to form a maximum of four partitions, in order to form a multi-partition, and the introduction of extended partition, extended partition is one of the partitions to expand, a partition divided into multiple extended partitions.
    • Set one of the primary partitions to the active partition, the operating system installed in the active partition, and loaded from the active partition
    • Disk partition format (low-level format), to make the operating system can be recognized, it is necessary for the operating system to specify the disk file system, the process is advanced format, advanced format the disk to organize records, complete the system identification disk and take over the disk.
    • partition format, partition format different operating system support format is not the same, window length is divided into fat,fat32,ntfs,linux in the EXT2/3/4, Linux swap, VFAT (long file name System, can be compatible with Windows)
4. Installation process of the system

Broadly speaking, system installation is generally divided into two factions

    1. Install using the system's installation image for iOS

The system's iOS image can be a CD-ROM, you can also put the U disk through the software for iOS file loading, and the U-disk settings to make the system recognized as a CD-ROM; after the same principle, the system loads the bios--> settings from the CD-ROM, the system loads the contents of the disc into memory, and installs the system. The system installation process will have the corresponding program to format the disk and other operations.

    1. Using the U-disk, booting from the U-disk, the simple system in the U-disk is loaded into memory, the system is loaded and then the disk Management or system is repaired.
      • U disk format, using software to activate the U disk into active partition (Diskgenius hard disk partition tool)
      • Write the U-disk active partition of PBR, so that the system loads PBR when pointing to bootmgr, loading the system in the U-disk
      • Copy the appropriate system boot files to the U disk
      • Modify BIOS, boot from USB stick

In this way, the system starts up into a bios-->u disk (MBR)-->u disk (PBR)--System boot (simple system in U-disk)

After entering the system of the U-disk, a variety of functions are generally available: gost recovery system, disk utility, boot repair

5. System Installation Extension
  • Disk partitioning table format: MBR, GPT
    • MBR partition table, in fact, a kind of disk organization, or a system to disk description, MBR sector shoulder to manage the disk function, does not belong to any partition. 512 bytes, the partition Table 64 bytes, describes 4 primary partitions, which determines that the disk can be a primary partition within four.
    • GPT partition table: The globally unique identity partition table is the standard for the structural layout of a partitioned table of entity disks, and the location information for partitioned tables is stored in GPT headers on GPT hard drives. For compatibility reasons, however, the first sector of the hard disk is still used as an MBR and then the GPT header. Feature is capable of supporting 128 primary partitions
  • BIOS boot mode: Legacy BIOS, UEFI bios
    • Traditional legacy BIOS: Unable to recognize GPT partitioned table format, only disk corresponding to MBR partition.
      • legacybios→mbr→ "Active primary Partition" →\bootmgr→\boot\bcd→\windows\system32\winload.exe
      • A BCD file can load multiple system boot files for booting multiple systems
      • MBR disk format, the Windows system startup files (Bootmgr, BCD) must be stored in the active primary partition in order to boot the system normally boot (MBR disk partition format, only one partition is allowed to be active).
  • UEFI BIOS: Both MBR and GPT partitions can be recognized, so both MBR and GPT disks can be used to start the operating system under UEFI.
    • Uefibios→efi system partition (FAT-formatted partition)->\efi\microsoft\boot\bootmgfw.efi→efi\microsoft\bcd→\windows\system32\winload . EFI
    • (compared to Legacy boot discovery, the UEFI boot file is Winload. EFI, and legacy's boot file is winload.exe)
features of the 6.linux system
    • 1. Basic Ideas

The basic idea of Linux is two: Everything is file and each software has a definite purpose.

The first article in detail is that all of the system is attributed to a file, including hardware devices and software, operating systems, processes, etc. for the operating system kernel, are considered to have their own characteristics or types of files.

    • 2. Fully open source
    • 3. Multi-tasking, multi-user, each user through the permission settings, does not affect each other, the file has its own permissions.

In general, Linux gives the user all the privileges to make the user's own decisions, and the user needs to know what to do.

Operating system Brief

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.