What is an Operating System?

An Operating System (OS) is a software application that controls the hardware (HW) and regulates access to the HW for the convienience and safety of the user and applications.  Conceptually the OS sits between the HW and the applications and the applications access the hardware indirectly via the operating system.

The OS handles all of the lower-level details of controlling the HW directly, via cosde called device drivers.  Users and applications are usually not allowed to access the harware directly but must go through the OS.  In this way, the OS controls who access the HW at what times.  By hiding the details of the HW and presenting intuitive aspects of it to users and applications, the OS makes life more convienient for users and application developers.  By regulating access to the HW, the OS ensures that users and applications do not step on each others toes or gain access to data they should not see.

The OS achieves its goals by preventing the users and applications from accessing the HW directly, forcing them to go through the OS instead.  This allows the OS to regulate access to the HW and provide the abstractions.    Besides making devices simpler and safer to use, providing abstractions allows a wide range of devices to appear the same or simular enough that the same applications can run on a wide range of hardware configurations and users can move from one computer to another with little trouble.

The secret to how the OS prevents access to the HW while still having access itself lies with the CPU.  The CPU has at least 2 different modes of operation; the kernel mode and the user mode.  In the user mode, certain instructions cannot be executed where as in the kernel mode, all instructions can be executed.  The instructions that cannot be executed in user mode, are those that control the HW.  An ordinary application runs with the CPU in user mode.  When the application needs access to the HW, it switches to kernel mode via a “trap”.  Executing this trap also switches execution to the OS.  So the application itself never executes in kernel mode.  The OS performs the HW access, switches back to user mode and the returns execution to the application.

Advertisements

About Jesse Alber

Jesse Alber attained a Bachelor of Arts Degree in Speech Communications with an Athletic Coaching Endorsement from Hastings College in May, 1993. From 1994 - 2000, Alber served in leadership roles in human resources, retail, and production. Alber enlisted in the U.S. Army in 2000. He served as a Armored Cavalry Scout and Troop Training Manager with A 3/7 CAV 3d ID until 2004. Alber deployed to Bosnia in 2001 and Kwait / Iraq in 2003. Alber served in the Army Reserves from 2005 - 2008. From 2004 - 2010 Alber served as the Adult Education Coordinator for Central Community College and Executive Director for the Hastings Literacy Program. Alber returned to Hastings College in 2010 to study Computer Science and Web Design. He is currently emploed as a Programming and Web Development Intern with Servi-Tech Industries. Alber will complete his program of study in the summer of 2012.
This entry was posted in Uncategorized. Bookmark the permalink.

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