This is the 8th day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

๐Ÿป Data structure

Let the keyword sequence of the ordered table be {1, 4, 6, 10, 18, 35, 42, 53, 67, 71,788, 84, 92, 99}. When the binary search method is used to find the node whose key value is 35, the search succeeds after ___ times of comparison. (Zhengzhou University)

A. 2
B. 3
C. 4
D. 6
Copy the code

parsing

Answer: C

๐Ÿฒ follow the binary search again:

  1. Left = 0, right = 13, mid = 6,42 > 35
  2. Left = 0, right = 5, mid = 2,6 < 35
  3. Left = 3, right = 5, mid = 4,18 < 35
  4. Left = 5, right = 5, mid = 5

๐Ÿผ Computer network

The following statements about switches are correct ___ (Lanzhou University 2015)

A. An Ethernet switch is essentially A multi-port bridge B. A group of workstations interconnected through the switch constitute A conflict domain C. The network connected to each port on the switch constitutes an independent broadcast domain D. Ethernet switches can interconnect networks using different network layer protocolsCopy the code

parsing

Answer: A,

๐Ÿฒ A switched switch is often referred to as an Ethernet switch or Layer 2 switch, indicating that the switch operates at the data link layer. When extending Ethernet at the data link layer, a bridge is used to forward and filter incoming MAC frames according to their destination addresses. Technically, a bridge usually has a small number of ports, two to four, whereas an Ethernet switch usually has a dozen or so ports. An Ethernet is essentially A multi-interface bridge.

BCD remember this table:

Repeater/hub Bridge/switch The router
Working layer: The physical layer Physical layer + data link layer Physical layer + data link layer + network layer
Conflict domain/broadcast domain: One collision domain, one broadcast domain Isolate the conflict domain, a broadcast domain Isolate conflict domains, isolate broadcast domains

The interconnection of different network layer protocols is the function of routers.

๐Ÿจ Operating system

Let the page direction of a process be: 5,4,3,2,4,3,1,4,3,2,1,5. The system has 3 pages of physical memory, and the number of missing pages using LRU and FIFO elimination algorithm is ___ respectively.

A.9 and 10 B.5 and 7 C.6 and 6 D.8 and 10Copy the code

parsing

Answer: D

๐Ÿฒ draw a picture on the line, I readily draw:

๐Ÿปโ„๏ธ Computer composition principle

If a program runs on a storage system consisting of L1 and L2Cache and main storage, the hit ratio of L1Cache and L2Cache is 50% and 80% respectively, the hit ratio of the entire storage system Cache is ___ (Beijing University of Hang and Hang 2015)

A.  65%
B.  80%
C.  90%
D.  95%
Copy the code

parsing

Answer: C

๐Ÿฒ two ways (definitely choose the first way ah!) :

โ‘  Inversely calculate the probability of both misses


50 % x 20 % = 10 % 100 % 10 % = 90 % 50\%ร—20\% = 10\% \ 100\% -10 \% = 90\%

โ‘ก Count them separately and add them up


L 1 In the L 2 miss : 50 % x 20 % = 10 % L 1 miss L 2 In the : 50 % x 80 % = 40 % All of the : 50 % x 80 % = 40 % That adds up to 90 % L1, L2, miss: 50 = 10 \ \ % x 20 \ % % \ \ L1 three-pointer in the L2:50 \ % x 40 \ % \ \ 80 \ % = all: 50 \ % x 40 \ % \ \ 80 \ % = add up to 90 \ %

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)