MiHoYo Spring Recruitment Interview Review: Java, OS, MySQL, and Networking Topics

This article summarizes the key technical questions and answers from a MiHoYo spring recruitment interview, covering Java string handling, synchronized locks, exception types, operating‑system IPC mechanisms, MySQL indexing and isolation levels, as well as DNS resolution and TCP packet issues.

IT Services Circle
IT Services Circle
IT Services Circle
MiHoYo Spring Recruitment Interview Review: Java, OS, MySQL, and Networking Topics

Today I share the interview experience for MiHoYo's spring recruitment, which mainly tested Java, operating systems, MySQL, and networking.

Java

String, StringBuilder, StringBuffer differences

Use StringBuilder for single‑threaded massive string operations because it is mutable and non‑synchronized, offering better performance than String (immutable) or StringBuffer (thread‑safe but slower).

synchronized lock escalation

The synchronized lock can upgrade from biased to lightweight and finally to heavyweight; heavyweight locks are implemented via OS mutexes and should be avoided when possible.

Java exceptions

Exceptions are divided into three categories: Checked Exceptions (must be declared or caught), Unchecked Exceptions (runtime exceptions), and Errors (JVM or hardware failures). Handling is done with try‑catch and throw.

Operating System

Inter‑process communication

Basic IPC methods include anonymous pipes (one‑way, parent‑child only) and named pipes (file‑system objects usable by unrelated processes). Message queues provide typed messages, while shared memory offers the fastest communication but requires synchronization via semaphores.

Semaphores act as counters (P/V operations) to ensure mutual exclusion and can also synchronize processes. Signals ( SIGKILL, SIGSTOP) allow the kernel to notify user processes of events.

Kernel vs. user mode

Kernel mode has full hardware access and can execute any instruction.

User mode has restricted privileges, preventing direct hardware access.

Separating the two improves security, stability, and modularity.

MySQL

Creating an index

CREATE INDEX index_name ON table_name(column_name);

When choosing columns, consider query frequency, value cardinality, and impact on write performance.

Composite index and left‑most rule

A composite index combines multiple columns, e.g., (product_no, name). Queries use the leftmost prefix; if the leftmost column is not used, the index cannot be applied.

CREATE INDEX index_product_no_name ON product(product_no, name);

Isolation levels

Read Uncommitted – allows dirty reads.

Read Committed – prevents dirty reads.

Repeatable Read – default in InnoDB; prevents dirty and non‑repeatable reads, but may allow phantom reads.

Serializable – eliminates all three anomalies.

MySQL’s default repeatable‑read level uses a Read View to guarantee consistent reads within a transaction.

Network

What happens after entering a URL?

The process involves DNS resolution, TCP connection establishment, IP routing, MAC addressing, and finally data transmission through the physical layer.

DNS resolution steps

Browser cache check (≈1 minute).

OS cache and hosts file lookup.

Query local DNS server; if cached, return result.

Otherwise, query root, TLD, and authoritative servers in sequence.

After obtaining the IP, the local DNS server caches the mapping.

DNS resolution diagram
DNS resolution diagram

TCP packet fragmentation and concatenation

TCP is a byte‑stream protocol without inherent message boundaries, leading to packet “sticking” or “splitting” due to network latency, congestion, or receiver buffer limits. Solutions include adding length headers, fixed‑size packets, delimiters, or using protocols like WebSocket.

Algorithm

Hand‑written LRU cache implementation was mentioned.

Interview Feelings

The interview focused on basic questions derived from the resume, with no project discussion, and progressed to a second round.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavamysqlOperating SystemNetworking
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.