Operating Systems Overview - PowerPoint PPT Presentation

1 / 63
About This Presentation
Title:

Operating Systems Overview

Description:

Operating Systems Overview 1) 2) 3) ... – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 64
Provided by: Mario205
Category:

less

Transcript and Presenter's Notes

Title: Operating Systems Overview


1
Lecture 2
  • Operating Systems Overview

2
?? ??
  • ????? ??
  • ????? ?? ??
  • 1) ?? ?? ???
  • 2) ?? ???? ???
  • 3) ?? ???? ???? ???
  • 4) ??? ???
  • ?? ????? ??
  • ??? ??
  • ????? ??

3
Operating System
  • ?? ????? ??? ???? ????
  • OS? ???? ??? ??? ?? ????? ??? ??? ????
  • OS? ??? ?? ???? ??? ???? ?? ??? ????
  • ???? ???? ??? ?????
  • ?? ????? ???? ??? ?? ????? ??? ?? ??? ???
    (Masking)
  • ? ????? ???, ??? ?? ?
  • OS? ????? ???? ??? ????? ??

4
  • ??? ???? ??? ??

5
OS Services(1)
  • ???? ?? ?? ??
  • editors, compilers, linkers, and debuggers
  • ???? ??
  • loading in memory, I/O and file initialization
  • I/O ? ??? ?? ??
  • ?? ??? ?? ??? ? ?? ???
  • ??? ??
  • ??? ?? ? ???? ?? ?? ??
  • ??? ?? ?? ?? ??

6
OS Services(2)
  • ?? ??
  • ?? ? ?? ???? ??
  • memory error
  • device failure
  • ????? ??
  • arithmetic overflow
  • access forbidden memory locations
  • ???? ??
  • ?? ??
  • ??? ?? ???
  • ?????? ???
  • ?? ???? ??

7
OS Services(3)
  • ?? ??
  • ??? ?? ??? ?? ?? ??
  • ??? ?? ???? (eg response time)
  • ??? ?? ?? ??
  • ?? ?? ?? (on multiuser systems)

8
????? ??
  • OS? ????? ???? ? ??? ??? ????? ??? ????? ??
  • Character vs graphic terminals
  • paging hardware ?
  • OS? ??? ???? ????? ??
  • ? internet support ?
  • OS? ?? ? ?? ??? ?? ??? ???
  • modular construction with clean interfaces
  • object oriented methodology

9
????? ?? ??
  • ?? ?? ???(Serial Processing)
  • ?? ???? ???(Simple Batch Processing)
  • ?? ???? ?? ?? ??? (Multiprogrammed Batch
    Processing)
  • ??? ???(Time-Sharing Systems)
  • Modern Operating Systems
  • ?? ???(Parallel Systems) SMP
  • ?? ???(Distributed Systems)
  • ??? ???(Real-Time Systems)
  • ??? ???(Embedded Systems)

10
?? ?? ???(Serial Processing)
  • ?? ??? ??? ??? ??
  • (late 1940smid 1950s)
  • ?????? ?? ??? ????? ??
  • ????? ??
  • ?? ???
  • Scheduling ????? job scheduling
  • Setup time ??? job? ???? ?? setup time? ??? ??

11
?? ?? ?? ??? (1)
  • ??? ?? ?? (mid-1950s)
  • ?? ??
  • ???? ?? ??? ??? ??(job)? ??? ???? ????
  • ??? ???? ??? ??? ??? ?? ????(batch)? ???? ????
  • ???(Monitor) ????? ????? ? ??? ???? ????
  • ?? ???(Resident monitor)? ?? ???? ?? ?????? ????
  • ??? ????? ??? ?? ?????? ????(loading)

12
?? ?? ?? ??? (2)
  • Early batch system
  • bring cards to 1401
  • read cards to tape
  • put tape on 7094 which does computing
  • put tape on 1401 which prints output

13
(No Transcript)
14
???(Monitor)
  • ???? ????(?????)?? ? ??(??? ????)? ??? ?? ??
    ?????? ????(loading)
  • ??? ???? ?? ??? ???? ??? ????
  • ??? ????? ?? ?? ?? ????
  • end-of-program ???
  • ?? ??
  • ??? ??? ????? ???? ?? ???? ????.

15
Job Control Language (JCL) (1)
  • ????? ?? ??? ??? ??? ?? ?? ??
  • what compiler to use
  • what data to use
  • ?? ??? ? -----------------gtgt
  • FTN ? ????? ?? ?? ???? ??? ?? ??? ??
  • LOAD? ??? ?? ??? ?????? ???(loading)
  • RUN ? ??? ????? ????

JOB FTN ... FORTRAN program ... LOAD RUN ...
Data ... END
16
Job Control Language (JCL) (2)
  • Structure of a typical FMS job 2nd generation

17
?? ?? ????
  • CPU ? ?? ??? ??? ????? ??
  • ??? ????? ???? ???? ??? CPU? ??? ??? ??? ??? idle
    ??? ???
  • ??? ????? ??? ????? ??? ????
  • ????? ?? ?? ????? ???? ?? ???? ???? ???? ??? ???
    ??

18
???? ?? ??(1)
  • ??? ??
  • ??? ????? ??? ??? ???? ??? ? ??? ??? ?? ?? ??
  • ???
  • ??? ??? ???? ???? ?? ???
  • ??? ??? ??? ????? ????

19
???? ?? ??(2)
  • ?? ???
  • ??? CPU ??? ?? ??
  • ??? ??
  • ??? ??(?? ?????(Supervisor) ??)
  • ???? ???? ???? ???
  • ??? ????? ???? ???? ??
  • ????
  • ??? ????? ??? ??? ??? ??? ????? ? ? ??? ??

20
?? ???? ???? ???(1)
  • I/O ??? ????? ?? ???? ??? ??? ???
  • I/O ???? ?? ????? ???? ??? ???? ????? ????
  • ??? ?????? ??? ????? ?? ??(uniprogramming)?? CPU?
    ???? ????

21
?? ???? ???? ???(2)
  • ?? ?????? ?? ?? ????? ?? ??, ??? ????? ??? ???
    ???? ?? CPU ? ?? ????? ??? ? ??.
  • multitasking (multiprogramming)

22
?? ???? ???? ???(3)
23
?? ? ?? ????? ?? (1)
  • ??

24
?? ? ?? ????? ?? (2)
25
?? ? ?? ????? ?? (3)
26
?? ????? ?? ??
  • Hardware support
  • I/O interrupts and (possibly) DMA
  • Memory management
  • Memory protection (data and programs)
  • Software support from the OS
  • Scheduling (which program is to be run next)
  • To manage resource contention

27
??? ???(Time Sharing Systems)(1)
  • ?? ???? ???? ???? ???? ??? ??? ???? ???
  • ? ?? ?? ??(Job Turnaround Time)
  • ???? ?? ??? ??? ??? ????? ?? 2? ???? ?? ??????
    ????
  • ??? ??? ?? 30?? ???? ???? ??? ? ??

28
??? ???(Time Sharing Systems)(2)
  • ??? ???? ??? ??? ??? ???? ??? ?? ????? ??? ???
    ?????
  • ??? ????? ???? ??? ????? ??
  • Time Slice ??? ??? ????? ???? ??
  • ?? ?? ??(Respone Time)
  • ??? ???? ????? ??? ???? ??? ? ??(??? ?? ??)
  • ?? ??? ?? ????? ??

29
??? ???(Time Sharing Systems)(3)
?
30
Modern Operating Systems? ??(1)
  • ??? ????? ??? ????? ?? ?? ??
  • ??? ????? ??
  • multiprocessor machines
  • high-speed networks
  • faster processors and larger memory
  • ??? ????? ???
  • multimedia applications
  • Internet and Web access
  • Client/Server applications

31
Modern Operating Systems? ??(2)
  • Microkernel Architecture
  • Multithreading
  • Symmetric Multiprocessing
  • Distributed Systems
  • Embedded Systems
  • Object-Oriented Design

32
Microkernel architecture
  • ???? ?? ???? ???? ??
  • primitive memory management (address space)
  • Interprocess communication (IPC)
  • basic scheduling
  • ?? OS ???? ??? ?? ????(servers) ?? ??
  • device drivers, file system, virtual memory
  • More flexibility, extensibility, portability
  • ?? ????? microkernel ??? ???? ?? ??(? Window-NT
    ?)

33
Multithreading
  • ??? ????? ??? ?? ??? thread ?? ????
  • ????? ??? ??? ?? task? ????? ?? ????? ?? ????
  • ?? ???? ??? ???? ?
  • ??? ????? ???? thread? ??? ???? ??? ????

34
Symmetric Multiprocessing (SMP)
  • ??? ????? ?? ???
  • ? ????? ??? ??? ??? ?????? I/O ???
    ????(symmetric)
  • ????? ????/???? ?????? ??????(real parallelism)
  • Incremental growth
  • just add another CPU!
  • Robustness
  • a single CPU failure does not halt the system,
    only the performance is reduced

35
Example of parallel execution on SMP
36
Distributed Systems
  • ??? ????? ?? ???? ?? ???? ?? ?? ??? ??? ???
  • Loosely-coupled multiprocessor systems
  • Clustered Systems
  • ?? ????? ??
  • ?? ?? ??????? ?
  • ???? ?? ????(load balancing) ?
  • ???(reliability) HA(High Availability) ?

37
Embedded Systems
  • ??, ?? ?? ?? ??? ?? ?? ??? ???? ?? ??? ???
  • PDA, ?????, ???? ?? ??? ???? ??? ???? ???
  • ??? ??? ??
  • ??, ??? ? ?? ??? ?? ??? ??
  • ???? ???? ??
  • RTOS(Real-time Operating System)- pSos etc
  • Window-CD, Embedded Window-XP
  • Embedded Linux

38
Object-Oriented Design
  • ?? ??? ???? ???? ?? ??
  • ?? ?? ?? ??? ?? ??? ?? ?? ??? ????? ??? ? ??? ??
  • ?????? ???? ???? ??? ???? ??? ??? ?? ????? ??? ?
    ??
  • ?? ?? ? ??? ??? ??????? ??? ???? ??

39
??? ?? (1)
  • ??? ??(System Calls)
  • ??? ????? ???? ?? ?????
  • ?? ????? ??? ?? ??
  • ????? ????? ?? ??
  • ??? ?? ?? ? ?? ?? ????
  • ?? ?? ?? ? ?? ?? ??? ?? ???
  • ?? ?? ?? / ?? ?? ??
  • ?? ?? / ?? ??
  • ?? ??
  • ??? ??
  • ???? ??

40
??? ?? (2)
??? ????
??? ??
????
????? ??
41
??? ?? ?? ??
  • There are 11 steps in making the system call read
    (fd, buffer, nbytes)

42
??? ?? ?? (1)
  • ???? ??(Process Control)
  • ???? ?? ? ??
  • ???? ?? ? ??
  • ???? ?? ?? ? ?? ?

43
??? ?? ?? (2)
  • A stripped simple shell
  • while (TRUE) / repeat forever /
  • type_prompt( ) / display prompt /
  • read_command (command, parameters) / input
    from terminal /
  • if (fork() ! 0) / fork off child
    process /
  • / Parent code /
  • waitpid( -1, status, 0) / wait for
    child to exit /
  • else
  • / Child code /
  • execve (command, parameters, 0) /
    execute command /

44
??? ?? ?? (3)
  • ?? ??(File Management)
  • ?? ?? ? ??
  • ?? ?? ? ??
  • ?? ?? ? ??
  • ?? ?? ?? ? ??

45
??? ?? ?? (4)
  • ???? ??(Directory Management)
  • ???? ?? ? ??
  • ???? ??
  • ????? Mounting

46
??? ?? ?? (5)
  • ?? ??? ??
  • ?? ??(Device Management)
  • ?? ?? ? ??
  • ??, ??, ???
  • ?? ?? ?? ? ??
  • ?? ?? ??(Information Maintenance)
  • ??, ?? ?? ??
  • ??? ?? ?? ?
  • ??(Communication)
  • ?? ?? ?? ? ??
  • ?? ??? ?

47
??? ?? ?? (6)
48
??? ?? ?? (7)
  • Some Win32 API calls

49
???? ??(1)
  • ??? ????
  • ??? ??? ????
  • ???? ??? ?? ?? ??
  • ??? ?? ?? ??
  • ?? ?? ?? ??
  • ??? ??? ?? ??? ????? ??
  • ? ????, ??? ???, ???, ??? ?

50
???? ??(2)
51
UNIX OS ??
52
Modern UNIX Kernel
53
Modern UNIX Systems
  • System V Release 4 (SVR4)
  • Solaris 9
  • 4.4BSD
  • Linux

54
Windows Architecture
  • Modular structure for flexibility
  • Executes on a variety of hardware platforms
  • Supports application written for other operating
    system

55
(No Transcript)
56
Operating System Organization
  • Modified microkernel architecture
  • Not a pure microkernel
  • Many system functions outside of the microkernel
    run in kernel mode
  • Any module can be removed, upgraded, or replaced
    without rewriting the entire system

57
Kernel-Mode Components
  • Executive
  • Contains base operating system services
  • Memory management
  • Process and thread management
  • Security
  • I/O
  • Interprocess communication
  • Kernel
  • Consists of the most used components

58
Kernel-Mode Components
  • Hardware abstraction layer (HAL)
  • Isolates the operating system from
    platform-specific hardware differences
  • Device drivers
  • Translate user I/O function calls into specific
    hardware device I/O requests
  • Windowing and graphics systems
  • Implements the graphical user interface (GUI)

59
Windows Executive
  • I/O manager
  • Cache manager
  • Object manager
  • Plug and play manager
  • Power manager
  • Security reference monitor
  • Virtual memory manager
  • Process/thread manager
  • Configuration manager
  • Local procedure call (LPC) facility

60
User-Mode Processes
  • Special system support processes
  • Ex logon process and the session manager
  • Service processes
  • Environment subsystems
  • User applications

61
Client/Server Model
  • Simplifies the Executive
  • Possible to construct a variety of APIs
  • Improves reliability
  • Each service runs on a separate process with its
    own partition of memory
  • Clients cannot not directly access hardware
  • Provides a uniform means for applications to
    communicate via LPC
  • Provides base for distributed computing

62
Threads and SMP
  • Operating system routines can run on any
    available processor
  • Different routines can execute simultaneously on
    different processors
  • Multiple threads of execution within a single
    process may execute on different processors
    simultaneously
  • Server processes may use multiple threads
  • Share data and resources between process

63
Windows Objects
  • Encapsulation
  • Object consists of one or more data items and one
    or more procedures
  • Object class or instance
  • Create specified instances of an object
  • Inheritance
  • Support to some extent in the Executive
  • Polymorphism
Write a Comment
User Comments (0)
About PowerShow.com