1 / 45

NIE – Maharagama

Download Presentation

NIE – Maharagama

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 2009. Therefore, the material provided should be used only as a general guide and not the ultimate source of information. NIE – Maharagama

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

  3. Basic Concepts Introduction What is an OS? • 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. • 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. • The purpose of an OS is to run a computer smoothly and efficiently.

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

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

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

  7. Contd. … • 1992 Windows NT 3.1 – New Technology operating system – Created new corporate line – Focused on security and stability – NTFS (NTFile 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 – DirectX - Simulates direct access to hardware through API

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

  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.

  10. Turnaround Time The interval from the time of submission of a job to the time of completion. Response time- The amount of time taken to start responding. • Improved Performance - Effective use of computer’s resources • 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.

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

  12. Security - Includes on-line diagnosis and repair of malfunctions concurrent with normal job execution. • 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?

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

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

  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, UNIX • Every OS component is contained in the kernel and can communicate with each other directly. This feature makes the OS efficient.

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

  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.

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

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

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

  21. Types of Operating Systems • Single User Single Task Operating Systems. • Single User Multi Task Operating Systems. • Multi User OS Operating Systems. • Multi-programming Operating Systems. • Multi-processing Operating Systems. • Multi-threading Operating Systems. • Real time OS Operating Systems.

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

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

  24. Allocation of priorities to programs is also possible so that high priority programs can preempt the low priority programs. Examples: Windows 95, Windows NT, OS/2 and UNIX Cooperative Multitasking • 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. Example: Microsoft Windows 3.x

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

  26. Multi Programming Operating Systems • Supports running several programs in the same machine at the same time. • The idea is to use the CPU effectively. • 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.

  27. Program A 10 ms 30 ms 20 ms 40 ms CPU I/O CPU I/O Program B 10 ms 30 ms 20 ms 40 ms I/O CPU I/O CPU CPU CPU I/O I/O ms ms 0 10 30 50 70 90 100 0 10 30 50 70 90 100 Uni - programming Multi - programming

  28. Multi-Processing Operating Systems. • Supports running a program on more than one CPU. 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.

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

  30. VMS 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. Real mode, Protected Mode and Virtual Mode An execution mode supported by the Intel 80286 and later processors. In real mode, these processors imitate the Intel 8088 and 8086 microprocessors, although they run much faster. The other mode available is called protected mode. In protected mode, programs can access extended memory and virtual memory. Protected mode also supports multitasking. .

  31. The 80386 and later microprocessors support a third mode called virtual 8086 mode. In virtual mode, these microprocessors can run several real-mode programs at once 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. 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.

  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. Active Directory A new directory service from Microsoft that will be part of Windows NT 5.0. Directory Service A network service that identifies all resources on a network and makes them accessible to users and applications.

  33. Resources include e-mail 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 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)

  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.

  35. Process / Thread • 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) • 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. • 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.

  36. 2. Memory Management • Controls the different types of memories for the allocation of space to applications. • 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

  37. The O/S swaps out data from the RAM that is not currently needed and stores it in a swap file. • 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 condition of excessive paging is called thrashing, making the computer very slow

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

  39. 4. Device Management • Managing input and output is largely a matter of managing queues and buffers. E.g. KB • Controls devices, mainly through their drivers. • 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.

  40. 5. Interface Management Application 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. User Interface • Junction between a user and a computer program. • Three types. 1. Command Driven Interface 2. Menu Driven Interface 3. Graphical User Interface

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

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

  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

  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

More Related