1. What are the common commands of Linux?
1. Find the file Find/-name filename.txt based on the name lookup/directory filename.txt file.
2. See if a program is running Ps–ef|grep Tomcat view all processes related to Tomcat
3. Terminating thread kill-9 19979 the process of terminating thread number bit 19979
4. View files, including hidden files Ls-al
5. Current working directory PWD
6. Copy file cp source dest Copy file cp-r sourcefolder targetfolder recursively copy entire folder
7. Create a directory mkdir newfolder
8. Delete directory rmdir deleteemptyfolder Delete empty directory rm-rf DeleteFile recursively delete all contents in directory
9. View Port Usage Netstat-tln | grep 8080 viewing usage of port 8080
10. See which program the port belongs to Lsof-i: 8080
11. Switch User Su-username
12. Modify file Permissions chmod 777 File.java//file.java permissions-rwxrwxrwx,r means read, w indicates write, X is executable
2, how to see a Java thread resource consumption?
Top
3, MySQL InnoDB features? 、
1). Support transactions (a transaction is a logical set of operations that make up each unit of this set of operations, either fully successful or fail completely)
2). Row-level locking (usually locks the current line when updating)
3). It has very efficient caching features, can cache indexes, and can cache data.
Talk about the pessimistic and optimistic lock on MySQL
Pessimistic lock and optimistic lock are two common methods of resource concurrent lock design,
Pessimistic lock (Pessimistic lock)
Pessimistic lock is characterized by the first acquisition of locks, and then business operations, that is, "pessimistic" that the acquisition of locks is very likely to fail, so make sure to obtain the lock successfully before the business operation. Usually referred to as "one lock two check three update" refers to the use of pessimistic lock.
Optimistic lock
The characteristics of the optimistic lock first business operations, not the last resort to take locks. That is, "optimistic" that the lock is likely to be successful, so in the end of the business operations need to actually update the data of the last step to get the lock.
3. What is the database isolation level? What's the effect?
The basic principle of MySQL master-slave synchronization.
Linux and databases for Java intermediate questions