Understanding von Neumann architecture (operating systems and processes)

insert image description here

1. Von Neumann Architecture

insert image description here

  • Von Neumann Architecture Features:
    • In the von Neumann architecturememoryRefersMemory--A sort ofHardware level cache space(between the IO device and the CPU, onlyData storage and read and write functions, and haveHigh data read and write speedofindependent unit) (stores binary data in memory)
    • Between CPU and IO deviceno direct data transfer, data transfer between CPU and IO devicemust go through memory
    • data that describe the properties of thingsandOperation instruction(Both are essentially binary data) will be loaded into memory
  • Advantages of Von Neumann Architecture:
    • Separation of CPU and IO devicesIt makes the design and use of the computer very flexible (the cost is also greatly reduced), and there is no need to rely onSpecific IO devices and specific operation instructionsTo design the motherboard circuit around the CPU,Operation instructionandrelated descriptive dataare uniformly loaded into memory to formprogram by program, making the sameMemory + CPU mechanismcan be used forAdapt to various IO devicesto achieve various functions
    • At the same time, the von Neumann architecture canGive full play to the computing performance of the CPU

2. Von Neumann architecture and barrel effect

  • von Neumann systemthe essencelies inMemory
  • Before the advent of the von Neumann architecture, on a specialized CPU motherboard, the CPU requiredRead data directly from input device, after performing operations on the data, we needWrite data directly to an output device:insert image description here
  • Limited by design cost,The data read and write speed of the IO device is very slow,HoweverCPU calculation speed is very fast, in a data calculation project, the CPU will oftenAfter a quick calculationwill be inidle state, so even if the CPU is very powerful, the efficiency of the entire computer system will beLimited by the read and write efficiency of IO devices, which is the architecture ofbarrel effect:
    • In a tightly linked system, eachpartial structuremay facea common problem, which constitutes the systemStructure of each partOftenGood and bad,andThe disadvantaged part often determines the level of the whole system:insert image description here
  • The emergence of memory has solved the above problems very well. Once the computer of von Neumann architecture starts to run, the IO devices (including some external memory devices) can beWrite or read binary data to memory at any time, forming aComputation items (programs) to be executed, at certain moments and under specific instructions, the CPU fetches data from the memory to perform calculations. The reasons for the high efficiency of this architecture are:
    • The process of data interaction between the memory and the IO device isCan be done at any time (as long as the computer is running), when the CPU needs to fetch data from the memory to perform calculations, a lot of data has been loaded in the memory (that is, the von Neumann system takes full advantage ofTime interval between operationsTo be donedata loading)
    • The memory itself is a hardware unit specially designed for data storage and reading and writing (Physically tied to the CPU),The data exchange efficiency with the CPU is relatively high.

3. Operating system and process

operating system

  • Computers with von Neumann architecture have the following characteristics:
    • A set of memory+CPU structure can be used to adapt to various IO devices (you only need to load the instruction set and data into the memory before realizing the function), so there may beVarious IO devices, it is necessary at this timeManage these IO devices(hardware management)
    • When the computer is running, a large number ofAlgorithm(data and instruction set (essentially also data)), at this timeThese programs also need to be managed(software management)
  • Complexity of Von Neumann System ComputersThe operating system was born, and the operating system is dedicated to hardware and software management.A series of special data and instruction sets, the operating system, as a special software, is the first to be loaded into the memory when the Von Neumann system computer is running.
  • Operating system and computer system:insert image description here
    insert image description here
  • The operating system is implemented in C language, and before it manages hardware and software resources, it needs to manage each hardware and software object.describe and organize(This is the premise of all management behaviors), the so-called description isDefine a structure describing the managed object, and thenA structure describing managed objectsorganized into individual data structures.
  • Operating system management of hardwareThe essence ismanage its drivers, so it can be considered that the operating systemIn essence, the objects managed are programs
  • operating systemThe nature of managing computersis trueA data structure consisting of structures describing hardware and software resource objectsAdd, delete, check and modify operations
    insert image description here
  • PCB --> process control block (process control block)

Processes in a Linux system

  • When a program (binary data) is loaded into the Linux system, the Linux system willtask_structautomatically create a structure describing the program(process control block) and organize it into various kernel data structures;
    • in memorytask_struct structureAnd == its corresponding program (binary data) == constitutes a process in the Linux system (the two are indispensable)
  • Process Control Blocks in Linuxinsert image description here
  • Contents in the Linux process control blockinsert image description here

insert image description here

Guess you like

Origin blog.csdn.net/weixin_73470348/article/details/131681726