1 / 44

CE01000-3 Operating Systems

CE01000-3 Operating Systems. Lecture 6 Overview of Unix/Linux operating systems. Overview of Unix/Linux OS. In this lecture we shall give an overview of 1. History and development of Unix/Linux operating systems – early versions; BSD; Linux 2. Design/philosophy of approach of Unix/Linux

Download Presentation

CE01000-3 Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CE01000-3 Operating Systems Lecture 6 Overview of Unix/Linux operating systems

  2. Overview of Unix/Linux OS • In this lecture we shall give an overview of 1. History and development of Unix/Linux operating systems – early versions; BSD; Linux 2. Design/philosophy of approach of Unix/Linux 3. Overall design/structure of Unix/Linux

  3. History of different versions of Unix

  4. Unix early History • First developed in 1969 by Ken Thompson and Dennis Ritchie of the Research Group at Bell Laboratories (AT&T); incorporated features of other operating systems, especially MULTICS. • Originally written for a small mini-computer – PDP 7 (only 8K of main memory) • Small elegant operating system

  5. Unix and C • Most of Unix version 4 (1973) was re-written in C from previous version, written entirely in assembly language. • The C language was originally developed in order to provide a high level language implementation of the Unix system by Dennis Ritchie • C evolved from 'B', developed by Ken Thompson.

  6. Early Advantages of Unix • Written in a high-level language • Distributed in source form • Provided powerful operating-system primitives that provided multi-user OS that would run on small mini-computers - inexpensive platforms • Small size, modular, clean design

  7. Educational involvement in development Initially AT&T was unable to market Unix as a product, so source code was made available to universities for use in research and education. A development group at the University of California at Berkeley were important in the development of Unix and produced a number of influential versions Known as Berkeley Software Distributions (BSD).

  8. BSD Unix 2 BSD : introduced text editor vi 3 BSD : demand-paged virtual memory 4.0BSD : major performance improvements – funded by DARPA to develop standard Unix system for US government use 4.1BSD : job control, autoconfiguration

  9. BSD Unix (Cont.) 4.2/4.3BSD : developed for VAX architecture (important mini-computer architecture) - reliable signals, fast file system, improved networking (TCP/IP implementation), sophisticated IPC primitives 4.4 BSD : stackable and extensible vnode interface, network file system, log-structured file system, other file systems, POSIX support and other enhancements.

  10. Commercialisation • Interactive Systems first commercial (1977) • Microsoft and SCO collaborated to port Unix to the Intel 8086 architecture: XENIX – ultimately unsuccessful as 8086 not powerful enough at the time to properly support multi-user OS • 1982 Bill Joy left Berkeley and founded Sun Microsystems. • SunOS originally based on BSD 4.2 • SunOS 5 became Solaris OS

  11. Commercialisation (Cont.) • In 1982 AT&T broken up and able to market Unix. Released System III in 1982 and System V the following year. • System V UNIX introduced virtual memory (different implementation from BSD), IPC (shared memory, semaphores, message queues), remote file sharing, shared libraries and Streams.

  12. Commercialisation (Cont.) • AIX from IBM • HP/UX from Hewlett Packard Corporation • ULTRIX from Digital Equipment Corporation, followed by DEC OSF/1. DEC purchased by Compaq.

  13. Standard’s problem • Problem: Incompatible implementations of APIs and core service components across the different Unix variants. Software written for one version of Unix would not necessarily run on other versions. • Solution: Standard set of interfaces. Several standards exist that define the system call interface, shell and system utilities functions - both syntax and semantics (how it operates).

  14. Standard’s problem (Cont.) • IEEE POSIX (Portable Operating System Interface for Unix computing environments or portable OS for UNIX) specifications. • System V Interface Definition (SVID) from AT&T • X/Open Portability Guide (XPG) from the X/Open Consortium

  15. Linux origins • Linux is a modem, free operating system based on Unix standards. • First developed as a small but self-contained kernel in 1991 by Linus Torvalds, with the major design goal of Unix compatibility. • Its history has been one of collaboration by many users from all around the world.

  16. Linux origins (Cont.) • It has been designed to run efficiently and reliably on common PC hardware, but now also runs on a variety of other platforms. • The core Linux operating-system kernel is entirely original, but it can run most existing free Unix software, resulting in an entire Unix-compatible operating system free from proprietary code.

  17. The Linux Kernel • Version 0.01 (May 1991) had no networking, ran only on 80386-compatible Intel processors and on PC hardware, had extremely limited device-drive support, and supported only the Minix file system. • Minix was a very simple version of a Unix like OS that was developed for teaching purposes

  18. Linux Kernel (Cont.) • Linux 1.0 (March 1994) included new features: • Support for Unix’s standard TCP/IP networking protocols • BSD-compatible socket interface for networking programming • Device-driver support for running IP over an Ethernet • Enhanced file system • Support for a range of SCSI controllers for high-performance disk access • Extra hardware support

  19. Linux 2.0 • 2.0 added new capabilities: • Support for multiprocessor architectures • Improved memory-management code • Improved TCP/IP performance • Support for internal kernel threads, for handling dependencies between loadable modules, and for automatic loading of modules on demand. • Standardized configuration interface • Available for Motorola 68000-series processors, Sun Sparc systems, and for PC and PowerMac systems.

  20. Unix Design Principles • Designed to be a time-sharing system • Multiuser/multitasking • Has a simple standard user interface (shell) that can be replaced • Toolbox approach • Combine multiple simple commands instead of using a single complex application • Designed by programmers for programmers

  21. Unix Design Principles (Cont.) • File system with multilevel tree-structured directories • Files are supported by the kernel as unstructured sequences of bytes • Supports multiple processes; a process can easily create new processes • High priority given to making system interactive, and providing facilities for program development

  22. Linux Design Principles • Linux should be multi-user and multitasking with a full set of Unix-compatible tools. • Its file system should adhere to traditional Unix semantics, and fully implement the standard Unix networking model. • Main goals are speed, efficiency, and standardisation. • Linux is designed to be compliant with the relevant POSIX standards

  23. Unix/Linux structure • Essentially 2 layers – above and below kernel interface • Above kernel interface (runs in user mode): • Shells • System libraries • System programs and utilities • Below kernel interface (in supervisory mode): • System call interface • Kernel itself – management of processes/threads, memory, I/O, file system, device drivers

  24. Typical Unix Structure (4.4BSD)

  25. Linux System structure

  26. Unix/Linux Components • Unix/Linux have essentially similar set of components. • The kernel - everything below the system-call interface and above the physical hardware. • Provides file system, CPU scheduling, memory management, and other OS functions through system calls.

  27. Unix/Linux Components (Cont.) • Kernel code executes in system mode with full access to all the physical resources of the computer. • All kernel code and data structures are kept in the same single address space. • This means every part of OS code/data structures is accessible from any other part of kernel

  28. Unix/Linux Components (Cont.) • The system libraries define a standard set of functions through which applications interact with the kernel, and which implement much of the operating-system functionality that does not need the full privileges of kernel code. • The system programs use the kernel-supported system calls to provide useful functions, such as compilation and file manipulation.

  29. Linux kernel modules A feature introduced by Linux allows for the dynamic (at run-time) installation and removal of kernel components. A kernel module is a section of kernel code that can be compiled, loaded, and unloaded independently of the rest of the kernel. A kernel module may typically implement a device driver, a file system, or a networking protocol.

  30. Linux kernel modules (Cont.) Without kernel modules any change to kernel code would require complete re-compilation of kernel. The kernel module interface allows third parties to write and distribute, on their own terms, device drivers or file systems that could not be distributed free (under GPL which we will cover this in a later slide).

  31. Linux kernel modules (Cont.) • Kernel modules allow a Linux system to be set up with a standard, minimal kernel, without any extra device drivers built in. Linux can then allow additional modules to be loaded and integrated with the base system - tailored to underlying hardware and needs of system

  32. System call interface • System calls define the programmer interface to Unix • The programmer and user interface define the context that the kernel must support. • Roughly three categories of system calls in Unix. • File manipulation (same system calls also support device manipulation) • Process control • Information manipulation.

  33. File Manipulation • A file is a sequence of bytes; the kernel does not impose a structure on files. • In Unix almost everything is represented by a file • Files are organized in tree-structured directories. • Directories are files that contain information on how to find other files.

  34. File Manipulation (Cont.) • Path name: identifies a file by specifying a path through the directory structure to the file. • Absolute path names start at root of file system • Relative path names start at the current directory • System calls for basic file manipulation: create, open, read, write, close, unlink, trunc.

  35. Typical Unix/Linux type directory structure / bin etc lib usr dev tmp home sh ls cat libc.so ttya null passwd group bin man local kwalsh egs msiegen cs316 mail bin stuff

  36. Shells and Commands • Shell – the user process which executes programs (it is a command interpreter) • Called a shell, because it surrounds the kernel • The shell indicates its readiness to accept another command by outputting a prompt and the user types a command on a single line • Examples • Bourne shell (bash) • C Shell (csh)

  37. Shells and Commands (Cont.) • A typical command is an executable binary object file • The shell looks through the search path to find the command executable file, which is then loaded and executed • The directories /bin and /usr/bin are almost always in the search path • The shell usually suspends its own execution until the command completes.

  38. Shells and Commands (Cont.) • Programmers and users mainly deal with already existing systems programs: the needed system calls are embedded within the program and do not need to be obvious to the user. • The most common systems programs are file or directory oriented e.g. mkdir, rmdir, cd, pwd, ls, cp, mv, rm • X Windows system provides basis for development of GUI interfaces

  39. Linux system specific • Linux uses many tools developed as part of Berkeley’s BSD operating system, MIT’s X Window System, and the Free Software Foundation’s GNU project. • The main system libraries were started by the GNU project, with improvements provided by the Linux community.

  40. Linux system specific (Cont.) • Linux networking-administration tools were derived from 4.3BSD code; recent BSD derivatives such as FreeBSD have borrowed code from Linux in return. • The Linux system is maintained by a loose network of developers.

  41. Linux Distributions • Standard, precompiled sets of packages, or distributions, include the Linux system kernel, system installation and management utilities, and ready-to-install packages of common Unix tools. • The first distributions managed these packages by simply providing a means of unpacking all the files into the appropriate places; modern distributions include advanced package management and automated installation.

  42. Linux Distributions (Cont.) • Many distributions now available • Early distributions included Slackware. • Red Hat is common distributions from a commercial source. • Ubuntu • Debian • Suse • Many others

  43. Linux licensing • The Linux kernel is distributed under the GNU General Public License (GPL), the terms of which are set out by the Free Software Foundation. • Anyone using Linux, or creating their own derivate of Linux, may not make the derived product proprietary; software released under the GPL may not be redistributed as a binary-only product.

  44. References Operating System Concepts. Chapter 21 & Appendix A.

More Related