操作系统概述

简单批处理系统

Simple Batch Systems

  • Monitors(监督程序):Software that controls the running programs
    • Resident monitor is in main memory and available for execution
  • Batch jobs together
  • Program branches back to monitor when finished
  • Processor must wait for I/O instruction to complete before proceeding
  • Be inefficient

多道程序设计

一个支持多道程序设计的系统允许多道程序同时准备运行,当正在运行那道程序由于某种原因(比如等待输入或输出数据),暂时不能运行时,系统将自动地启动另一道程序进行运行,一旦原因消除(比如数据已经到达或已经传输完毕),暂时运行的那道程序在将来的某个时间还是可以被系统重新调用运行。

多道程序带来的问题

  • Improper synchronization(同步)
    • ensure a process waiting for an I/O device receives the singnal
    • 保证等待IO设备的进程可以收到信号
  • Failed mutual exclusion (互斥)
  • Nondeterminate program operation
    • program should only depend on input to it
  • Deadlocks (死锁)

分时系统

Time sharing

按时间分配,分配一个时间片,适用于交互式系统

带来的问题:中断频繁,导致时间开销大

  • Using multiprogramming to handle multiple interactive jobs
  • Processor’s time is shared among multiple users
  • Multiple users simultanceously(同时) access the system throught terminals

Batch Multiprogramming vs Time sharing

多道批处理系统与分时系统比较

Batch Mutiprogramming Time sharing
Principal objective Maximize processor use Minimize response time
Source of directive to operating system Job control language commands provided width the job Commands entered at the termianls

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!