Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating-System Structures

Similar presentations

Presentation on theme: "Operating-System Structures"— Presentation transcript:

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

2 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

3 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

4 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

5 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

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

7 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

8 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

9 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

10 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

11 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

12 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

13 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

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

15 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

16 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.

17 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

18 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

19 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.

20 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

21 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)

22 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

23 API – System Call – OS Relationship

24 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

25 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

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

27 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

28 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

29 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

30 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

Download ppt "Operating-System Structures"

Similar presentations

Ads by Google