1. Trang chủ
  2. » Giáo án - Bài giảng

Appendix a Unixbsd

64 737 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Appendix A: UnixBSD Appendix A: UnixBSD A.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 Module A: The FreeBSD System Module A: The FreeBSD System ■ UNIX History ■ Design Principles ■ Programmer Interface ■ User Interface ■ Process Management ■ Memory Management ■ File System ■ I/O System ■ Interprocess Communication A.3 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 UNIX History UNIX History ■ First developed in 1969 by Ken Thompson and Dennis Ritchie of the Research Group at Bell Laboratories; incorporated features of other operating systems, especially MULTICS ■ The third version was written in C, which was developed at Bell Labs specifically to support UNIX ■ The most influential of the non-Bell Labs and non-AT&T UNIX development groups — University of California at Berkeley (Berkeley Software Distributions - BSD) ● 4BSD UNIX resulted from DARPA funding to develop a standard UNIX system for government use ● Developed for the VAX, 4.3BSD is one of the most influential versions, and has been ported to many other platforms ■ Several standardization projects seek to consolidate the variant flavors of UNIX leading to one programming interface to UNIX A.4 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 History of UNIX Versions History of UNIX Versions A.5 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 Early Advantages of UNIX Early Advantages of UNIX ■ Written in a high-level language ■ Distributed in source form ■ Provided powerful operating-system primitives on an inexpensive platform ■ Small size, modular, clean design A.6 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 UNIX Design Principles UNIX Design Principles ■ Designed to be a time-sharing system ■ Has a simple standard user interface (shell) that can be replaced ■ 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 A.7 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 Programmer Interface Programmer Interface ■ 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 ■ Systems programs: use the kernel-supported system calls to provide useful functions, such as compilation and file manipulation Like most computer systems, UNIX consists of two separable parts: A.8 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 4.4BSD Layer Structure 4.4BSD Layer Structure A.9 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 System Calls System Calls ■ System calls define the programmer interface to UNIX ■ The set of systems programs commonly available defines the user interface ■ 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 A.10 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 File Manipulation File Manipulation ■ A file is a sequence of bytes; the kernel does not impose a structure on files ■ Files are organized in tree-structured directories ■ Directories are files that contain information on how to find other files ■ 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 [...]... standard input – program can read what the user types q standard output – program can send output to user’s screen q standard error – error output s Most programs can also accept a file (rather than a terminal) for standard input and standard output s The common shells have a simple syntax for changing what files are open for the standard I/O streams of a process — I/O redirection Operating System Concepts... another command by typing a prompt, and the user types a command on a single line s A typical command is an executable binary object file s The shell travels through the search path to find the command file, which is then loaded and executed s The directories /bin and /usr/bin are almost always in the search path Operating System Concepts – 7th Edition, Feb 11, 2005 A. 22 Silberschatz, Galvin and Gagne ©2005... 2005 A. 24 Silberschatz, Galvin and Gagne ©2005 Standard I/O Redirection Operating System Concepts – 7th Edition, Feb 11, 2005 A. 25 Silberschatz, Galvin and Gagne ©2005 Pipelines, Filters, and Shell Scripts s Can coalesce individual commands via a vertical bar that tells the shell to pass the previous command’s output as input to the following command % ls | pr | lpr s Filter – a command such as pr that... factors as time idle, time in or out of main memory, size, etc Operating System Concepts – 7th Edition, Feb 11, 2005 A. 35 Silberschatz, Galvin and Gagne ©2005 Paging s Berkeley UNIX systems depend primarily on paging for memory- contention management, and depend only secondarily on swapping s Demand paging – When a process needs a page and the page is not there, a page fault tot he kernel occurs, a frame... with a new program q exit terminates a process q A parent may wait for a child process to terminate; wait provides the process id of a terminated child so that the parent can tell which child terminated q wait3 allows the parent to collect performance statistics about the child s A zombie process results when the parent of a defunct child process exits before the terminated child Operating System Concepts... stop a command before that command completes (usually produced by ^C) s Signal use has expanded beyond dealing with exceptional events q Start and stop subprocesses on demand q SIGWINCH informs a process that the window in which output is being displayed has changed size q Deliver urgent data from network connections Operating System Concepts – 7th Edition, Feb 11, 2005 A. 16 Silberschatz, Galvin and Gagne... which they are executing: gethostname Operating System Concepts – 7th Edition, Feb 11, 2005 A. 19 Silberschatz, Galvin and Gagne ©2005 Library Routines s The system-call interface to UNIX is supported and augmented by a large collection of library routines s Header files provide the definition of complex data structures used in system calls s Additional library support is provided for mathematical functions,... of the file, and leaves the real user identifier as it was s setuid scheme allows certain processes to have more than ordinary privileges while still being executable by ordinary users Operating System Concepts – 7th Edition, Feb 11, 2005 A. 15 Silberschatz, Galvin and Gagne ©2005 Signals s Facility for handling exceptional conditions similar to software interrupts s The interrupt signal, SIGINT, is... that passes its standard input to its standard output, performing some processing on it s Writing a new shell with a different syntax and semantics would change the user view, but not change the kernel or programmer interface s X Window System is a widely accepted iconic interface for UNIX Operating System Concepts – 7th Edition, Feb 11, 2005 A. 26 Silberschatz, Galvin and Gagne ©2005 Process Management... structure; rather the text and data of the process are replaced Operating System Concepts – 7th Edition, Feb 11, 2005 A. 32 Silberschatz, Galvin and Gagne ©2005 CPU Scheduling s Every process has a scheduling priority associated with it; larger numbers indicate lower priority s Negative feedback in CPU scheduling makes it difficult for a single process to take all the CPU time s Process aging is employed . platforms ■ Several standardization projects seek to consolidate the variant flavors of UNIX leading to one programming interface to UNIX A. 4 Silberschatz, Galvin and Gagne ©2005 Operating System. Versions A. 5 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 11, 2005 Early Advantages of UNIX Early Advantages of UNIX ■ Written in a high-level language ■ Distributed. memory space with a new program ● exit terminates a process ● A parent may wait for a child process to terminate; wait provides the process id of a terminated child so that the parent can tell

Ngày đăng: 13/05/2014, 00:36

Xem thêm: Appendix a Unixbsd

Mục lục

    Module A: The FreeBSD System

    History of UNIX Versions

    Early Advantages of UNIX

    Typical UNIX Directory Structure

    Illustration of Process Control Calls

    Standard I/O Redirection

    Pipelines, Filters, and Shell Scripts

    Finding parts of a process using process structure

    Allocating a New Process Structure

    Mapping of a File Descriptor to an Inode

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN