Chapter One computer system roaming

Source: Internet
Author: User

1.1 Information is context

The source program is actually a bit, which consists of a value of 0 and 1, and a byte of 8 bits.

All information in the system-including disk files, programs in memory, user data stored in storage, and data transmitted on the network-are represented by a string of bits. The only way to differentiate between different data objects is when we read the context of these data objects.


1.2 programs are translated into different formats by other programs

source files on Unix systems are converted to executable target files via a compiled system (preprocessor, compiler, assembler, linker)

Assembly language is useful because it provides a common output language for different compilers in different high-level languages


1.3 Understanding how the compilation system works is beneficial


1.4 Processor reads and interprets instructions stored in memory

Composition of 1.4.1 System hardware


The bus (a group of electronic pipes throughout the system called the bus, which carries information bytes and is responsible for passing between the parts.) Usually the bus is designed to transmit fixed-length chunks of bytes, namely words. A word on a 32-bit machine is 4 bytes)

I/O devices (each I/O device is connected to the I/O bus via a controller or adapter). The difference between a controller and an adapter is primarily in the way they are packaged. The controller is often referred to as the motherboard and the adapter is the card plugged into the card slot.

main memory (logically, memory is a linear byte array, each byte has its own unique address that is, the array index)

The processor (instruction set structure describes the effect of each machine code instruction, and the micro-architecture describes how the processor is actually implemented)

1.4.2 Running the Hello program

1. Housing waiting for input

2. After entering characters from the keyboard, the shell reads the characters into the register and then stores it in the storage.

3. End input, shell load executable (compiled system), copy target file's code and data from disk to main memory

4. The processor starts executing machine language instructions, the bytes of the string to be output are copied from main memory to the register file, and then copied from the register file to the explicit device


1.5 Cache is critical


Cache-Existing applications we can use caching to improve program performance by an order of magnitude


1.6 Storage Device Formation hierarchy


The main idea of a memory hierarchy is that memory on one layer is cached as a low-level memory


1.7 Operating System Management hardware


All application-to-hardware operation attempts must be through the operating system

The operating system has two basic functions: 1) to prevent the hardware from being abused by runaway applications. 2) provide a simple and consistent mechanism for the application to control complex and disparate low-level hardware devices

1.7.1 process

A process is an abstraction of the operating system for a running program.

In either a single-core or multicore system, the CPU executes multiple programs "concurrently" by switching between the context (all the state information required by the process to run)


1.7.2 Threads

In a modern system, a process can actually consist of multiple execution units called threads, which share the same code and global data, and work with threads to make the program run more efficiently

1.7.3 Virtual Memory


Virtual memory provides an illusion for each process that each process uses the main memory exclusively

The basic idea of virtual memory is to store the contents of a process virtual memory on disk and then use main memory as the disk cache

1.7.4 file

Each I/O device, including disks, keyboards, monitors, and even networks, can be treated as files


1.8 using network communication between systems

From a single system, the network can be viewed as an I/O device


1.9 Important topics

Concurrency: A system with multiple activities at the same time

Parallel: Enables a system to run faster with concurrency

Hyper-Threading: One CPU performs multiple control flows

Instruction-level parallelism: Modern processors can execute multiple instruction properties at the same time

Superscalar: The processor can achieve a faster execution rate than one cycle

1.9.2 the importance of abstraction in computer systems


A file is an abstraction of an I/O device, which is an abstraction of main memory and disk, a process that abstracts the processor, main memory, and I/O devices


Chapter One computer system roaming

Related Article

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.