Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

Preface

I believe that everyone encountered a lot of problems during the interview, many and complicated. After the interview, I felt very confused. There was no systematic classification in my head, and I didn't know how the interview effect was.
Regarding your situation, I have made a summary and classification of knowledge points here to clarify this system concept for you.

It is the knowledge points that the first-line big companies must ask in interviews. It is divided into six categories: multithreading and high concurrency, jvm tuning, design patterns, MySQL tuning, Redis cache, and zookeeper actual analysis.

You can review and learn based on these six knowledge points, enrich your technology stack, and find a job that you are satisfied with.

The content shared in this article includes six categories of learning mind maps, interview documents and PDF books.
Due to space limitations, I only wrote the question and the interview document. The answer still needs everyone to get it.

Multithreading and high concurrency

Learning route

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Multithreaded interview questions

1) There are three threads T1, T2, and T3. How do you ensure that T2 is executed after T1 is executed, and T3 is executed after T2 is executed?

2) What are the advantages of the Lock interface over the synchronized block in Java? You need to implement an efficient cache, which allows multiple users to read, but only allows one user to write, in order to maintain its integrity, how would you implement it?

3) The difference between wait and sleep methods in java?

4) Implement blocking queue in Java.

5) Write code in Java to solve the producer-consumer problem.

6) Using Java to program a program that will cause a deadlock, how would you solve it?

7) What are atomic operations, and what are atomic operations in Java?

8) What is the key role of volatile in Java? How to use it? How is it different from the synchronized method in Java? 9) What are race conditions? How do you discover and resolve competition?

10) How will you use threaddump? How will you analyze Thread dump?

11) Why do we execute the run() method when we call the start() method, why can’t we call the run() method directly?

12) How do you wake up a blocked thread in Java?

13) What is the difference between CycliBarriar and CountdownLatch in Java?

14) What is an immutable object, and how does it help to write concurrent applications?

15) What are the common problems you encounter in a multithreaded environment? How did you solve it?

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 


Highly concurrent interview questions

There are four major points in total, and each major point contains eight questions. I picked one question in each major point.


Question 1:  Have you ever used Synchronized and what is its principle?

Question 1:  Compared with Synchronized, what is the difference in the implementation principle of ReentrantLock?

Question 1:  How is the thread pool implemented in Java?

Question 1:  What is Java's memory model, and how do threads in Java see each other's variables?

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

jvm tuning

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

JVM interview questions

1. Memory model and partitions, you need to detail what to put in each area.

2. Partitions in the heap: Eden, survival (from + to), old age, their own characteristics.

3. Object creation method, object memory allocation, object access location.

4. Two judgment methods of GC:

5. What is SafePoint

6. The three collection methods of GC: the principles and characteristics of mark removal, mark sorting, and copying algorithms. Where are they used? If you are asked to optimize the collection method, what ideas do you have?

7. What are the GC collectors? Features of CMS collector and G1 collector.

8. When do Minor GC and Full GC happen respectively?

9. Several commonly used memory debugging tools: jmap, jstack, jconsole, jhat

10. Several processes of class loading:

11. What are the areas of JVM memory and what is the function of each area?

12. How to judge whether an object is alive? (or how to judge GC objects)

13. Briefly describe the java garbage collection mechanism?

14.What are the methods of garbage collection in java?

15.java memory model

16.java class loading process?

17. Briefly describe the java class loading mechanism?

18. The parent delegation model mechanism of the class loader?

19. What is a class loader and what are the class loader?

20. Briefly describe the java memory allocation and recovery strategy and Minor GC and Major GC

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Design Patterns

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

10 design patterns

1. Please list several commonly used design patterns in JDK?

2. What is a design pattern? Are you in your code inside used any where design patterns?

3. What is the singleton design pattern in Java? Please write a thread-safe singleton pattern in Java

4. What is the observer design pattern in Java?

5. What are the main benefits of using the factory model? Where is it used?

6. Give a decorator design pattern implemented in Java? Does it act on the object level or the class level?

7. In Java, why is it not allowed to access non-static variables from static methods?

8. To design an ATM machine, please tell us your design ideas?

9. In Java, when do you use overloading and when do you use rewriting?

10. Give examples of situations where you would prefer to use abstract classes instead of interfaces

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Zookeeper actual combat analysis

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

23 zookeeper interview questions

1. What is ZooKeeper?

2. What does ZooKeeper provide?

3. Zookeeper file system

4. Four types of znode

5. Zookeeper notification mechanism

6. What did Zookeeper do?

7.zk naming service (file system)

8.zk configuration management (file system, notification mechanism)

9. Zookeeper cluster management (file system, notification mechanism)

10. Zookeeper distributed lock (file system, notification mechanism)

11. The process of acquiring distributed locks

12. Zookeeper queue management (file system, notification mechanism)

13.Zookeeper data replication

14. How Zookeeper Works

15. How does zookeeper ensure the order consistency of transactions?

16. Server working status under Zookeeper

17. How does zookeeper choose the master leader?

18.Zookeeper synchronization process

19. Distributed notification and coordination

20. Why is there a leader in the machine?

21. How to deal with zk node downtime?

22. The difference between zookeeper load balancing and nginx load balancing

23.zookeeper watch mechanism

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Redis cache

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

51 Redis interview questions

With the continuous maturity of application research and development technology, Redis caching technology has become one of the necessary capabilities for background research and development students. In the interview process of many companies, it is essential to examine the mastery of Redis knowledge points. Only part of it is written here.

  1. What are the benefits of using Redis?
  2. Is Redis single-process single-threaded?
  3. What is the persistence mechanism of Redis? Their advantages and disadvantages?
  4. Redis common abnormal problems and solutions (avalanche, penetration...)
  5. Redis expired key deletion strategy?
  6. Why does redis need to put all data in memory?
  7. What is the master-slave replication model of Redis cluster?
  8. How to set the expiration time and permanent validity of Redis key?

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

MySQL tuning

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

50 MySQL interview questions

Nowadays, the Internet industry uses MySQL the most. However, for advanced Web interviewers, especially for job seekers looking for a job under 30k, many MySQL-related knowledge points will be basically involved. If during the interview, your relevant knowledge answers are vague and irrelevant. Basically, most interviewers from better companies are basically not interested in you. After all, a slightly larger project will eventually let you go deep into the database, and most of the final bottlenecks will first appear in the database.

  1. L related storage engine.
  2. The principle of MySQL index implementation.
  3. MySQL database lock.
  4. MySQL SQL tuning.
  5. MySQL sub-table sub-database global ID.
  6. What are the technical characteristics of Mysql?
  7. What is Heap table?
  8. What is the default port of Mysql server?
  9. How to distinguish FLOAT and DOUBLE?
  10. Distinguish between CHAR_LENGTH and LENGTH?
  11. Please briefly describe the names of the four transaction isolation levels supported by InnoDB in Mysql and the differences between each level?
  12. What is the usage of ENUM in Mysql?
  13. How to define REGEXP?
  14. The difference between CHAR and VARCHAR?
  15. Is Mysql query case sensitive?
  16. What are the different tables in Mysql?
  17. What kind of objects can be created using the CREATE statement?
  18. What are common SQL functions?
  19. Does MYSQL support transactions?
  20. What field type is good for recording currency in mysql
  21. What kind of locks are there in Mysql?
  22. What are the method commands for MYSQL database server performance analysis?

 

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Due to the limitation of the content and length of the article, the editor only displays the above part of the interview technical documents and materials. If students need to obtain all the interview documents and materials, the method of obtaining: After forwarding the following editor, the editor will receive it by private message "interview" Way! Thank you for your cooperation and trust!

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Six interview questions that the latest big companies must ask in 2020: jvm, MySQL, Redis, design patterns..

 

Guess you like

Origin blog.csdn.net/qq_46388795/article/details/109297319