Unix Systems For Modern Architectures Pdf 24

0 views
Skip to first unread message

Deny Debwany

unread,
Jul 4, 2024, 8:39:04 AM (18 hours ago) Jul 4
to stopnertioflex

The goal of this book is to provide practical information on the issues operating systems must address in order to run on modern computer systems that employ cache memories and/or multiprocessors. At the time of this writing, a number of books describe UNIX system implementations, but none describes in detail how caches and multiprocessors should be managed. Many computer architecture books describe caches and multiprocessors from the hardware aspect, but none successfully deals with the operating system issues that these modern architectures present. This book is intended to fill these gaps by bridging computer architecture and operating systems.

This book is intended to assist the operating system developer in two ways. First, the reader will learn how existing operating systems must be adapted to run on modern architectures. This is accomplished by a detailed examination of the operation of these architectures from the operating system perspective and an explanation of what the operating system must do to manage them. Second, the reader will learn the trade-offs involved in the different approaches taken by modern architectures. This will give the operating system developer the background needed when involved in the design of new computer systems employing caches and multiprocessors.

A selected set of modern microprocessor architectures is used to illustrate the concepts where appropriate. Representing the traditional CISC (complex instruction set computer) processors are the Motorola 68040 and the Intel 80X86 line (80386, 80486, and Pentium). The RISC (reduced instruction set computer) approach is represented by the MIPS line (R2000, R3000, and R4000), the Motorola 88000, and the SPARC version 8 compatible processors from Texas Instruments (the MicroSPARC and the SuperSPARC). Several other examples, including Sun and Apollo workstations and the Intel i860, are also presented. A summary of the characteristics of these processors can be found in Appendix A.

Unix has evolved for more than five decades, shaping modern operating systems, key software technologies, and development practices. Studying the evolution of this remarkable system from an architectural perspective can provide insights on how to manage the growth of large, complex, and long-lived software systems. In 2016 my colleague Paris Avgeriou and I embarked on this study aiming to combine his software architecture insights with my software analytics skills. Here is a brief summary of the study, which was published this month in the IEEE Transactions on Software Engineering.

A large number of Unix-defining design decisions were implemented right from the very early beginning, with most of them still playing a major role. This is apparent if one compares the high-level architecture diagrams of the first released Unix version with the current one. Impressively, the basic shape of the 1972 First Research Edition architecture has a similar structure and shares many elements with the modern FreeBSD version. (The common elements are share the same color.)

Some Unix commands changed names over time, but you might still recognize their earlier predecessors in Unix 2nd Edition. Programs like the sh shell (supporting early versions of : labels, goto, and if), check and salv (like fsck), dsw (like rm -i), istat (inode status), m6 (an early macro processor, the predecessor to today's m4), and tm (system time information, similar to uptime and other modern commands).

To be sure, Unix from 50 years ago lacked the breadth of command-line options that we enjoy today. For example, the modern ls command advertises 60 different command line options, while ls from Unix 2nd edition supported just five. But it clearly showed promise, even in the early days, and quickly grew.

Today, every Unix system can trace its ancestry back to the original Unix. That includes Linux, which uses GNU tools that are based on Unix documentation. Linux is definitely far removed from its Unix roots, supporting modern architectures and sporting a range of useful modern tools, but the core command-line experience is still quite similar to Unix of the 1970s. The next time you use ls to list files on your server, consider that you're using a command from 50 or more years ago. And it's still going.

Created to help users who wish to, or who are, running multiple operating systems on one computer. The book starts off with basic information on PC architecture, including the BIOS, the hardware, and the history of the PC and how it influences multi-OS configurations. It then proceeds onto practical advice on partitioning, OS installation, data exchange, cross-platform utilities, networking, and modern hardware. More details.

Many processors have instructions that allow accesses with a positive-only offset relative to some register. Those include many modern architectures, as well as some old ones. For example, the ARM Thumb ABI provides for stackpointer-relative accesses with a positive offset encoded within a single 16-bit instruction word.

In MIPS and many modern RISC architectures (like PowerPC, RISC-V, SPARC...) there are no push and pop instructions. Those operations are explicitly done by manually adjusting the stack pointer then load/store the value relatively to the adjusted pointer. All registers (except the zero register) are general purpose so in theory any register can be a stack pointer, and the stack can grow in any direction the programmer wants

That said, the stack typically grows down on most architectures, probably to avoid the case when the stack and program data or heap data grows up and clash to each other. There's also the great addressing reasons mentioned sh-'s answer. Some examples: MIPS ABIs grows downwards and use $29 (A.K.A $sp) as the stack pointer, RISC-V ABI also grows downwards and use x2 as the stack pointer

The objectives of this course is to make you familiar with thegeneral architecture and the most important components of modernoperating systems. You will leverage your knowledge acquired in yourprevious courses on Computer Architecture and Computer Systems tounderstand (and to some level implement)aspects of operating systems, such as memory management, persistentstorage and file systems, threading, scheduling, and resourcemanagement in general. You will understand fundamental approaches tovirtualization and what it takes to build a distributed file system.We will discuss general aspects, realization approaches, and casestudies in class. In addition, we will implement a simpleoperating system that will be able to boot and run on a bare PC.

This page describes how to generate binaries from the portable Csources. These binaries should run with little or no trouble on mostmodern architectures and operating systems. It will probably requiretweaking for systems that haven't been tested.

When built this way, the system runs slower than when it is builtusing the native-code compiler. For this reason, you will usuallywant to use native-code binaries when running on a supportedarchitecture. However, on 32-bit architectures, the portable-codebinaries can address larger amounts of virtual memory than thenative-code binaries, so it is reasonable (and supported) to use bothkinds on the same machine.

The history of Unix begins at AT&T Bell Labs in the late 1960s with a small team of programmers looking to write a multi-tasking, multi-user operating system for the PDP-7. Two of the most notable members of this team at the Bell Labs research facility were Ken Thompson and Dennis Ritchie. While many of Unix's concepts were derivative of its predecessor (Multics), the Unix team's decision early in the 1970s to rewrite this small operating system in the C language is what separated Unix from all others. At the time, operating systems were rarely, if ever, portable. Instead, by nature of their design and low-level source language, operating systems were tightly linked to the hardware platform for which they had been authored. By refactoring Unix on the C programming language, Unix could now be ported to many hardware architectures.

Around this time AT&T and Sun released System V Release 4 (SVR4), which was adopted by many commercial vendors. Separately, the BSD family of operating systems had grown over the years, leading to some open source variations that were released under the now-familiar BSD license. This included FreeBSD, OpenBSD, and NetBSD, each with a slightly different target market in the Unix server industry. These Unix variants continue to have some usage today, although many have seen their server market share dwindle into the single digits (or lower). BSD may have the largest install base of any modern Unix system today. Also, every Apple Mac hardware unit shipped in recent history can be claimed by BSD, as its OS X (now macOS) operating system is a BSD-derivative.

From a user experience perspective, not very much is different! Much of the attraction of Linux was the operating system's availability across many hardware architectures (including the modern PC) and ability to use tools familiar to Unix system administrators and users.

"BSD may have the largest install base of any modern Unix system today. Also, every Apple Mac hardware unit shipped in recent history can be claimed by BSD, as its OS X (now macOS) operating system is a BSD-derivative."
----

In this article, we provide a holistic view of the Portable Operating System Interface (POSIX) abstractions by a systematic review of their historical evolution. We discuss some of the key factors that drove the evolution and identify the pitfalls that make them infeasible when building modern applications.

In POSIX, threads emerged in the early 1990s from the need to support parallelism of multicore hardware and enable application-level concurrency [8], [27]. Unlike processes, threads run in the same address space. POSIX threads can be implemented in different ways; 1-on-1: Every thread runs in their own kernel thread; N-on-1: All threads run in a single kernel thread; and N-on-M: N threads runs in M kernel threads [27], [28], [29]. Managing parallelism in user space is essential for high performance [27]. However, mainstream POSIX OSes settled on the 1-on-1 threading model, citing simplicity of implementation [30], [31]. Regardless, application architectures that use a large number of threads, such as the staged event-driven architecture (SEDA) [32], are inefficient because of thread overheads [33]. Many high-performance applications are therefore adopting a thread-per-core model where the number of threads equals the number of processing cores, and providing their own interfaces for concurrency [34], [35].

aa06259810
Reply all
Reply to author
Forward
0 new messages