Presentation is loading. Please wait.

Presentation is loading. Please wait.

5/5/20151 NIE – Maharagama The main objective of this seminar / workshop is to endow with an in-depth subject knowledge to the participants who are supposed.

Similar presentations


Presentation on theme: "5/5/20151 NIE – Maharagama The main objective of this seminar / workshop is to endow with an in-depth subject knowledge to the participants who are supposed."— Presentation transcript:

1 5/5/20151 NIE – Maharagama The main objective of this seminar / workshop is to endow with an in-depth subject knowledge to the participants who are supposed to teach the advanced level Information and Communication Technology subject in schools from year Therefore, the material provided should be used only as a general guide and not the ultimate source of information.

2 Operating Systems “An elephant is a mouse with an Operating System.” — Knuth 5/5/20152

3 Basic Concepts  An OS is a software that controls and organizes the operations of a computer system while helping execution of other programs and improving systems performance. What is an OS?  OS is the software layer closest to the hardware of a computer which facilitates controlling and operating hardware and launching application programs and other systems utilities. Introduction  The purpose of an OS is to run a computer smoothly and efficiently. 5/5/20153

4 First Generation  Simple Hardware - Card Readers, Card Punch, Tape Readers, Line Printers - Loading program  User (Programmer) Makes the Job Schedule - Loading compiler - Compiling - Running  Inefficient  No requirement for an OS 5/5/20154

5 Second Generation  Simple Batch Systems - User (Programmer) prepares job (Program & Data) - Submits job to operator Third Generation  Multiprogramming and Time-sharing concepts - SPOOLing Used to speed up processing Fourth Generation  OS for PCs, Workstations, Servers, Networks  Distributed Operating Systems.  Multiprocessing Operating Systems.  Real Time Operating Systems. 5/5/20155

6 PC Operating Systems – Brief History  1976 Bill Gates and Paul Allen found Microsoft  1981 MS-DOS 1.0  1985 Windows 1.0  1990 Windows 3.1 and Windows for Workgroups bit addressing - Real modeReal mode - First Microsoft GUI operating system - Introduced protected mode - Eliminated real mode, introduced enhanced mode - Added network support (LANs) 5/5/20156

7 Contd. …  1992 Windows NT 3.1 – New Technology operating system – Created new corporate line – Focused on security and stability – NTFS (NT File System) – Eliminated direct access to memory – 32-bit addressing  1996 Windows NT 4.0 – Moved graphics driver into kernel  1995 Windows 95 – 32-bit addressing – DirectXDirectX - Simulates direct access to hardware through API 5/5/20157

8  1998 Windows 98 – Last purely consumer line desktop operating system – Does not boot in DOS mode – Bundled Internet Explorer into operating system  2000 Windows ME Contd. …  2001 Windows XP  2000 Windows 2000 – Last purely corporate line desktop OS – Active DirectoryActive Directory – KerberosKerberos - Enables single sign-on – Merged consumer and corporate code bases – 64-bit support 5/5/20158

9 Basic Design Goals  User Goal - Convenience  Providing an ‘easy to use environment’ hiding all complexities from the user  System Goals  Efficiency - High Throughput, Low Turnaround time and Low response time Throughput The number of jobs that can be executed in a unit time. E.g. Multiprogramming provides a better use of CPU and I/O resources. Multiprogramming – the ability to run more than one program at a time. Thus the utilization of fast devices and slow devices can be compromised. 5/5/20159

10  Improved Performance - Effective use of computer’s resources The interval from the time of submission of a job to the time of completion. Turnaround Time Response time - The amount of time taken to start responding.  Scalability - The ability to cater for the advancement of the technology by allowing new hardware and methodologies.  Availability - The ability to accept and successfully process an individual job or a large number of jobs concurrently. 5/5/201510

11  Reliability - The ability to work with a minimum of failures. - The consistence with which a result can be produced.  Serviceability Early discovery of troubles Searching for faulty areas and isolating them Diagnosing troubles Monitoring overloads Providing security - Includes on-line diagnosis and repair of malfunctions concurrent with normal job execution. 5/5/201511

12  Portability - Will the operating system be portable to widely varying types of hardware platforms?  Backward Compatibility and Emulation - Is it important that software that ran under previous operating system versions or under different operating systems be supported?  Security - Includes on-line diagnosis and repair of malfunctions concurrent with normal job execution. 5/5/201512

13 Two Layer Model Kernel Shell Resident part of the operating system. Memory management Task management Disk management Process management The interface that accepts, interprets and executes user commands or programs. 5/5/201513

14 SHELL Communicates with kernel SHELL Communicates with kernel User Communicates with the Shell User Communicates with the Shell KERNEL Provides Services by processing all system calls KERNEL Provides Services by processing all system calls User Interaction Kernel is protected from user access 5/5/201514

15 Operating System Architecture  Today’s OSs are complex because they provide many services and support a variety of H/W  OS architecture can help the designers to keep it simple as possible by organizing the OS components.  One of the earliest architecture is Monolithic Architecture. E.g. OS/360, VMS, Linux, UNIXVMS  Every OS component is contained in the kernel and can communicate with each other directly. This feature makes the OS efficient. 5/5/201515

16 SYSTEMS CALL INTERFACE Memory Manager Scheduler I/O Manager Network Manager File System APPLICATIONS Monolithic Architecture KERNEL USER SPACE KERNEL SPACE 5/5/201516

17 Layered Architecture  When the Operating Systems become complex monolithic designs become unmanageable.  OS functions are grouped into layers and each layer is assigned some specific functions.  Layered architectures promote modular designs.  A module is highly cohesive and the coupling between two adjacent modules is loose.  A modular design helps improving the structure and consistency of an Operating System. Debugging, updating, validation etc. becomes much easy.  A layer in between can communicate with the layer above and below. 5/5/201517

18  Performance degrades as intercommunication among components is not direct.  Each module hides its functional complexity to others and provides a standard interface to communicate with other components. APPLICATION LAYER IO MANAGEMENT INTER PROCESS COMMUNICATION MEMORY MANAGEMENT PROCESSOR ALLOCATION & PROCESS SCHEDULING HARDWARE LAYER 1 LAYER 5 LAYER 4 LAYER 3 LAYER 2 USER SPACE KERNEL SPACE 5/5/201518

19 Microkernel Architecture  Kernel is small and provides a small number of services. SYSTEMS CALL INTERFACE APPLICATIONS USER SPACE FILE SYSTEM PROCESS SCHEDULER DEVICE MANAGER MEMORY MANAGEMENMT SYNCHRONIZATION INTERPROCESS COMMUNICATION KERNEL  Provides a high degree of modularity.  Components such as Process management, File system, Networking and IO are kept outside the kernel.  E.g. Some versions of Linux, Windows XP KERNE L SPACE 5/5/201519

20 Microkernel Architecture MONOLITHIC KERNELMICRO KERNEL Structured, Open, Modular – SW Eng. Techniques can be adapted. Small kernel, Easy debug Lack of structure – SW Eng. Techniques cannot be adapted Re-implementing means rebuilding. High performance Daunting, poor performance during inter communication Needs lot of memory to load Large kernel, difficult to debug. 5/5/201520

21  Single User Single Task Operating Systems. Types of Operating Systems  Single User Multi Task Operating Systems.  Multi-processing Operating Systems.  Multi User OS Operating Systems.  Real time OS Operating Systems.  Multi-threading Operating Systems.  Multi-programming Operating Systems. 5/5/201521

22  Only one user can use it and perform only one application at a time Single User Single Task Operating Systems. Examples: MS-DOS – IBM PC Palm OS - PDA Symbian OS – Mobile phone  A single user performs varieties of tasks simultaneously. Single User Multi Task Operating Systems. Examples: MS Windows MAC OS 5/5/201522

23  In preemptive multitasking, the operating system divides the CPU time into slots and each program is permitted to execute during its own time slot.  There are two basic types of multitasking:  At the end of the time slot, the currently executing task is suspended and the next task in the queue is started or resumed. Multi Tasking Preemptive Multitasking 1. Preemptive 2. Cooperative.  The operating system switches between tasks quickly, giving the user the impression that more than one task is performed simultaneously 5/5/201523

24  In cooperative multitasking, each program can use the CPU for as long as it needs it.  If a program is not using the CPU, it may allow another program to use it temporarily. Microsoft Windows 3.x Example: Windows 95, Windows NT, OS/2 and UNIX Examples:  Allocation of priorities to programs is also possible so that high priority programs can preempt the low priority programs. Cooperative Multitasking 5/5/201524

25 Multi-User Operating Systems  Many users access server and share resources Examples: UNIX Windows 2003 Server Operating Systems of Mainframes and Super computers  More than one user can log on to the system at the same time. 5/5/201525

26  Slow I/O devices put the CPU to wait states.  Multi-programming allows loading several programs into memory and making the CPU available to another program while one program is waiting for completion of its I/O request.  Supports running several programs in the same machine at the same time. Multi Programming Operating Systems  The idea is to use the CPU effectively. 5/5/201526

27 010 I/O 3050 msms CPU I/OCPUI/O 10 ms30 ms20 ms40 ms Program A I/OCPUI/OCPU 10 ms30 ms20 ms40 ms Program B 010 I/O 3050 msms CPU Uni - programmingMulti - programming 5/5/201527

28  Supports running a program on more than one CPU. Multi-Processing Operating Systems. Multi-Threading Operating Systems.  In most operating systems, there is a one-to-one relationship between the task and the program.  Some operating systems allow a program to be divided into multiple tasks and run concurrently. Such systems are called multithreading operating systems. 5/5/201528

29 Real Time Operating Systems. (RTOS)  Responds to input instantly. Operating Systems used in Industrial Process control computers  They require minimal user interaction Robotic Devices Automobiles Some home appliances Examples: Scientific Instruments 5/5/201529

30 Short for Virtual Memory System, a multi-user, multitasking, virtual memory operating system that runs on DEC's VAX and Alpha lines of minicomputers and workstations. VMS was introduced in 1979 along with the first VAX minicomputer. Like the VAX itself, VMS has undergone many changes over the years. DEC now refers to it as OpenVMS. VMS An execution mode supported by the Intel and later processors. In real mode, these processors imitate the Intel 8088 and 8086 microprocessors, although they run much faster. Real mode, Protected Mode and Virtual Mode The other mode available is called protected mode. In protected mode, programs can access extended memory and virtual memory. Protected mode also supports multitasking.. 5/5/201530

31 DirectX A set of APIs developed by Microsoft that enables programmers to write programs that access hardware features of a computer without knowing exactly what hardware will be installed on the machine where the program eventually runs. The DOS was not designed to take advantage of protected mode, so it always executes programs in real mode unless a protected mode extender is run first. The and later microprocessors support a third mode called virtual 8086 mode. In virtual mode, these microprocessors can run several real-mode programs at once 5/5/201531

32 DirectX achieves this by creating an intermediate layer that translates generic hardware commands into specific commands for particular pieces of hardware. In particular, DirectX lets multimedia applications take advantage of hardware acceleration features supported by graphics accelerators. A new directory service from Microsoft that will be part of Windows NT 5.0. Active Directory A network service that identifies all resources on a network and makes them accessible to users and applications. Directory Service 5/5/201532

33 Resources include addresses, computers, and peripheral devices such as printers. Ideally, the directory service should make the physical network topology and protocols transparent so that a user on a network can access any resource without knowing where or how it is physically connected. Kerberos is a network authentication protocol. It is designed to provide strong authentication for client/server applications by using secret-key cryptography developed at Massachusetts Institute of Technology (MIT) Kerberos 5/5/201533

34 General Functions of an Operating System 1. Processor Management Controlling processes and applications access of CPU so that each has its fair share.  OS has to ensure that each process and application receives enough of the processor's time to function properly.  Use as many processor cycles for jobs as are possible. 5/5/201534

35  The basic unit of software that the operating system deals with in job scheduling is either a process or a thread (depends on the OS) Process / Thread  Therefore a process, is considered as a software that performs some action and can be controlled by a user, by other applications or by the operating system.  A process was simply regarded as an application that is running. But it is not always true. An application may cause several other processes to begin. 5/5/201535

36  Controls the different types of memories for the allocation of space to applications. 2. Memory Management  O/S makes sure that instructions and corresponding data are in the RAM for the CPU to process.  If RAM capacity is not enough, the O/S should borrow space from the hard disk. The process of borrowing space from the hard disk to increase the capacity of RAM is called virtual memory 5/5/201536

37 The condition of excessive paging is called thrashing, making the computer very slow  Later, if this data contained in the swap file is needed, the O/S stores it back in the RAM (Page). The process of is called paging.  The O/S swaps out data from the RAM that is not currently needed and stores it in a swap file. 5/5/201537

38 Manages the Disk, file storage facilities. 3. Storage Management  Disk Management.  File Management. - Basic Directory and File Operations. Create, Open, Close, Read, Write Attributes Security, Access rights Partitioning Formatting, Boot area, FAT, Inode tables Copy, Paste, Rename, Join, Move, Delete - Basic Disk Operations. 5/5/201538

39  Controls devices, mainly through their drivers. 4. Device Management  Managing input and output is largely a matter of managing queues and buffers. E.g. KB  Device drivers translate the commands of a device to commands that the O/S understands and vice versa  Plug and Play - A software and hardware standard - A user can plug a device into a port and the O/S recognizes the device and its driver immediately. 5/5/201539

40 5. Interface Management User Interface  OS provides a set of routines, protocols, and tools for building software applications. A good API makes it easier for a programmer to develop a program by providing all the building blocks.  Junction between a user and a computer program. 1. Command Driven Interface  Three types. 2. Menu Driven Interface 3. Graphical User Interface Application Interface 5/5/201540

41 A menu-driven interface is one in which you select choices from various menus displayed on the screen. Provides facilities to use a set of commands through which a user communicates with the OS Menu Driven Interface Command Driven Interface A user interface (GUIs) that use windows, icons, and pop-up menus and a pointing device such as a mouse to manipulate them. Graphical user interface 5/5/201541

42 6. Interrupt Handling 7. Enabling Multi-access 8. Deadlock Handling 9. Security Management 5/5/201542

43 Multitasking: Controls timing of events Example You are typing and at the same time you want to print The OS receives an interrupt that a job needs to be sent to the printer The OS puts into a stack the job currently being processed by the CPU The CPU processes the printer request by sending the data to the printer The CPU goes back to the stack and retrieves the job that was being processed before If the printer is busy, the OS puts the job into a buffer A program, called spooler, will tell the OS that the printer is free to process new requests 5/5/201543

44 Application Program Interfaces (API) Blocks of code that the application software can use in order to interact with the CPU These blocks are built into the O/S So, instead of building these blocks into every application, the code is built only once into the O/S 5/5/201544

45 5/5/201545


Download ppt "5/5/20151 NIE – Maharagama The main objective of this seminar / workshop is to endow with an in-depth subject knowledge to the participants who are supposed."

Similar presentations


Ads by Google