[go: up one dir, main page]

0% found this document useful (0 votes)
15 views5 pages

Mod 01 Content

The document provides an overview of operating systems (OS), defining them as programs that manage hardware and provide services to users, with a focus on the kernel. It discusses the history and evolution of various operating systems, including Microsoft Windows and Linux, and introduces key concepts such as system calls, processes, file systems, and interprocess communication. Additionally, it highlights the importance of security and protection mechanisms in operating systems to safeguard against threats.

Uploaded by

nightmarepuma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Mod 01 Content

The document provides an overview of operating systems (OS), defining them as programs that manage hardware and provide services to users, with a focus on the kernel. It discusses the history and evolution of various operating systems, including Microsoft Windows and Linux, and introduces key concepts such as system calls, processes, file systems, and interprocess communication. Additionally, it highlights the importance of security and protection mechanisms in operating systems to safeguard against threats.

Uploaded by

nightmarepuma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Module 1: Introduction

What is an Operating System?

An Operating System is a computer program that wraps around computer hardware and provides
services to users (usually human users). These services include a controlled way to manipulate the
hardware within the operating system; the hardware here includes peripherals like hard drives, printers,
CD/DVD drives, but also the Central Processing Unit (CPU) of the computer, and it's Random Access
Memory (RAM). The following diagram, similar to one found on the cover of one of the great books on
operating systems "The Design of the UNIX Operating System" by Maurice J. Bach, illustrates this
concept:

Usually, when we speak of the Operating System (typically abbreviated "OS"), we mean the Kernel which
is the conceptually always-resident computer program that wraps around the Hardware, as depicted in
the diagram. The area surrounding the kernel, e.g. the shell, library routines, and applications, is
sometimes termed user space. When people talk about the "Ubuntu Linux" operating system or the
"Windows 7" operating system, they sometimes really mean the kernel as well as the other applications
that exist outside the kernel in user space. In this class, we are focusing on the Kernel.

There are two interfaces from the kernel, the inner interface and the system call interface. The inner
interface is the interface from the kernel to the hardware it surrounds. This interface, between the kernel
and the hardware, shows that operating systems are at least somewhat hardware dependent; the kernel
needs to understand how much memory it can use, how many CPUs are present, what peripheral
devices are present, etc. Modern operating system design puts most of the algorithmic part of the OS in a
high level language to aid in porting the operating system to other hardware architectures or devices;
however, usually at least some small part of the kernel code must be in assembly (machine) language.
Thus, if you need to port the OS to another type of hardware, that part must be rewritten. The next circle,
the interface between the kernel and the user space is called the system call interface. System calls are
those services provided in a well structured and well defined way by the kernel to user space.

Operating System History

In your text, Tanenbaum discusses Operating System history in "generations" (section 1.2). In looking
online, there are a few other references on operating system history that reflects the same generational
aspect that Tanenbaum projects. One article, The Five Generations of Computers , from Webopedia,
discusses five generations of computers. Note that the generations of operating systems are clearly
similar. While the article refers to the fifth generation as "Artificial Intelligence" it also mentions quantum
computers and nanotechnology. Your text places mobile operating systems like Android as the “fifth”
generation. What do you think might be the “sixth” generation? We will address this in our first discussion
assignment.

What are some of the main operating systems that are in use today? (There are a few web sites that
track this info, like this one).

• Obviously, the predominant operating system is Microsoft Windows. This operating system is
prevalent on many PCs around the world. Windows is an operating system developed specifically
to run on personal computer architectures.
• When we talk about Apple computers, many aren't aware of the name of the operating system—
since the system is bundled tightly with the hardware it runs on. The current version of the Apple
operating system—Mac OS X—is actually a version of UNIX under the hood. Part of Mac OS X is
based on "Mach" —a system created by Carnegie Mellon using a 'microkernel' approach that is
similar from a system call perspective to UNIX, but varies in terms of the overall architecture of
the operating system. We will talk about this more in the next module when we consider operating
system architectures.
• Versions of the UNIX operating system also have long history. "BSD" (Berkeley Standard
Distribution) is one type of UNIX; another is System V UNIX. Each of these variants has a long
and interesting history, and versions of BSD UNIX (FreeBSD, Open BSD) still exist and are used.
System V UNIX is owned by SCO, and its codebase still is used in many offshoots (e.g. Solaris
11 from Sun/Oracle).
• The Linux operating system is continuing to gain popularity in the marketplace. I have an Ubuntu
Linux system running on one of my PCs—a PC that became unusable when Windows XP
crashed and died. I work regularly with a version of Linux supported by Red Hat. Linux is also
used on many web servers. Linux is not based on either BSD or System V UNIX, but operates in
a very similar manner in terms of its system call interface, libraries and commands.
• We should also consider mobile operating systems (e.g. Android, based on a modified Linux
kernel, or Apple's iOS). These are quickly becoming among the most used operating systems.
• For educational purposes, Minix is a small (but real) operating system, which is used by classes
on operating systems to allow students to get a feel for building and modifying operating systems.
Although more of a trivia curiosity, Minix is in fact the most used operating system in the world.
We will, in fact, use Minix for this class.

Windows History

• In 1981, Microsoft introduced the "MS-DOS" (Disk Operating System) for IBM PCs (and clones).
The first version of Windows was released in 1985.
• Windows 3.1, their first real commercial success, was released in 1992. It had around 3 million
lines of source code.
• Windows 98 contained around 13 million lines of source code.
• Windows XP was released in 2001; it consisted of around 45 million lines of source code
• Windows Vista, released in 2007, has about 55 million lines of source code
• Windows 7 was released in 2009. One estimate reports that it has around 50 million lines of
source code.
• Windows 8 was released in 2012.
• Windows 10 was then released in 2014.
• Windows 11 was released in 2021.

Linux History

• Linux was created in the early 1990s by Linus Torvalds based on his dissatisfaction with PC
operating systems.
• Runs primarily on x86 architectures. Portability was not a driving issue in the development of
Linux
• Linux is a 'UNIX-like' operating system
• Linux is POSIX compliant, but is not based on BSD UNIX or System V.x Unix
• Current stable version is 6.4.12 (as of August 2023; www.kernel.org)

Available Open Source Operating Systems

• Linux (http://www.linux.org)
• Minix (http://www.minix3.org)
• OpenSolaris (Discontinued)
• BSD
o http://www.openbsd.org
o http://www.netbsd.org
o http://www.freebsd.org
o http://www.trueos.org (Discontinued)
o http://www.dragonflybsd.org
• Darwin (http://www.puredarwin.org)
• Haiku-OS (http://www.haiku-os.org)
• React-OS (http://www.reactos.org)

Do you know of any others? Let me know!

An Overview of Operating System Concepts

System Calls

We introduced the concept of system calls above. A list of the major system calls for POSIX (as well as
for Minix) is in your text (Figure 1.18) on page 54.

Programs and Processes

In operating system terminology, a program is a collection of instructions and data residing in a disk file.
This, for example, would be an executable (a.out or foo.exe) resulting from compiling and linking source
code (note the distinction here—a program isn't the source code, it is the executable file). A process is the
system environment in which a program runs. In a future module, we will discuss the structure of a
process, how the process starts, how the operating system manages the process, and how the process
ends. Processes execute in both user space and in the kernel, but a process can only execute in the
kernel via a system call. You can see the system calls involved in process management in Figure 1.18
(e.g. fork(), execve(), etc.)

Files and File systems

Files are simply containers for data, and file systems are a method of organizing files. Different operating
systems have different approaches for this, although most these days have the concept of a hierarchical
file system, where the top of the file system (called the 'root') contains a set of directories, each of which
can contain files and other directories, and so on (e.g. Figure 1.14 in your text). You can see some of the
system calls related to file/directory creation, management, and deletion in Figure 1.18. In an earlier
edition of the text, Tanenbaum put the pipe() system call under "File Management"— I didn’t agree with
putting it there, since pipe() really is a system call that allows two processes to exchange data—that is, it
is more about interprocess communication rather than File Management. But, when you look at the Minix
source code, you will see that pipe() is actually implemented in the file management part of the kernel, so
from that aspect, it makes sense. But, ultimately, Tanenbaum agreed with me, and moved that call out of
this table. We have several future modules on file/file system management.

Interprocess Communication (IPC)

For many applications, it is important for the processes within an operating system to communicate with
each other. For example, one process may take the contents of a file, perform some processing, and then
pass the results to another process. Or, a process may need to signal some event (say a timeout) to
another process.

The aforementioned pipe() call is one IPC method that is used by the UNIX shell:

% who | wc -l

This UNIX shell pipeline passes the output of the "who" command (a line per each current user logged
into the system) into a program that counts the lines of text in its standard input ("wc -l"). Thus, this simple
pipeline tells us how many users are on the system (although some users may be counted more than
once).

The signal mechanism (usually simply termed signals) is one where one process can 'signal' another of
an event—as well, a limited amount of data can be passed. The reason the system call for signaling
another process is called 'kill' is that the default action for a process receiving most signal types is for the
process to die—thus the signal killed the process. If that was all there was to signals as an interprocess
communication mechanism, it would be limited to say the least. However, a process that is expecting a
particular signal can 'catch' the signal (hence preventing death) and actually trigger special processing on
receipt of the signal. Did you know when you are using the command line interface on a UNIX system,
and you hit 'control-C' to kill a process, you are actually sending a signal from the kernel (the TTY device
driver) to that process, and thus killing the process as long as that process is not catching that signal
(which it usually will not be)?

One other interprocess communication mechanism not mentioned in Tanenbaum's table is message
passing. This is interesting, since the architecture of the Minix operating system (as we will discuss in the
next module) is largely based on message passing—but this message passing mechanism is only
available in the kernel. Tanenbaum's Minix doesn't have message passing as supported by system calls,
but other UNIX systems do (e.g. msgsnd() and msgrcv()).

Also, network communication (e.g. sockets) can be considered as a form of interprocess communication.
Socket communication is established between processes, and this socket communication can be a
stream of data, or it can be discrete messages. The one advantage of this form of IPC is that the
processes do not have to be on the same machine or on the same operating system (although they
certainly can be).

What other forms of interprocess communication can an operating system support?

In these days of massive Internet usage, it is more important than ever to secure your computer system
against threats—both accidental threats and deliberate attacks. We will discuss in later modules some of
the rudimentary aspects of this topic. Protection is any mechanism for controlling access of processes to
operating system resources. In the UNIX-like world, file permissions bounced off of a process's effective
user ID and effective group ID can either allow or deny that process to access the file. Security is defense
of the system against internal and external attacks. This includes denial of service, identity theft, worms,
viruses, etc.

You might also like