- What is the difference between thread and process ?. NET introduces the concept of application domain, so what is the difference between the three of them? Introduced Application
Does domain cause some potential problems?
A process can be understood as a container that provides process space and the memory used by the thread is allocated in the process space. Each thread has its own stack. Appdomain is equivalent to a logical concept, which is equivalent to dividing some regions in the logic in the process. Therefore, threads can access other threads across domains.
- What is the difference between Windows Service and common EXE during execution?
Generally, the former has no interface, and a Windows Service server is responsible for maintenance, startup, and shutdown. EXE is maintained by the user and generally has an interface.
- What is the Windows Address Space that a process can access? Is it equal to the system's virtual memory size? What impact will these two aspects have on the system design?
A. It is related to the data bus. Generally, for 32-bit operating systems, the addressing space can reach 4 GB, so the address that a process can access is also 4 GB (but in fact, 2 GB is reserved for the operating system, 4 m is not accessible, and the remaining space is used by the process ).
B. Not equal to virtual memory.
C. The addressing space is related to the width of the Data Bus. The Virtual Memory consumes the CPU processing time. Because the conversion of internal and external memory is required.
- What is the difference between EXE and DLL? How should we choose to use them in system design?
A .. EXE has its own process space, DLL does not exist, dll can only be referenced, and the process space shared with Exe can be called and run (in fact, there is also the rundll32 command to start the DLL, this system command is essentially to provide process space for it ).
B. DLL is also called a dynamic link library. You can put the commonly used code and resources in the dynamic link library, so that there will be only one copy in the memory, saves memory space (different processes can be located in the specified DLL based on different relocation information ).
- What is the difference between the execution process of a common EXE and. Net EXE?
Normal EXE can be executed directly on the operating system, but. Net EXE requires JIT compilation in a timely manner and runs in a hosted environment (under the control of CLR ).
- What is a weak type and a strong type? In system design, which type should be considered first?
To some extent, the weak type allows different types of data to perform operations and operations on each other, but the strong type is not allowed, because the strong type performs the type check.
- What is the use of PDB files? What information does it contain?
The program database (PDB) File Stores debugging and project status information, which can be used to incrementally link the debugging configuration of the program.
- What is cyclomatic complexity? Why is it important?
Circle complexity, used to measure the number of branches of a program. In a normal method, the score should be limited to 5 or 6. If the number of branches is too large, it is best to break down the method to avoid badsmell.
- To create a critical section to access a variable, write a standard lock () and add double check.
If (m_instance! = NULL)
{
Lock (this)
{
If (m_instance! = NULL ))
{
// Do something
}
}
}
- Implements the standard dispose mode for an object.
Class myobject: idisposable
{
Public void dispose ()
{
// Do something
}
}
Is to implement the idisposable interface, and then implement custom Structure
- What is fulltrust? Does assembly in GAC have fulltrust?
- What is the following command? Gacutil/L | find/I "system"
The Global Assembly Cache tool allows you to view and manipulate the Global Assembly Cache and download the cached content.
- What is this command? Sn-t something. dll
Sn.exe provides options for key management, Signature generation, and signature verification.
- Which port must be opened for DCOM across firewalls? What is port 135 used?
- Is there any way to integrate with the existing unmanaged code? What should I consider during integration?
- What is OOP and SOA used?
Oop is a program programming architecture that contains components, encapsulation, inheritance, abstraction, and polymorphism.
SOA is a service-oriented architecture.
- How does xmlserializer work? What ACL permissions does a process need to run xmlserializer?
The ACL access control list.
- When should I use try catch during system design? When should I avoid using it?
- What is the difference between Debug. Write () and trace. Write? Where should they be used?
All are assertions. Debug. Write () is the debug version, which is not executed in the release version, but trace. Write is executed in the release version.
- What is the difference between debug build and release build? Is there any obvious difference in execution efficiency?
The debug build version contains some debugging information, which reduces the execution efficiency.
- Does JIT occur for assembly or method? To explain why. Net designers want to do this?
- Briefly describe the GC execution process.
When the memory is reduced to a certain extent, CLR starts garbage collection, recycles the non-referenced objects, and releases the occupied memory.
- How should I choose abstract class or interface?
Abstract classes can be implemented without interfaces. The interface can be inherited more than the abstract class.
- When designing a custom type, how should we choose whether to use value type or reference type?
The difference between the reference type and the value type is described. We can talk about the memory distribution and access efficiency.
- For value type and reference type, what are the default implementation methods of A. Equals (B?
The default value type is equal. The reference type is to compare whether two references point to the same object.
- Why does. net not provide the default deep copy? If necessary, how to implement deep copy?
Because deep copy involves the level of the copy, it is the level at which deep copy is required. In C #, you cannot directly override the memberwiseclone method. You can implement the iclone interface to implement custom deep copy.
- Compared with. NET 1.1, what support does. net2.0 provide to avoid excessive system overhead caused by boxing/unboxing?
Model.
- Is string value type or reference type? Why is the string object in. Net set to immutable?
Is a reference type. Because string objects appear frequently in the operating system, allocating an independent memory for each string will be a huge system overhead. Therefore, the string is set to immutable, which is a memory resident technology, essentially allowing the same string to access the same memory. For example, if S1 = "A", S2 = "B", both S1 and S2 are directed to the same memory block as "a". If S1 = "B" is modified ", s1 will no longer point to "A", but will open up another memory space for "B", so that S1 points to B (if there is another S3 = "B ", then S1 will point to the same "B" as S3, and S1 will no longer open up space ).