Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

This article has participated in the “Digitalstar Project” and won a creative gift package to challenge the creative incentive money.


408 contains four subjects, including a variety of basic computer theory, even if you do not take the postgraduate entrance examination, it is good to know some basic knowledge. Welcome to me and my column ๐Ÿ”ฅ

Borrow a big man’s words: for a programmer, the basic knowledge of the computer is internal power, is our professional accomplishment, only deep internal power can walk the river’s lake less.

Programmers can go far, can write high-quality code, can quickly find the bottleneck of the system, can quickly find the core functions of the system, and our professional literacy must be related. Only if you know the basics well enough, can you be truly proficient in your work and solve problems more efficiently and gracefully.

๐Ÿš€ Data structure

Forest T= (T1, T2… Tm) is transformed into binary tree BT in the following process: if m=0, BT is empty; If m is not 0, ______. (Taiyuan University of Science and Technology, 2006)

A. The root of intermediate subtree Tmid (mid=(1+m)/2) was used as the root of BT. Change (T1, T2... , tmid-1) is converted to the left subtree of BT; T mid+1... Tm) is converted to the right subtree B of BT. The root of subtree T1 is taken as the root of BT. Transform the subtree forest of T1 into the left subtree of BT; Will (T2, T3... Tm) is converted to the right subtree C of BT. The root of subtree T1 is taken as the root of BT. The left subtree forest of T1 is converted into the left subtree of BT. The right subtree forest of T1 is converted to the right subtree of BT. And so on D. Take the root of forest T as the root of BT; Change (T1, T2... Tm) is converted to the node under the root to obtain a tree, and then the tree is transformed into binary tree BTCopy the code

parsing

Answer: B

๐ŸŽฏ regard the root node of every tree in the forest as the relation of brothers, and then transform according to the rule of “left child and right brother”.

๐Ÿ“บ Operating system

Which of the following mechanisms cannot be used for information interaction between different nodes in a distributed system?

A. Remote procedure call B. TCP/IP C. Shared memory D. Network file systemCopy the code

parsing

Answer: C

๐ŸŽฏ In distributed systems, since all processors need access, the shared memory needs to be updated immediately, or different processors may use different data.

๐Ÿš Computer network

The protocol structure of a LAN generally does not include ___. (Beijing Institute of Technology, 2004)

A. Network layer B. Physical layer C. Data link layer D. Media access control layerCopy the code

parsing

Answer: A,

๐ŸŽฏ The protocol structure of the LAN includes the physical layer and the data link layer. D media access control layer belongs to the data link layer.

๐Ÿ›ธ Computer composition principle

The reason why the multi-bus architecture is superior to the single-bus architecture is _____. (University of Chinese Academy of Sciences, 2016)

A. reduce the number of registers B. improve the throughput of the bus C. improve the interconnection capability D. Reduce memory requirementsCopy the code

parsing

Answer: B

๐ŸŽฏ ๐Ÿ˜Ž B

The single-bus architecture connects the CPU, main memory, and I/O devices (through I/O interfaces) to one set of buses, and the IO devices exchange information directly with main memory. Advantages: simple structure, low cost, strong expansion; Disadvantages: low bandwidth, heavy load, multiple components can only compete for a unique bus, and does not support concurrency.

Multi-bus structure adopts multiple buses, common dual-bus structure uses the main memory bus for data transmission between CPU, main memory and channel; The I/O bus is used to transfer data between multiple peripheral devices and channels. Advantages: The low-speed I/O device is separated from the single bus, and the memory bus and I/O bus are separated. Disadvantages: Add hardware devices such as channels.

The exercises come from @Wangdao Weibo

The analysis is written by myself, if there are any questions or mistakes, please comment.

I am Mancuoj, welcome to pay attention to me and my computer entrance examination column (โ‰งโˆ‡ Blue)