這是我自己讀OPERATING SYSTEM CONCEPTS (6th Edition)的筆記,本來讀的進度很緩慢,直到有一天在網路上看到冼鏡光老師分享上課的slide(OS第7版),唸起OS就愈來有趣啦。
    筆記的章節是依OS第6版整理的,圖片則都是從冼鏡光老師的slide貼上來的,感謝冼老師無私的分享,讓我有機會一窺OS的奧妙。
   
(如有著作權相關問題,請惠予通知)


1.     Introduction

1.1 What Is an Operating System
  • A computer system can be roughly divided into the hardware, the operating system, the application programs, and the users.
  • The hardware (i.e., CPU, memory, I/O devices) provides the basic computing resources.
  • The application programs (e.g., web browsers, word processors, and compilers) are used to solve user problems.
  • The operating system controls and coordinates the use of hardware among various application programs.
        1.1.1  User View
    • PC Users: an operating system is a program that provides an easy-to-use interface for using the hardware.
    • Mainframe/Minicomputer Users: an operating system is a program that helps maximize the system resource utilization.
    • Workstation Users: an operating system is a program designed to compromise between individual usability and resource utilization.
        1.1.2 System View
    • A Resource Manager: the operating system allocates and reclaims the system hardware resources to and from user programs.
    • A Control Program: the operating system controls the execution of user programs to prevent errors and improper use of the computer.
    • There is no universal definition of what is an operating system. A common definition is that the operating system is the one program running at all times on the computer (i.e., the kernel). All other programs are application programs.
        1.1.3 System Goals
         

  • Primary Goal: efficient operation of the computer system.
  • In some systems, it is easy of use.
  • In general, efficiency is far more important than easy of use.

1.2    Mainframe Systems (Batch, Multiprogrammed, Time-Sharing)

        1.2.1  Batch Systems
                     
    • Batch systems allowed automatic job sequencing by a resident operating system.
        1.2.2  Multiprogrammed Systems
                     
    • Job pool(jobs) -> Job scheduling -> Memory(jobs) -> CPU scheduling -> CPU
    • Multiprogramming is the first instance where the operating system must make decisions for the users (So there's a CPU scheduler).
    • The objective of multiprogramming is to have some processes running at all times, so as to maximize CPU utilization.
        1.2.3 Time_Sharing Systems
                     
    • Time sharing (or multitasking) is a logical extension of multiprogramming. The CPU executes multiple jobs by switching among them, but switches occur so frequently that the user can interact with each program while it is running.
    • An interactive (or hands-on) computer system provides direct communication between the user and the system.
    • A time-shared operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared computer. Each user had at least one separate program in memory.
    • A program loaded into memory and executing is commonly referred to as a process.
    • Virtual memory is a technique that allows the execution of a job that may not be completely in memory.
      • Programs can be larger than physical memory.
      • Virtual memory abstracts main memory into a large, uniform array of storage, separating logical memory as viewed by the user from physical memory.
    • The objective of time-sharing is to switch the CPU among processes so frequently that users can interact with each program while it is running.

1.3    Desktop Systems

1.4    Multiprocessor Systems

          
  • Multiprocessor systems (parallel systems, tightly coupled systems) have more than one processor in close communication, sharing the computer bus, the clock, and sometimes memory and peripheral devices.
  • The ability to continue providing service proportional to the level surviving hardware is called graceful degradation. Systems designed for graceful degradation are also called fault tolerant.
  • Symmetric multiprocessing (SMP):
    • Each processor runs an identical copy of the operating syste.
    • These copies communicate with one another as neede.
    • Each processor performs all tasks within the OS.
    • All processors are peers; no master-slave relationship exists.
  • Asymmetric multiprocessing:
    • Each processor is assigned a specific task.
    • A master processor controls the system; the other processors either look to the master for instruction or have predefined tasks.
    • Thus, this defines a master-slave relationship.
  • Advantages:
    • Increased throughput: get more jobs done.
    • Economy of scale: because of resource sharing, multiprocessor systems are cheaper than multiple single processor systems.
    • Increased reliability: the failure of one processor will not halt the whole system.

1.5    Distributed Systems

  • A distributed ystem is a collection of physically separate, possible heterogeneous computer systems that are networked to provide the users with access to the various resources that the system maintains.
  • By being able to communicate, distributed systems are able to share computational tasks, and provide a rich set of features to users.
  • Distributed systems (loosely coupled systems): each processor has its own local memory. The processors communicate with one another through various communication lines.
  • Distributed systems allow sharing of resources on geographically dispersed hosts.
  • A network operating system is an OS that
    • Provides features such as file sharing across the nework.
    • Includes a communication shceme that allows different processes running on different computers to exchange messages.
  • A  computer  in a  network operating  system acts autonomously from all other computers on the network, although it is aware of the network and is able to communicate with other computers.
  • A distributed operating system is less autonomous.
  • Different operating systems communicate closely enough to provide the illusion that only a single operating system controls the networ.
        1.5.1  Client-Server Systems
                     
    • Some systems are assigned as servers to satisfy requests generated by client systems.
    • Client-server systems are specialized distributed systems.
    • In general, there are two types of server systems
      • Compute-Server Systems: provide an interface to which clients can send requests to perform an action. Then, execute the action and send back the results.
      • File-Server Systems: provide a file system interface where clients can create, update, read and delete files.
        1.5.2  Peer-to Peer Systems

1.6    Clustered Systems

  • A clustered system has two or more individual systems connected by a local area networks or interconnection network.
  • The key of clustered system is high availability.
  • Clustered systems differ from parallel systems in that they are composed of low or more individual systems coupled together. Clustered computers share storage and are closely linked via LAN networking.
  • Clustered systems allow multiple machines to perform computations on data contained on shared storage, and let computing continue in the case of failure of some subset of cluster members.
  • Asymmetric clustering:
    • One machine is in hot-standby mode while others are running the applications.
    • The host-standby machine (i.e., does nothing but) monitors other machines and becomes active if one server fails.
  • Symmetric clustering:
    • Two or more hosts are running applications, and they are monitoring each other.
    • This is more efficient as it uses all available hardware.
1.7    Real-Time Systems
  • A real-time operating system has well-defined, fixed time constraints.
  • Processing must be done within the defined constraints, or the system will fail.
  • A real-time system is used when rigid time requirements have been placed on the operation of a processor or the flow of date.
  • Hard real-time system guarantee that critical tasks be completed on time.
  • Soft real-time systems prioritize critical tasks. That is, a critical real-time task gets priority over other tasks, and retains that priority until it completes.
  • Embedded systems almost always run real-time operating systems.
1.8    Handheld Systems
1.9    Feature Migration
1.10  Computing Environments
        1.10.1          Traditional computing
        1.10.2          Web-Based Computing
        1.10.3          Embedded Computing


arrow
arrow
    全站熱搜

    nix 發表在 痞客邦 留言(1) 人氣()