Thursday, March 31, 2005

Scott Hanselman posted some of the .Net interview questions on his blog, dividing it into several segments. I tried to answer them in parts, in little elaborated way, by putting definitions with answers. You really can’t get away with Google to do it all. I took reference from some websites to elaborate the definition. Here goes part I of the series…

Everyone who writes code…

  • Describe the difference between a Thread and a Process?

Process:  A process is a single executable module (.Exe file) that runs concurrently with other executable modules. For example, an internet browser and a word processor can run simultaneously. Processes are separate executable, loadable modules (as opposed to threads). One process can’t affect other processes running in same multitasking environment.

Thread: Threads in contrary are the tasks that run concurrently with other tasks within a single executable file.  Within the same process, they can affect each other.  One process can contain any number of threads.

Example: From within a data base application, a user may start both a spell check and a sorting operation.  Contrast this with multiple .EXE files (processes) like a word processor, a data base, and internet browser, multi-tasking under OS/2 for example.

  • What is a Windows Service and how does its lifecycle differ from a "standard" EXE? 

Windows services are long running process (applications) that are ideal for use in server environments. These applications do not have user interface and they do not produce any visual output. Its lifecycle is managed by “Service Control Manager” which is responsible for starting and stopping the service. They do not require a logged in user in order to execute and can run under the context of any user including the system. On the other hand, a “Standard executable” doesn’t require Control Manager and is directly related to the visual output.


  • 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?

Windows provides a page-based virtual memory management scheme that allows applications to realize a 32-bit linear address space for 4 gigabytes (GB) of memory. As a result, each application has its own private address space from which it can use the lower 2 GB—the system reserves the upper 2 GB of every process's address space for its own use.

 Figure: A process in Windows NT has a 4-GB linear address space, of which the lower 2 GB is available for applications to use.

As illustrated in Figure, each process can address up to 4 GB of memory using 32-bit linear addresses. The upper half of the address space is reserved for use by the system. Because the system is the same for each process, regardless of the subsystem it runs on, similar pages of system memory are typically mapped to each process in the same relative location for efficiency.


  • What is the difference between an EXE and a DLL?

DLL is An abbreviation for dynamic link library, a file containing a collection of Windows functions designed to perform a specific class of operations An EXE contains an entry point to start execution { main() in C/C++ and  Public Static Void Main() in .Net  } whereas functions within DLLs are called (invoked) by applications (EXEs) as necessary to perform the desired operation.

  • What is strong-typing versus weak-typing? Which is preferred? Why?

 Strict enforcement of type rules with no exceptions is strong-typing. In a strongly typed language, type usage can be detected at compile time rather then run-time. In these languages, conversion between types requires use of explicit conversion functions as opposed to implicit type coercion in weak-typed (batter called run-typed) languages.

As a common assumption, strong typing catches more errors at compile time than weak typing, resulting in fewer run-time exceptions (but still is a disputable point when it comes to "which one to use").

 

  • Corillian's product is a "Component Container." Name at least 3 component containers that ship now with the Windows Server Family.

Microsoft first announced C# and the .NET Framework in summer 2000, calling C# 'The first component-oriented language in the C/C++ family.'  The essence of component development is not to build what you can buy, on the basis that snapping together pre-tested parts is faster, cheaper and probably more reliable than coding everything for yourself.

As a definition, almost any class file is a component. Moreover, it can easily be compiled to a DLL, it benefits from .NET versioning, and it can be reused. The existence of components also implies the existence of containers, which again may be visual or non-visual. The container plays an important role in component management. In particular, all containers implement IDisposable, which means they have a Dispose method for releasing unmanaged resources such as window handles or open files. In their Dispose method, containers must also call Dispose on all the components they host. In the .NET Framework both ASP.NET Web Forms and rich client Windows Forms are visual component containers.  System.Web.UI.Page, System.Windows.Forms.Form and System.ComponentModel.Container are few other component containers which ship with Windows Server Family.

  • What is a PID? How is it useful when troubleshooting a system?

PID stands for Process Identifier, a uniquely assigned integer that identifies a process in the operating system. In any system, applications use PID to identify the process uniquely. Also, it is used in diagnosing the problems with the process in Multi-Tasking systems.

  • How many processes can listen on a single TCP/IP port?

Probably ONE, if you need to create another TCP/IP listener, you need to set-up a different port.

  • What is the GAC? What problem does it solve?

Each computer on which the common language runtime is installed has a machine-wide code cache called the global assembly cache (GAC). Assemblies deployed in the global assembly cache must have a strong name. A developer tool named "Global Assembly Cache tool" (Gacutil.exe), provided by the .NET Framework SDK can be used to deploy assemblies to GAC. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. It provides us the way to overcome “DLL Hell” problem also.

         Cheers..

posted on Thursday, March 31, 2005 8:08:00 PM (Central Standard Time, UTC-06:00)  #    Comments [3] Trackback
Related posts:
Managing an Agile Project Portfolio
Surprising Pitfalls of Teamwork Training...
Web 2.0 Color palettes and design
Harvard Business School Case Study on Wipro's Factory Model
Integrated ERP software uses Microsoft.NET
Embedded database supports C#, .NET Compact Framework
Tracked by:
"jhonny depp" (jhonny depp) [Trackback]
"mediale affari" (mediale affari) [Trackback]
"albergo bournemouth" (albergo bournemouth) [Trackback]
"memory card" (memory card) [Trackback]
"new york four seasons hotel" (new york four seasons hotel) [Trackback]
"gioco scaricare gratis pc" (gioco scaricare gratis pc) [Trackback]
"immagini disney" (immagini disney) [Trackback]
"londra big ben" (londra big ben) [Trackback]
"MUSIC - Bethlehem Morning" (MUSIC - Bethlehem Morning) [Trackback]
"calendario 2003" (calendario 2003) [Trackback]
"midi colonna sonore" (midi colonna sonore) [Trackback]
"amministratore condominiale" (amministratore condominiale) [Trackback]
"freddissimo gradito papa" (freddissimo gradito papa) [Trackback]
"PRODUCTS" (PRODUCTS) [Trackback]
"vacanza ad ischia" (vacanza ad ischia) [Trackback]
"val d aosta" (val d aosta) [Trackback]
"gioco adulto gratis" (gioco adulto gratis) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"bionde masturbandosi" (bionde masturbandosi) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"l attimo fuggente" (l attimo fuggente) [Trackback]
"giochi carta regolamento" (giochi carta regolamento) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"HOME" (HOME) [Trackback]
"perline gioiello" (perline gioiello) [Trackback]
"MUSIC" (MUSIC) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"scuola superiore" (scuola superiore) [Trackback]
"MUSIC - Gloria" (MUSIC - Gloria) [Trackback]
"PHOTOS" (PHOTOS) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"PARTNERS" (PARTNERS) [Trackback]
"pulcino fottilo nella residenza" (pulcino fottilo nella residenza) [Trackback]
"MUSIC - Mary Did You Know/What Child Is This?" (MUSIC - Mary Did You Know/What ... [Trackback]
"torte bindi" (torte bindi) [Trackback]
"CONTACT" (CONTACT) [Trackback]
"SCHEDULE" (SCHEDULE) [Trackback]
"OUTREACH" (OUTREACH) [Trackback]
"medio apparecchio" (medio apparecchio) [Trackback]
"albergo firenze hotel" (albergo firenze hotel) [Trackback]
"purchase flagyl 500mg on line" (purchase flagyl 500mg on line) [Trackback]
"van norman brake lathe" (van norman brake lathe) [Trackback]
"Big Brother 2005" (Big Brother 2005) [Trackback]
"RFID Tags" (RFID Tags) [Trackback]
"memory loss ambien" (memory loss ambien) [Trackback]
"fact act" (fact act) [Trackback]
"miller generators" (miller generators) [Trackback]
"plastic card printer" (plastic card printer) [Trackback]
"subwoofer auto" (subwoofer auto) [Trackback]
"sofa sleeper mattress" (sofa sleeper mattress) [Trackback]
"Credit Internet" (Credit Internet) [Trackback]
"Oriental Trading Post" (Oriental Trading Post) [Trackback]
"calendar publishers" (calendar publishers) [Trackback]
"ray of light" (ray of light) [Trackback]
"young teen hitch hikers" (young teen hitch hikers) [Trackback]
"import of perfume" (import of perfume) [Trackback]
"gameboy advance sp" (gameboy advance sp) [Trackback]
"vicks humidifier" (vicks humidifier) [Trackback]
"eureka vacuum belts" (eureka vacuum belts) [Trackback]
"audition movie spoiler" (audition movie spoiler) [Trackback]
"electronic components listing" (electronic components listing) [Trackback]
"September Holidays" (September Holidays) [Trackback]
"mexico pharmacies" (mexico pharmacies) [Trackback]
"how to construct a respirator" (how to construct a respirator) [Trackback]
"precut mats" (precut mats) [Trackback]
"playboy playmate july 1996" (playboy playmate july 1996) [Trackback]
"zyrtec and conception" (zyrtec and conception) [Trackback]
"phat farm sneakers" (phat farm sneakers) [Trackback]
"DRUG INTERACTION WITH PROVERA AND ATIVAN" (DRUG INTERACTION WITH PROVERA AND AT... [Trackback]
"computer restarts for no reason" (computer restarts for no reason) [Trackback]
"technical defenition of SSL" (technical defenition of SSL) [Trackback]
"DEWALT ROUTER" (DEWALT ROUTER) [Trackback]
"Effects of Nagasaki Hiroshima Bombing" (Effects of Nagasaki Hiroshima Bombing) [Trackback]
"8X 4X AGP INTERFACE" (8X 4X AGP INTERFACE) [Trackback]
"King Kong Lives" (King Kong Lives) [Trackback]
"Cabinet Knobs" (Cabinet Knobs) [Trackback]
"table top lectern oklahoma model 22" (table top lectern oklahoma model 22) [Trackback]
"Pressure Sensor" (Pressure Sensor) [Trackback]
"basic editions" (basic editions) [Trackback]
"excel communications" (excel communications) [Trackback]
"Sheet Plastic Perth" (Sheet Plastic Perth) [Trackback]
"ivillage horoscopes" (ivillage horoscopes) [Trackback]
"learning management system" (learning management system) [Trackback]
"cost containment by third party payers" (cost containment by third party payers... [Trackback]
"nec drivers" (nec drivers) [Trackback]
"Careers in Broadcast Journalism" (Careers in Broadcast Journalism) [Trackback]
"rhode island lodging" (rhode island lodging) [Trackback]
"hand foot mouth disease" (hand foot mouth disease) [Trackback]
"hilton hotel brussels" (hilton hotel brussels) [Trackback]
"Kenwood Car Stereo Wiring Instructions" (Kenwood Car Stereo Wiring Instructions... [Trackback]
"homestead land Arkansas" (homestead land Arkansas) [Trackback]
"Hockey Fight Video Clips" (Hockey Fight Video Clips) [Trackback]
"branches of biology" (branches of biology) [Trackback]
"scarves from mexico" (scarves from mexico) [Trackback]
"edinburgh postnatal depression scale" (edinburgh postnatal depression scale) [Trackback]
"madrid logo" (madrid logo) [Trackback]
"gym mirrors" (gym mirrors) [Trackback]
"Free plans for a cable descrambler" (Free plans for a cable descrambler) [Trackback]
"cd duplications" (cd duplications) [Trackback]
"vollrath pro-hg cookware" (vollrath pro-hg cookware) [Trackback]
"penis health" (penis health) [Trackback]
"Orange County cosmetic surgeon" (Orange County cosmetic surgeon) [Trackback]
"park petco" (park petco) [Trackback]
"Peru Vacation Package from DFW" (Peru Vacation Package from DFW) [Trackback]
http://freewebs.com/aspxfaq/03/sitemap2.html [Pingback]
http://freewebs.com/toltom/02/sitemap15.html [Pingback]
http://freewebs.com/toltom/03/playstation-3.html [Pingback]
http://freewebs.com/toltom/11/sitemap6.html [Pingback]
http://freewebs.com/toltom/10/cozumel.html [Pingback]
http://kevruublog.tripod.com/7.html [Pingback]
http://kevruublog.tripod.com/62.html [Pingback]
http://esrdwu.org/sitemap16.html [Pingback]
http://rma7dj.org/free-nude-muscle-men.html [Pingback]
http://topslots.nl.eu.org/10/index.html [Pingback]
http://freewebs.com/amexa/17/http-mad-money-com.html [Pingback]
http://freewebs.com/amexa/11/north-sh-ore-lij-health-system.html [Pingback]
http://freewebs.com/amexa/35/sitemap19.html [Pingback]
http://pinofranc.homestead.com/02/sitemap15.html [Pingback]
http://pinofranc.homestead.com/02/sitemap13.html [Pingback]
http://pinofranc.homestead.com/00/www-hilary-duff-com.html [Pingback]
http://lagxz-xxx.com/jorja-fox-a-lesbian.html [Pingback]
http://rxfac-www.com/i-dont-know.html [Pingback]
http://zunvoonews.angelfire.com/70.html [Pingback]
http://freewebs.com/madfeenews/159.html [Pingback]
http://tadviinews.angelfire.com/196.html [Pingback]
http://nbn6i-ooo.com/alone-sex-dog.html [Pingback]
http://zelkuunews.tripod.com/160.html [Pingback]
http://sncjr-hhh.com/sex-pills.html [Pingback]
http://wyckz-xxx.biz/cute-ass.html [Pingback]
http://ncier-www.biz/disney-sexy.html [Pingback]
http://ovx5a-eee.com/young-ladies-little-tits.html [Pingback]
http://freewebs.com/niret/08/breast-cancer-walk.html [Pingback]
http://freewebs.com/amexa/13/john-hancock-life-insurance.html [Pingback]
http://freewebs.com/niret/14/masters-tiger-gym.html [Pingback]
http://freewebs.com/lcddlp/08/earnest-money.html [Pingback]
http://freewebs.com/bermut/08/junk-cars.html [Pingback]
http://yjwgh-rrr.com/mariah-carey-sexy.html [Pingback]
http://unibetkom.5gbfree.com/00113-blog.html [Pingback]
http://ramambo.nl.eu.org/17/morton-buildings.html [Pingback]
http://harum.nl.eu.org/hooboys.html [Pingback]
http://ramambo.nl.eu.org/urlsnip-com-831126.html [Pingback]
http://asmonet.nl.eu.org/theory-of-a-dead-man.html [Pingback]
http://kp7ide0.biz/national-weather-service-com.html [Pingback]
http://yermena.nl.eu.org/www-babyrus.html [Pingback]
http://meritblog.nl.eu.org/redwood-caregiver-resource-center.html [Pingback]
http://srykwzw.biz/stained-concrete.html [Pingback]
http://nasferablog.netfirms.com/12.html [Pingback]
http://kfaqlam.biz/black-pornography.html [Pingback]
http://aajs1yy.biz/japanese-schoolgirl-bondage.html [Pingback]
http://albldh9.biz/teen-clothing-stores.html [Pingback]
http://viko--blog.nl.eu.org/joanna-krupa-naked.html [Pingback]
http://nasferablog.netfirms.com/514.html [Pingback]
http://vbo--blog.nl.eu.org/glamour-models-gone-bad.html [Pingback]
http://nasferablog.netfirms.com/495.html [Pingback]
http://bvdwkri.biz/naked-gals.html [Pingback]
http://klo--blog.nl.eu.org/sitemap14.html [Pingback]
http://www.nonedotweb.org/st79.html [Pingback]
"generische viarga cialis" (generische viarga cialis) [Trackback]
".NET interview questions and answers" (IWebThereforeIAm) [Trackback]