购买
下载掌阅APP,畅读海量书库
立即打开
畅读海量书库
扫码下载掌阅APP

3.3 Examples of Popular Modern Operating Systems

3.3.1 UNIX and UNIX-like Operating Systems

Most operating systems can be grouped into two different families. Aside from Microsoft’s Windows NT-based operating systems, nearly everything else traces its heritage back to UNIX.

Linux, Mac OS X, Android, iOS, Chrome OS, Orbis OS used on the PlayStation 4, whatever firmware is running on your router — all of these operating systems are often called “UNIX-like” operating systems.

UNIX was developed in AT&T’s Bell Labs back in the mid-to-late 1960’s. The initial release of UNIX had some important design attributes that live on today.

One is the “UNIX philosophy” of creating small, modular utilities that do one thing and do them well. If you’re familiar with using a Linux terminal, this should be familiar to you — the system offers a number of utilities that can be combined in different ways through pipes and other features to perform more complex tasks. Even graphical programs are likely calling simpler utilities in the background to do the heavy lifting. This also makes it easy to create shell scripts, stringing together simple tools to do complicated things.

UNIX also had a single file system that programs use to communicate with each other. This is why “everything is a file” on Linux – including hardware devices and special files that provide system information or other data. It’s also why only Windows has drive letters, which it inherited from DOS — on other operating systems, every file on the system is part of a single directory hierarchy.

Like any history going back over 40 years, the history of UNIX and its descendants is messy, as shown in Fig.3-3. To simplify things, we can roughly group UNIX’s descendants into two groups.

One group of UNIX descendants were developed in academia. The first was BSD (Berkeley Software Distribution), an open-source, UNIX-like operating system. BSD lives on today through FreeBSD, NetBSD, and OpenBSD. NeXTStep was also based on the original BSD, Apple’s Mac OS X was based on NeXTStep, and iOS was based on Mac OS X. Many other operating systems, including the Orbis OS used on the PlayStation 4, are derived from types of BSD operating systems.

Richard Stallman’s GNU project was also started as a reaction to AT&T’s increasingly restrictive UNIX software licensing terms. MINIX was a UNIX-like operating system created for educational purposes, and Linux was inspired by MINIX. The Linux we know today is really GNU/Linux, as it’s made up of the Linux kernel and a lot of GNU utilities. GNU/Linux isn’t directly descended from BSD, but it is descended from UNIX’s design and has its roots in academia. Many operating systems today, including Android, Chrome OS, Steam OS, and a huge amount of embedded operating systems for devices, are based on Linux.

On the other hand, there were the commercial UNIX operating systems. AT&T UNIX, SCO UnixWare, Sun Microsystems Solaris, HP-UX, IBM AIX, SGI IRIX — many big corporations wanted to create and license their own versions of UNIX. These aren’t quite as common today, but some of them are still out there.

Fig.3-3 History of UNIX

The architecture of UNIX can be divided into three levels of functionality, as shown in Fig.3-4.

Fig.3-4 UNIX architecture

(1) The lowest level is the kernel, which schedules tasks, manages resources, and controls security.

(2) The next level is the shell, which acts as the UI, interpreting user commands and starting applications.

(3) The tools are at the highest level. These provide utility functions such as ls, vi, and cat.

The UNIX operating system supports the following features and capabilities:

(1) Multitasking and multiuser.

(2) Kernel written in high-level language.

(3) Programming interface.

(4) Use of files as abstractions of devices and other objects.

(5) Character-based default UI.

(6) Built-in networking. (TCP/IP is standard.)

(7) Persistent system service processes called “daemons” and managed by init or inetd.

3.3.2 Microsoft Windows

Many people expected UNIX to become the industry standard operating system, but DOS and “IBM PC compatible” computers eventually exploded in popularity. Microsoft’s DOS became the most successful DOS of them all. DOS was never based on UNIX at all, which is why Windows uses a backslash for file paths while everything else uses a forward slash. This decision was made back in the early days of DOS, and later versions of Windows inherited it, just as BSD, Linux, Mac OS X, and other UNIX-like operating systems inherited many aspects of UNIX’s design.

Windows 3.1, Windows 95, Windows 98, and Windows ME were all based on DOS underneath. Microsoft was developing a more modern and stable operating system at the time, which they named Windows NT — for “Windows New Technology”. Windows NT eventually made its way to regular computer users as Windows XP, but it was available for corporations as Windows 2000 and Windows NT before that.

All of Microsoft’s operating systems are based on the Windows NT kernel today. Windows 7, Windows 8, Windows RT, Windows Phone 8, Windows Server, and the Xbox One’s operating system all use the Windows NT kernel. Unlike most other operating systems, Windows NT wasn’t developed as a UNIX-like operating system.

Microsoft didn’t start with a completely clean slate, of course. To maintain compatibility with DOS and old Windows software, Windows NT inherited many DOS conventions like drive letters, backslashes for file paths, and forward slashes for command-line switches.

The user mode includes application processes, which are typically Windows programs and a set of protected subsystems. These subsystems are referred to as “protected” because each of these subsystems is a separate process with its own protected virtual address space. Of these, the most important subsystem is the Microsoft Win32® subsystem, which supplies much of the Windows functionality. The Windows application programming interface (API) is useful for developing both 32-bit and 64-bit Windows-based applications.

Another important subsystem, particularly with respect to migration of UNIX applications, is the Portable Operating System Interface (POSIX) for computing environments. This is a set of international standards for implementing UNIX-like interfaces. The POSIX subsystem implements these standards-based interfaces and allows application developers to easily port their applications to Windows from another operating system. The POSIX subsystem is not implemented on Windows Server 2003 but comes as a part of the Interix (Windows Services for UNIX 3.5) installation on Windows.

(3-5) The kernel mode is a highly privileged mode of operation in which the program code has direct access to the virtual memory. This includes the address spaces of all user mode processes and applications and their hardware. The kernel mode is also known as the supervisor mode, protected mode, or Ring 0. The kernel mode of Windows Server 2003 contains the Windows NT executive as well as the system kernel. The Windows NT executive exports generic services that protected subsystems call to obtain basic operating system services, such as file operations, input/output (I/O), and synchronization services. Partitioning of the protected subsystems and the system kernel simplifies the base operating system design and makes it possible to extend the features of an individual protected subsystem without affecting the kernel. The kernel controls how the operating system uses the processors. Its operations include scheduling, multiprocessor synchronization, and providing objects that the executive can use or export to applications.

The Windows operating system supports the following features and capabilities:

(1) Multitasking.

(2) Flexibility to choose a programming interface (user and kernel APIs).

(3) A graphical user interface (GUI) and a command-line interface for users and administrators. (The default UI is graphical.)

(4) Built-in networking. (Transmission Control Protocol/Internet Protocol [TCP/IP] is standard.)

(5) Persistent system service processes called “Windows Services” and managed by the Windows Service Control Manager (SCM).

(6) Single compatible implementation irrespective of the vendor from whom it is purchased. W+ja8XNAGQ+iIOCXXQMRMbUiIjt4VM2/VvN7xbz6sH2l+N5ZH8pC+bneG7hJMM1Y

点击中间区域
呼出菜单
上一章
目录
下一章
×