Ali Java is cool on both sides: concurrency + JVM + Spring + Redis + MySQL, etc., none of them can make it clear

Ali is about 50 minutes on the second side. The question is very comprehensive and needs to be fully prepared. It is a bit awkward to ask except for the concept (woo woo woo~), and the interviewer asks the bottom of the source code. After coming back, I made a classification of these topics and sorted out some high-frequency questions and analysis (I am obsessive-compulsive ~ crazy supplement knowledge~) divided into five categories: concurrency + JVM + Spring + Redis + MySQL database, and then share it My experience of this second interview with Ali + some of my study notes.

Note: You need to edit five types of interview answers, study notes, and mind map (xmind) friends including concurrency + JVM + Spring + Redis + MySQL database compiled by the editor

One, Java concurrent programming related:

Ali interview with Java concurrent programming related questions:

What are the containers in Java

hashmap , hashtable ,treemap区别

Lock principle, AQS

Why is Synchronized a pessimistic lock? What is the principle of optimistic locking? What is CAS and what are its characteristics?

Compared with Synchronized, what is the difference in the implementation principle of Reentrant Lock?

How to synchronize the threads of Java with each other? What synchronizers do you know about? Please introduce them separately.

Many people say that Thread Local should be used with caution. Talk about your understanding. What should be paid attention to when using Thread Local?

My Java Concurrency Study Notes (24 core knowledge points of Java concurrent programming):

  • JAVA concurrent knowledge base
  • JAVA thread implementation / creation method
  • 4 thread pools
  • Thread life cycle (state)
  • ....
  • ConcurrentHashMap concurrency
  • What is CAS (compare and exchange-optimistic locking mechanism-lock spin)

Compiled Java Concurrent Advanced Interview Analysis (26 Java Concurrent Programming Advanced Interview Questions):

Java concurrent learning mind map (xmind)

Attachment: Java concurrent mind map. (If you need the xmind version of the high-definition brain map, you can privately write to the editor [notes] to consult the free method of obtaining it)

Two, JVM related:

Ali interview JVM related questions:

  • Under what circumstances will stack memory overflow occur.
  • The memory structure of the JVM, the ratio of Eden and Survivor.
  • Why should JVM memory be divided into new generation, old generation, and persistent generation. Why is the new generation divided into Eden and Survivor.
  • What is a complete GC process in the JVM, how the object is promoted to the old age, and talk about the main JVM parameters you know.
  • Do you know which types of garbage collectors, their advantages and disadvantages, focus on cms and G1, including principles, processes, advantages and disadvantages.
  • The realization principle of garbage collection algorithm.
  • When there is a memory overflow, how do you troubleshoot?

My jvm study notes (5 core knowledge points of jvm and advanced interview guide):

  1. JVM memory area division
  2. JVM execution subsystem
  3. Garbage collector and memory allocation strategy
  4. Write efficient and elegant Java programs
  5. Performance optimization
  6. JVM advanced interview questions guide (basic, advanced, practical)

JVM learning route thinking brain map (xmind):

Three, Spring interview related:

Alibaba interview Spring related questions:

  • Principle and mechanism of dynamic agent
  • The realization principle of AOP, if you are asked to design AOP, how should you design;
  • Why are those design patterns used in the source code?
  • Introduce your understanding of Spring's affairs?
  • IoC control inversion design principle?

My Spring study notes (13 Spring core knowledge points):

Spring features

Spring core components

Spring common modules

Spring main package

Spring common annotations

Spring third-party integration

Spring IOC principle

Spring APO principle

Spring MVC principle

Spring Boot principle

JPA principle

Mybatis cache

Tomcat architecture

Spring learning route thinking brain map (xmind):

The content of the article is relatively factory, if you need to study notes, you can privately write [notes] to consult the free method of obtaining

Fourth, MySQL related

Ali interview questions

  • What locks does MySQL have?
  • Explain what ACID is
  • Implementation of Index in Innodb
  • B+ tree
  • AUTO_INCREMENT principle (inspect concurrency)
  • What types of database indexes are there? Why use B+ tree for indexing? What is the difference between a composite index and several individual indexes? Do you understand the query optimization of large tables in the database? Do you understand the MVCC mechanism? What's wrong with the MVCC mechanism? How to solve this problem? Have you done mysql slow statement tuning? Tell me how you do it?

My MySQL study notes

(1) 20 high-frequency MySQL interview knowledge points

  • The four characteristics of transactions (ACID) atomicity, consistency, isolation, and durability?
  • Concurrency of transactions? Transaction isolation level, what problems each level will cause, which level is MySQL by default?
  • What is the difference between the three common MySQL storage engines (InnoDB, MyISAM, MEMORY)?
  • MySQL's MyISAM and InnoDB storage engines, transaction and lock levels, and their respective applicable scenarios?
  • What is the order in which the different elements of the query statement (where, jion, limit, group by, having, etc.) are executed?
  • What is a temporary table and when is the temporary table deleted?
  • The difference between MySQL B+Tree index and Hash index?
  • SQL query statement to determine which type of index to create? How to optimize the query?
  • The difference between clustered index and non-clustered index?
  • What are the locks (optimistic locks, pessimistic locks), and how to add exclusive locks when selecting?
  • What are the differences between non-relational databases and relational databases, and what are the advantages?
  • Three paradigms of database, design data table according to a certain scene?
  • 7 problems of database read-write separation, master-slave replication, master-slave replication analysis?
  • Use explain to optimize sql and index?
  • How to solve MySQL slow query?
  • What are inner joins, outer joins, cross joins, Cartesian products, etc.?
  • What locks does mysql have, the principle of deadlock determination and specific scenarios, and how to solve the deadlock?
  • What are the usage scenarios of varchar and char?
  • mysql high concurrency environment solution?
  • Transaction recovery mechanism (REDO log and UNDO log) when the database crashes?

Ali Java is cool on both sides: concurrency + JVM + Spring + Redis + MySQL, etc., none of them can make it clear

MySQL learning mind map (xmind)

Five, MongoDB:

Questions about Ali interview with MongoDB:

  • What is a NoSQL database? What is the difference between NoSQL and RDBMS? Under what circumstances do you use and not use NoSQL databases?
  • What are the non-relational databases?
  • What is the most basic difference between MySQL and MongoDB?
  • What are the characteristics of MongoDB?
  • Does MongoDB support stored procedures? If so, how to use it?
  • How to understand the GridFS mechanism in MongoDB, why does MongoDB use GridFS to store files?
  • Why is the data file of MongoDB large?

My kafka study notes:

Six, Redis related

Ali interview questions

  • Does redis understand? Do you talk about how to use redis to implement distributed locks?
  • Redis commonly used data structure and implementation of underlying data structure
  • How to solve Redis's concurrent competition Key problem
  • How to ensure data consistency between the cache and the database when it is double-written?

My Redis study notes

(1) Top 5 Redis problems

Redis basic data structure and actual combat scenarios

Common Redis anomalies and solutions (avalanche, penetration, warm-up, breakdown)

Common application scenarios in distributed environments (distributed locks, distributed self-incrementing ID, etc.)

Redis cluster mode

Detailed explanation of common redis interview questions

to sum up:

All interview questions are not static, especially for big companies like Ali. The actual interview questions above are just a reference for everyone. The most important thing is to increase your knowledge reserve and be prepared. It's a pity that I didn't get Ali's offer this time, so I will continue to work next time.

 

Guess you like

Origin blog.csdn.net/weixin_51204715/article/details/109296749