Yesterday answered Scott Hanselman's question on the C # part of his list, and. Net programmers interviewed the C # language (answering Scott Hanselman's question), and today went on to answer his list of "everyone who writes code should know" section of the topic.
1. describe the difference between thread and process (Describe the difference between a thread and a process?)
A process is a program that is in the running state, such as CTRL + ALT + Delete in a windoe environment to see the program in this window running at this time.
A thread is a possible path to a program in the running state.
So a process has at least one thread, and multiple threads can be in a process (multithreaded program). When a process starts, it is assigned its own memory address, but the thread can only have the memory address of the owning process. There are also threads in the same process that can be accessed directly between threads. But the process and process need to pass through interprocess communication to access each other (which I have not used, and I do not quite understand, Google saw).
2. What's the difference between a Windows service and the life cycle of a generic exe (what 's a Windows service and how does it lifecycle differ from a "Stan Dard "EXE?)
No Windows service related programs were written, not quite clear, on MSDN, Introduction to Windows Service applications, only to know that Windows service is a program for the server. This program does not have a user interface and can be set to automatically start or restart as the server is turned on, independent of the logged-on user.
As for the life cycle of the EXE with different problems, not very clear, who knows? Please enlighten me.
3. What is the maximum available memory for a single process under the Windows platform? Is it the same as the maximum amount of virtual memory allowed in this system? Do you know how the answers to these questions affect system design ? (What are the maximum amount of memory any single process on Windows can address?) Is this different than the maximum virtual memory for the system? How would this affect a system design?)
I do not know the answer to this question, http://stackoverflow.com/questions/716798/maximum-net-achievable-memory on the StackOverflow, read about the 32bit , is 2GB, for 64bit is 8TB. There is a table on msnd that gives an introduction to different versions of the Windows system, Memory Limits for Windows releases.
The maximum virtual memory for a system depends on many factors, and an article on coding horror is detailed, Dude, where's My 4 gigabytes of RAM? The basic formula for a 32-bit system is:
2
32
= 4,294,967,296
4,294,967,296/(1,024 x 1,024) = 4,096
So it's 4G. Therefore, the maximum virtual memory allowed by the system is not the same as the maximum memory that can be obtained by a single process under the Windwo platform.
The effect of this on the system design is that when you are dealing with a system with large memory requirements, such as a database, you must consider the memory piece.
4. What's the difference between EXE and DLL (what's the difference between an EXE and a DLL?)
EXE is a executable, executable file that includes a starting point that allows this program to execute public Static Void Main (). Net. A DLL is a file containing functionality that can be called by an EXE.
5. what is strong type and weak type? which is good, why? What is strong-typing versus weak-typing? Which is preferred? Why?
Strong-typing refers to checking the type of variables as early as possible, usually at compile time. Week-typing refers to checking the variable type as far back as possible, usually at run time. Which is good? In fact, each has a good, like Ruby, JavaScript, belong to Week-typing, the advantage is to write code when faster. C # belongs to Strong-typing, and the advantage is that if the variable type is not correct, the compilation will not pass, and Visual Studio will be prompted. As for the speed of writing code, since C # 3.0, using var to define variables is a lot simpler.
6. Corillian ' s product is a "Component Container." Name at least 3 component containers this ship now with the Windows Server Family.
Who can answer this question, I do not understand.
7. what is PID and is it useful in solving system problems? (What is a PID?) How was it useful when troubleshooting a system?)
PID full name is Process Identifier, is a number of processes, usually when the system which program does not listen to the time, you can use it to shut down the program. And when debugging, it's also useful.
8. How many processes can a TCP/IP port be shared with? (How many processes can listen to a single TCP/IP port?)
One
9. what is the GAC and what is the use of it? (What is the GAC?) What problem does it solve?)
The GAC refers to the Global Assembly Cache, where the use of an assembly can be called by multiple programs, just as many Microsoft assemblies are here. The problem is to save hard disk space. But the bad part is why should I don't use the GAC? Managing different versions of an assembly is cumbersome and can be upgraded to one, and not only does it destroy a lot of programs that reference it.
Today's problem is more difficult, although it is classified by Scott in the type of problem that everyone who writes the code should know, but many of them are Google. It seems that the underlying things need to be strengthened. You are welcome to add and discuss.
. NET programmer interview Everyone should know the article (answer Scott Hanselman's question)