Operating Systems Architecture

Operating Systems Architecture

Sections: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Index | Next >

Programs and Services

Learning objective: Explain the difference between programs and services

Click on image to enlarge.

Computer program

A computer program is a sequence of instructions written to perform a specified task for a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute the instructions. The same program in its human-readable source code form, from which executable programs are derived (e.g., compiled), enables a programmer to study and develop its algorithms. [Wikipedia]


A process is an executing program, including the current values of the program counter, registers, and variables. Conceptually, each process has its own virtual CPU. In reality, of course, the real CPU switches back and forth from process, but to understand the system, it is much easier to think about a collection of process running in (pseudo) parallel, than to try to keep track of how the CPU switches form program to program. This rapid switching back and forth is called multiprogramming, as we saw in the previous section. The difference between a process and a program is subtle, but crucial. An analogy may help make this point clearer. Consider a culinary-minded computer scientist who is baking a birthday cake for his daughter. He has a birthday cake recipe and a kitchen well-stocked with the necessary input: flour, eggs, sugar, and so on. In this analogy, the recipe is the program (i.e., an algorithm expressed in some suitable notation), the computer scientist is the processor (CPU), and the cake ingredients are the input data. The process is the activity consisting of our baker reading the recipe, fetching the ingredients, and baking the cake. [UNESCO]


In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user. Typically daemon names end with the letter d: for example, syslogd is the daemon that implements the system logging facility, or sshd, which services incoming SSH connections. Systems often start daemons at boot time: they often serve the function of responding to network requests, hardware activity, or other programs by performing some task. Daemons can also configure hardware (like udevd on some GNU/Linux systems), run scheduled tasks (like cron), and perform a variety of other tasks. [Wikipedia]

In the Microsoft DOS environment, daemon-like programs were implemented as Terminate and Stay Resident (TSR) software. On Microsoft Windows NT systems, programs called Windows services perform the functions of daemons. They run as processes, usually do not interact with the monitor, keyboard, and mouse, and may be launched by the operating system at boot time. In Windows 2000 and later versions, Windows services are configured and manually started and stopped using the Control Panel or the net start and net stop commands. [Wikipedia]

✏ Self Quiz!

Select the best response(s) for each question/statement. Use this opportunity to test *your* knowledge and not just move on...

1) Programs...
Are based on an algorithms
Are mostly text files to be executable
Are the same as processes

2) Services...
Are usually controlled by the user
Are usually started at boot time
Are sometimes called "daemons"


Thinking: How many services are currently running on your computer?

Key terms: TSR, daemon, process, program, services

To maximize your learning, please visit these Web sites and review their content to help reinforce the concepts presented in this section.

Quick links:
Computer program @ Wikipedia
Chapter 1 Introduction into Operating system @ UNESCO (www.netnam.vn/unescocourse/os/13.htm)
Daemon @ Wikipedia

Embedded Resources

Notes on navigation: Click inside the frame to navigate the embedded Web page. - Click outside the frame to navigate this page to scroll up/down between the embedded Web pages. - Click on the frame title to open that page in a new tab in most browsers. - Click on the the "Reload page" link to reload the original page for that frame.

Computer program @ Wikipedia | Reload page | If frame is empty, click on the link to view the page in a new tab or window

Chapter 1 Introduction into Operating system @ UNESCO (www.netnam.vn/unescocourse/os/13.htm) | Reload page | If frame is empty, click on the link to view the page in a new tab or window

Daemon @ Wikipedia | Reload page | If frame is empty, click on the link to view the page in a new tab or window

Sections: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Index | Next >