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
Merge two ascending lists of length lenl and Len2 into one descending list of length Lenl + Len2 using the merging algorithm. In the worst case, the number of comparison operations is closest to ___. (University of Chinese Academy of Sciences, 2015)
A. lenl+len2
B. min(lenl, len2)
C. lenl*len2
D. max(lenl, len2)
Copy the code
parsing
Answer: A,
For merge algorithms, there are two cases:
- When there are still elements left in both lists, the maximum value of the two lists is taken and put into the new list
- When a chain has no remaining elements and another list has remaining elements, the other list is directly put into the new list.
Want to know how to write the code can see day63๐ซ
๐บ Operating system
The advantages of journaling file systems over traditional file systems are ___. (University of Chinese Academy of Sciences, 2018)
A. Strictly audit and record file system operations to improve security. B. Improve the query performance of directories with A large number of files. Disk blocks and index nodes that belong to the same file can be arranged in adjacent areas to improve I/O performance. D. Supports transactional modification of file system metadata, reducing synchronous write operations to disksCopy the code
parsing
Answer: A,
The ๐ฏ journaling file system is more secure than traditional file systems because it keeps track of changes to disk contents with separate log files.
๐ Computer network
The following switching modes that do not use the store-and-forward mechanism are ___. (Chongqing University in 2004)
A. Circuit switch B. Packet switching C. Packet switching D. Cell exchangeCopy the code
parsing
Answer: A,
๐ฏ cell switching, also known as ATM (asynchronous transmission mode), is a connection-oriented fast packet switching technology. It transmits data through the establishment of virtual circuits, and uses the store-and-forward mechanism like packet switching and message switching. In circuit switching, the data can be stored and forwarded directly.
The switching technology of computer communication subnet mainly has two ways: circuit switching and store-and-forward switching. The store-and-forward switching mode can be divided into packet switching and packet switching. Packet switching can be divided into datagram packet switching and virtual circuit packet switching.
In circuit switching, although a physical connection is established between data transfers (which requires a certain amount of delay), once the connection is established, all subsequent data is transmitted sequentially, reliably and with little delay.
In store-and-forward switching, packets or packets must be stored and forwarded several times by intermediate nodes before reaching the destination node, which increases the transmission delay. Therefore, compared with store-and-forward switching, circuit switching has smaller transmission delay and better real-time performance, which is suitable for high-speed mass data transmission.
๐ธ Computer composition principle
Compared with microprogram controller, hardwiring controller is characterized by ___ (University of Chinese Academy of Sciences 2016)
A. Command execution speed is slow, and it is easy to modify and expand command functions B. Command execution speed is slow, and it is difficult to modify and expand command functions C. Instruction execution speed is fast, easy to modify and expand instruction function d. instruction execution speed is fast, difficult to modify and expand instruction functionCopy the code
parsing
Answer: D
๐ฏ There are two common controller designs: hardwired controller and microprogram controller.
The basic principle of the hardwired controller is to send a series of microoperation control signals in chronological order according to the requirements of the instruction, the current timing and internal and external state.
The speed of the controller depends on the circuit delay, so it is fast to execute and is often used on RISC cpus.
Disadvantages: Since the control component is regarded as a logic circuit specialized in generating fixed timing control signals, the design goal is to use the least components and achieve the highest speed, so the scalability is very poor. After the design is completed, it is impossible to add new functions through modification.
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)