Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Library (computing) wikipedia , lookup
Security-focused operating system wikipedia , lookup
Copland (operating system) wikipedia , lookup
Process management (computing) wikipedia , lookup
Plan 9 from Bell Labs wikipedia , lookup
Burroughs MCP wikipedia , lookup
Spring (operating system) wikipedia , lookup
CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS What is an operating system? • A collection of software modules to assist programmers in enhancing system efficiency, flexibility, and robustness • An Extended Machine from the users’ viewpoint • A Resource Manager from the system’s viewpoint What are the primary functions of an operating system? • multiplexing the processor(s) • scheduling processes • coordinating interaction among processes, interprocess communication and synchronization • managing system resources (I/O, memory, data files) • enforcing access control and protection • maintaining system integrity and performing error recovery • providing an interface to the users 1 Evolution of modern operating systems 1. Centralized operating system: resource management and extended machine to support Virtuality (a) Resident Monitor (RM) - user=operator, single process (b) Batch Systems - user 6= operator, single → multiple processes (c) Timesharing Systems - interactive, multiple processes (d) Personal Computers - user=operator, single → multiple processes 2. Network operating system: resource sharing to achieve Interoperability 3. Distributed operating system: a single computer view of a multiplecomputer system for Transparency 4. Cooperative autonomous system: cooperative work with Autonomicity A spectrum of modern operating systems 1st Decreasing Degree of Hardware and Software Coupling 3rd 4th 2nd centralized operating distributed operating cooperative autonomous network operating system system system system Decreasing Degree of Transparency 2 Operating system structuring methods • modularization • vertical partitioning (layered one-in-one-out structure) • horizontal partitioning • client/server model • minimal (or micro) kernel • subsystem with API and SPI Example of OS Partitioning: Applications accounting word processing Subsystems programming environment Utilities compiler System Services file system Kernel manufacturing database system command interpreter memory manager library scheduler CPU multiplexing, interrupt handling, device drivers synchronization primitives, interprocess communication 3 API and SPI: Applications API Extensible system services SPI (or HAL) Portable Platforms Windows NT: an example of operating system structure OS / 2 client Win 32 client POSIX client OS / 2 subsystem Win 32 subsystem POSIX subsystem User Mode object manager security reference monitor process manager local virtual procedure memory call manager kernel with hardware abstraction hardware platform 4 I/O manager Executives Kernel Mode system service API Overview of centralized operating systems: Resource Manager • Process management – interprocess communication – process synchronization – process scheduling • Memory management – memory allocation and deallocation – logical to physical address mapping – virtual memory support: segmentation and paging – protection • Device management – device driver – buffering – spooling • Data management – file access – file sharing – concurrency control – data replication 5 Process management • interprocess communication • process synchronization • process scheduling Process States: Starting Halting Initialize PCB Halt/ABEND Dispatch/Context switch Ready Running TRO/Context switch Block Unblock Blocked 6 Memory management • memory allocation and deallocation • logical to physical address mapping • virtual memory support: segmentation and paging • protection Paged Memory: Logical Address Page Number Physical Address Offset Page Frame Page Table Page Frame ... ... Control Bits ... ... V D S 7 Offset Device management • device driver • buffering • spooling Device Drivers and DMA: Hardware Independent Interface Generic Driver Code Hardware Dependent Code Physical Device Interface CPU RAM System Bus DMA Device 1 ... 8 Device N Data management • file access • file sharing • concurrency control • data replication Memory Management Unit: CPU TLB MMU Cache System Bus 9 RAM Unix File System: Disk Blocks Directory i−node ... my_file.txt 0x001af38... ... File Name i−node number Owner UID Owner GID ... ... RC i−node Table drwxrwxrwx ... Direct Blk 0 1−IB 1 Direct Blk 522 Secondary IB 1−IB 2 Direct Blk 523 ... Primary IB 0 1−IB 512 10 ... Direct Blk 521 ... ... Direct Blk 1 ... ... Direct Blk 11 ... ... Direct Blk 10 Unix File Tables: Proc Ctl Blk Sys File Tbl i−node Table ... ... ... FID 11 ... rc loc mode i−node # ... PFT ptr Proc File Tbl ... ... PID Network operating system • interoperability: ability of information exchange among heterogeneous systems • supported by network communication protocols • transport service: the primary interface between operating system and computer network • characterized by common network applications (servers) – remote login – file transfer – messaging – browsing – remote execution A network file system example application processes file service network local file system file system peer communication protocols file service local network file system file system device transport management service device network service KERNEL drivers transport device management service network device drivers KERNEL service local hardware application processes communication network 12 local hardware Distributed operating system • transparency • servers for supporting resource sharing and distributed processing • algorithms to implement transparencies • details in latter chapters Service Decomposition vs. Integration Services Decomposition in Integration in distributed systems autonomous systems 13 Cooperative autonomous system • client/server model • object model • software bus (middleware, broker, or trader) • CORBA and ODP • Peer-to-Peer (P2P) systems • Service Oriented Architecture (SOA) systems An example of cooperative autonomous system Yellow Pages communication servers channels real estate agency realtor client buyer realtor well−known server newspaper 14 client seller Service Oriented Architecture (SOA) (from http://en.wikipedia.org/wiki/Service-oriented architecture) Guiding Principles • Reuse, granularity, modularity, composability, componentization, interoperability • Standards compliance • Service identification and categorization, provisioning and delivery, monitoring and tracking SOA Elements General idea of usage is to ”orchestrate” services to develop application. 15 Specific SOA Architectural Principles • Service encapsulation - minimal interface • Service loose coupling - minimize dependencies • Service contract - documented specification and agreement • Service abstraction - internals hidden • Service reusability - intentional packaging of multi-use services • Service composability - composite services formed from building blocks • Service autonomy - owners control logic encapsulated by services offered • Service optimization - clients can ”shop” for the ”best” service • Service discoverability - meaningful descriptions available through discovery mechanisms • Service relevance - granularity is right for meaningful service Why do we need distributed control algorithms? An algorithm is sometimes called protocol if it specifies coordination more than computation. • algorithm changes due to message passing • need for consensus algorithms due to lack of global information • concurrency control algorithms to avoid interference in resource sharing • coherency control algorithms to maintain consistency for data replication • protocols for group communication in distributed applications • fault-tolerance algorithms for handling failure and recovery • real-time and distributed scheduling algorithms 16