Developer Q&A Part 1

Last week I wrote about the set of developer questions posted by Scott.  Well, as promised, here are the first few that I’ve got through…thumbnail

Q1.  Describe the difference between a thread and a process

A1.  A process is a container of threads (having a least one thread of execution).  It has its own memory space.  A process can have multiple threads that share the same memory space and program code.  A thread is a single thread of execution.

Q2. What is a Windows Service and how does its lifecycle differ from a “standard” EXE?

A2.  A Windows Service runs under the control of the SCM (Service Control Manager).  They run in the background under the SYSTEM account and do not require interaction with a users desktop therefore they can run independently of a user (hence they do not require a user to be logged on for them to run).  When the system boots any services marked as “automatic” are started and when Windows shutdowns they are terminated.

A standard EXE is invoked by a user post logon and runs under the security privileges of the current desktop user.  A user may close the EXE at which point the program is terminated, otherwise the program is terminated at log off (which can occur without a shutdown).

OK, more of these later.  In the mean time I’m developing my .NET product showcase site.

Advertisements

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s