1.1 Difficulties doubt

★ Spring Life Cycle

★Spring AOP    Spring IOC

★ Spring transaction implementation, declarative transaction is how to achieve, mode of transmission spring Affairs

★ES和MongoDB

★ Redis underlying data structure implemented

 

★ Http message structure

 HTTP message = message header plus packet relating to (user and information resources), wherein the request packet header = request line + request header field + common header field + entity header field, a response packet header = status line + response header General header field field + + entity header field.

  Header fields list ;

★ Java interfaces and abstract classes

  Abstract class: If a class contains an abstract method then this class is an abstract class, modified to be abstract, abstract classes can also have non-abstract methods, but meaningless. Subclass inherits an abstract class must override abstract methods. Wherein the public abstract method must be modified or protected, public default is modified, it can be used to create an abstract class object. 
  Interface: If a class implements an interface, all methods in the interface will be realized. 
  Differences:
     1 . Abstract class constructor can have an interface can not constructors
     2 abstract class member variables can have common, no common interface member variables, only constants.
     3 abstract class method may be modified static. the process interface may not be static modification
     4 may have a conventional method and abstract methods abstract class interface methods are all abstract methods
     5 . the method may be modified abstract public, protected, etc. modifiers, interface public abstract method is a method of all, if you omit the modifier, the default are also public abstract modification
     6. a class can inherit an abstract class, multi-interface can be achieved in that a class can only inherit a class, you can achieve multiple interfaces

★ How to use the jar package, how others class files? jar are so what?

Class loading mechanism 
BootstrapClassLoader responsible for loading the JAVA_HOME} {$ / JRE / lib jar package portion ExtClassLoader loading the JAVA_HOME} {$ / JRE / lib / EXT following jar package AppClassLoader loading custom -classpath or Class-Path Jar package of defined tripartite package

 

Conversion ★ operating system kernel mode and user mode of

1 . Why should there be a user mode and kernel mode 
    because of the need to restrict access capabilities between different programs, to prevent them from acquiring another program's memory data, or data acquisition peripherals, and sent to the network, CPU divided into two permissions level - user mode and kernel mode
 2 switching 
    user mode - "kernel mode         
    a system call. 
    user processes switch to claim active way kernel mode 
    b exception. 
    when a program running in user mode exception occurs unpredictable , for example, a page fault exception; 
    C interrupts the external device. 
    you receive a corresponding interrupt signal, for example, a hard disk write completion to the CPU after completion of the user requests the external device operation; 

    core set - "user mode 
    kernel mode if the program execution is completed from return to user mode kernel mode, iret can be accomplished by executing instructions, instructions previously iret will push into the kernel mode before cs, eip, eflags, ss, esp information popped from the stack loaded into a corresponding register of each, resume execution of the program user mode, this process will not elaborate.

 

★ & unique index primary key index?

Unique index is not allowed to index any two rows with the same index value
1 after the primary key created must contain a unique index, the index is not necessarily the uniqueness of the primary key. 2 . Unique index column allows null values, and the primary key column does not allow nulls. 3. When you create a primary key column has a default value is null + uniquely indexed. 4 . Primary key can be referenced by other table as a foreign key, but not unique index. 5 . A table can create up to a primary key, but you can create multiple unique index. 6 primary key that uniquely identifies more suitable for those who are not easy to change, such as auto-increment columns, ID number and so on. 7. Under RBO mode, the primary key of the implementation plan takes precedence over a unique index. The two can improve the speed of queries.

synchronous, asynchronous, blocking, non-blocking - combination

Sync: When issuing a synchronous call, the caller has to wait for the return message (result) notification to subsequent execution; 
asynchronous: when an asynchronous procedure call is issued, the caller can not be obtained immediately return a message (result). The actual processing of the call after completion member, to inform the caller via a state, and a notification callback. 
Blocking: blocking calls means before the call returns, the current thread is suspended, has been in a wait message notification, you can not perform other operations. 
Non-blocking: non-blocking refers not get the results immediately before, the function does not block the current thread, and will return immediately. 
Nginx using non-blocking asynchronous event handling mechanism, the process cycle time to process multiple ready, enabling high concurrency and lightweight.

 

Socket Socket communication process ★

★ Java basic data types and Number of Bytes

byte        . 1 byte =. 8 'bit
 char        2
 Short       2
 Long        . 8
 int           . 4
 Double     . 8
 a float        . 4
 Boolean   theoretically occupy 1/8 1bit byte , the actual processing according to the processing 1byte

G1 garbage collector Detailed

G1 garbage collector uses a method of Region in memory, the memory heap is divided into pieces of about 2,000. Assigned to each Region E, S, O region. 
Large Object Distribution:
     1 . Less than half the normal region Region E into size
     2 half the size of the object to a Region region O directly into a zone also become H region.
     3 is larger than a size of a plurality Region. O storage area, which is more region H zone. 

Two concepts: 
    RememberSets: Each Region has such a storage space for storing a record of the present Region Region object referenced by other objects. 
    CollectionSets: GC need to be cleaned every Region collections. 

YoungGC process 
    Copy E and S (from) the area S (to) 

MixGC 
    YoungGC +  
    first marker: GCRoot object directly reference numerals where Region. The difference is that with the CMS, G1 marks the first time YGC general and simultaneous use of STW YGC time, incidentally, to get things done. 
    RootRegion Scan: RootRegion point marked O area region, which region is to reduce the mark scanning range concurrent mark. 
    Concurrent mark: mark the entire heap  
    relabeled: re-mark phase uses SATB faster than CMS.
    copy clear: the rent composition CollectionSets lower survival rates Region and the object of all Y zone O area, replication cleanup.

 ★ Cookie and Session difference ( details explain )

1 .cookie data stored on the customer's browser, session data on the server;
 2 .cookie not very safe, people can analyze stored locally and COOKIE COOKIE cheat, taking into account security should use the session;
 3 the .session will within a certain time saved on the server. When accessing the increase would be more take up the performance of your server. Taking into account mitigating server performance, you should use the COOKIE;
 4 limit a single cookie in the client is 3K, a site that is stored in the client COOKIE not exceed 3K;. 
:

 

 

 

Guess you like

Origin www.cnblogs.com/qmillet/p/12423031.html