Operating-System Structures

Slides:



Advertisements
Similar presentations
Chapter 2: Operating-System Structures
Advertisements

Operating-System Structures
Processes Management.
Operating System Structures
Dr. Kalpakis CMSC 421, Operating Systems Operating-System Structures.
Chap 2 System Structures.
SLC/Ver1.0/OS CONCEPTS/Oct'991INTRODUCTION What is an Operating System? Operating Structure -System Components -OS Services -System Calls & Programs -System.
Operating System Structure
Operating-System Structures
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Common System Components
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
2.1 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Overview of topics covered Operating System Services.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Operating System Services One set of operating-system.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Chapter 2: Operating-System.
Operating-System Structures. Operating System Services Operating systems provide an environment for execution of programs and services to programs and.
Shan Gao Fall 2007 Department of Computer Science Georgia State University.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
System Components Operating System Services System Calls.
Chapter 2: Operating-System Structures
Topic 2 (Textbook - Chapter 2) Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2:Operating System Structures
Module 3: Operating-System Structures
Chapter 2: Operating-System Structures
Lecture 1-Part 2: Operating-System Structures
2. OPERATING SYSTEM 2.1 Operating System Function
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
CS506 Lecture Dr. Nermin Hamza.
Chapter 2: Operating-System Structures
Operating-System Structures
Chapter 2: System Structures
Chapter 2: Operating-System Structures
Introduction to Operating System (OS)
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: System Structures
Chapter 3: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Introduction to Operating Systems
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
OPERATING SYSTEMS STRUCTURES
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
III. Operating System Structures
Presentation transcript:

Operating-System Structures Operating System & its purpose Operating Systems lead to new Hardware Features System Components System Services System Calls System Programs

Operating System Operating System Purpose An Operating System is a program that acts as an intermediary between a user of a computer and the computer hardware Purpose Operating System provide an environment in which a user can execute programs

How Operating System lead to new Hardware Features Simple Batch System Large machine run from a console, Input through card reader or tape Out put through line printers Multi-programmed Batched System The OS keeps several jobs in memory at a time Time-Sharing or Multitasking Systems Switching between jobs, user may interact Personal Computers Systems

How Operating System led to new Hardware Features Parallel or Multi-processor Systems More than one processor, sharing the computer bus, clock, memory and peripheral devices – Tightly coupled systems Distributed Systems Distribute computation among several processors, do not share memory or clock, every processor has its own local memory Real Time Systems When there is rigid requirement on the operation of a processor or flow of data, control devices

System Components Designing a OS is critical task depends on defining goals Different point of views of OS What services OS provide & how these are provide Interface it make available to user and programmer Sub system components integration & their interactions What are the various methodologies for designing such systems

System Components Process Management Main Memory Management File Management I/O System Management Secondary Storage Management Networking Protection system Command Interpreter System

System Components Process Management A process is a set of instruction or program in execution Batch, system task (spooling output to a printer) Process needs certain resources including CPU time, memory and I/O devices to accomplish its tasks OS is responsible for the following activities w.r.t process management Creation and deletion of user and system program Suspension and resumption of process Provision of mechanism for process communication and also for deadlock handling

System Components Main Memory Management Central to operation of computer system Quickly & Directly accessible CPU read and write data into main memory When retrieval from hard disk is required – first data loaded into main memory by I/O calls OS is responsible for the following activities w.r.t Main Memory Management Keep track of which part of memory are currently being used & by whom Decide which process are to be loaded into memory when memory space is available Allocate or de-allocate memory space as needed

System Components File Management Abstract form of physical properties of its storage devices to define logical storage Collection of related information/ data which may numeric or alphabetic Visible component of an OS stored in magnetic disk or tapes with different physical organization depends on speed, capacity, rate etc OS is responsible for the following activities w.r.t Main File Management Creation or deletion of files/ directories Manipulating files and directories Mapping of files onto secondary storage Back up of files on to non volatile media

System Components I/O System Management I/O System consists of OS purpose is to hide complexities from user I/O complexities are hidden from bulk of OS itself by the I/O subsystem I/O System consists of Buffering, caching and spooling A general device driver interface Driver for specific hardware devices

System Components Secondary Storage Management Permanent storage All data is stored Computer system must provide for permanent storage as back up for RAM OS is responsible for the following activities w.r.t Secondary Storage Management Free space management Storage allocation Disk scheduling

System Components Networking Distributed system is collection of process do not share memory, devices, clock Each process has its own memory and clock LAN, WAN configuration, Homogenous/ Heterogeneous environment Processors connected through high speed line or telephone lines Consider routing, connection strategies & securities Communication and data sharing is made

System Components Protection system Refers to mechanism for controlling the access of program, process or users to the resources defined by a computer system Computer system have multiple users Allow concurrent execution of programs Protection is required E.g Files, Memory segments, CPU, Other resources Only authorize persons can access Improve reliability - make system healthy

System Components Command Interpreter system Interface between user & system MS DoS - Kernal Windows GUI, Mouse , Key board - Shell

Operating System Services Objective To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system To explain how operating systems are installed and customized and how they boot

Operating System Services User interface - Almost all operating systems have a user interface (UI) Varies between Command-Line (CLI), Graphics User Interface (GUI) Program execution - The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error) I/O operations - A running program may require I/O, which may involve a file or an I/O device. File-system manipulation - The file system is of particular interest. Obviously, programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.

Operating System Services (Cont.) Communications – Processes may exchange information, on the same computer or between computers over a network Communications may be via shared memory or through message passing (packets moved by the OS) Error detection – OS needs to be constantly aware of possible errors May occur in the CPU and memory hardware, in I/O devices, in user program For each type of error, OS should take the appropriate action to ensure correct and consistent computing Debugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the system

Operating System Services (Cont.) Resource allocation - When multiple users or multiple jobs running concurrently, resources must be allocated to each of them Many types of resources - Some (such as CPU cycles, main memory, and file storage) may have special allocation code, others (such as I/O devices) may have general request and release code. Accounting - To keep track of which users use how much and what kinds of computer resources

Operating System Services (Cont.) Protection and security - The owners of information stored in a multi-user or networked computer system may want to control use of that information, concurrent processes should not interfere with each other Protection involves ensuring that all access to system resources is controlled Security of the system from outsiders requires user authentication, extends to defending external I/O devices from invalid access attempts If a system is to be protected and secure, precautions must be instituted throughout it. A chain is only as strong as its weakest link.

User Operating System Interface - GUI Many systems now include both CLI and GUI interfaces Microsoft Windows is GUI with CLI “command” shell User-friendly desktop metaphor interface Usually mouse, keyboard, and monitor Icons represent files, programs, actions, etc Various mouse buttons over objects in the interface cause various actions (provide information, options, execute function, open directory or folder

System Calls System calls are the programming interface to the services provided by the OS Typically written in a high-level language (C or C++) Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call use Three most common APIs are Win32 API for Windows, POSIX API for all versions of UNIX, Linux, and Mac OS, and Java API for the Java virtual machine (JVM)

Example of Standard API Consider the ReadFile() function in the Win32 API—a function for reading from a file A description of the parameters passed to ReadFile() HANDLE file—the file to be read LPVOID buffer—a buffer where the data will be read into and written from DWORD bytesToRead—the number of bytes to be read into the buffer LPDWORD bytesRead—the number of bytes read during the last read LPOVERLAPPED ovl—indicates if overlapped I/O is being used

API – System Call – OS Relationship

Types of System Calls Process control File manipulation End, Abort, Load, Execute Create/ Terminate process Get/Set process attributes Wait event, Signal event Allocate & Free memory File manipulation Create/ Delete file Open, Close, Read, Write Get/ Set File attribute Device manipulation Request/ Release Device Read, Write, Reposition Logically attach or detach devices

Types of System Calls Information maintenance Get/ Set time or date Get/ Set System data Get/ Set process, file, or device attribute Communications Create/ Delete communication connection Send/ Receive messages Transfer status information Attach or detach remote devices

Steps in Making a System Call There are 11 steps in making the system call read (fd, buffer, nbytes)

System Programs System programs provide a convenient environment for program development and execution. Some of them are simply user interfaces to system calls; others are considerably more complex The can be divided into: File manipulation Status information File modification Programming language support Program loading and execution Communications Application programs

System Programs (cont’d) File manipulation – Create, delete, copy, rename, print, dump, list, and generally manipulate files and directories Status information Some ask the system for info - date, time, amount of available memory, disk space, number of users Others provide detailed performance, logging, and debugging information Typically, these programs format and print the output to the terminal or other output devices

System Programs (cont’d) File modification Text editors to create and modify files Special commands to search contents of files or perform transformations of the text Programming-language support Compilers, assemblers, debuggers and interpreters sometimes provided

System Programs (cont’d) Program loading and execution Absolute loaders, , linking, and execution, debugging systems for higher-level and machine language Communications Provide the mechanism for creating virtual connections among processes, users, and computer systems Allow users to send messages to one another’s screens, browse web pages, send electronic-mail messages, log in remotely, transfer files from one machine to another Application Programs OS provide programs that solve common problem or perform common operations Web browser, word processor, spread sheets, databases