Home > .NET Framework > Scott Hanselman’s interview questions – Everyone who writes code

Scott Hanselman’s interview questions – Everyone who writes code

Answers to Everyone who writes code
  1. Describe the difference between a Thread and a Process?
  2. What is a Windows Service and how does its lifecycle differ from a "standard" EXE?
    Windows Service applications are are ones which run for a long time (typically always – till the machine shuts down and start when the machine comes up) in the background. These are applications that are ideal for use in server environments. The applications do not have a user interface or produce any visual output. Any user messages are typically written to the Windows Event Log. Services can be automatically started when the computer is booted. They do not require a logged in user in order to execute and can run under the context of any user including the system. Windows Services are controlled through the Service Control Manager where they can be stopped, paused, and started as needed. A standard is executable is something which is launched by the user either directly or indirectly and typically require a user to be logged on and runs under his context.
  3. What is 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?
    On a 32 bit processor, the maximum virtual memory limit is 4 GB. The 4 GB is split into user space and kernel space. User space is 2 GB and the Kernel space is 2 GB. /3GB switch in the boot.ini can increase the user space to 3 GB. 64 bit processors supports upto 16 Terrabytes. So Virutal memory for the system is 16 Terrabyte. But if we are running a 32 bit application on a 64 bit processor, the amount of memory available is still 2GB (user space). Physical Address Extension is a hardware specific feature which allows to address more than 4 GB of virtual memory.
  4. What is the difference between an EXE and a DLL?
    DLL is a dependent type of program. Dll gets loaded only when a call to it is made from any application for the first time. It shares the address space of the host process.Exe is a self-running type of program, it runs its own address space.
  5. What is strong-typing versus weak-typing? Which is preferred? Why?
    Most generally, "strong typing" implies that the programming language or implementation enforces some kind of constraints upon programs, preventing them from running code which uses data in an invalid way. For instance, an integer addition operation may not be used upon strings; a procedure which operates upon linked lists may not be used upon numbers.
  6. Corillian’s product is a "Component Container." Name at least 3 component containers that ship now with the Windows Server Family.
    COM+, IIS? I dont think this has to do with IComponent as the question talks about Windows Server Family
  7. What is a PID? How is it useful when troubleshooting a system?
    Process Identifier – I use it mainly in task manager to see worker process recycles of ASP.NET
  8. How many processes can listen on a single TCP/IP port?
  9. What is the GAC? What problem does it solve?
    Global Assembly Cache. Allows you to store multiple versions of the same component / components with the same file name but from different vendors to be stored in a Well Known location allowing it to be shared by multiple application. Side by Side execution of mutiple versions of an assembly and Dll Hell are the problems it is trying to solve.
Categories: .NET Framework
  1. Unknown
    November 23, 2008 at 10:06 am

    您需要二手液晶显示屏、废旧液晶屏么?我们是不折不扣的二手液晶屏、旧液晶屏大批发商,长期大量供应可再利用的旧液晶屏。我公司提供的各种尺寸的二手液晶屏, 不同厚薄如笔记本屏,均已经过我们严格的分类,检验,测试流程。请访问协力液晶屏www.sceondhandlcd.com[bbibajibaaacbhfe]

  1. November 19, 2010 at 11:01 pm
  2. November 19, 2010 at 11:10 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: