You are on page 1of 11

OS Lec1 Application Software - consists of the programs for performing tasks particular to the machine's utilization.

- generally what we think of when someone speaks of computer programs. - This software is designed to solve a particular problem for users. System Software - Transparent and less noticeable - Provides general programming environment - Provides new functions and performs additional tasks - Interface between the hardware and application software Operating System - A set of programs containing instructions that work together to coordinate all the activities among computer hardware resources. Operating System Functions: The process of starting and restarting is called booting. Cold boot Turning on a computer that has been powered off completely Warm boot Using the operating system to restart a computer What is KERNEL? The core of an operating system that manages memory and devices, maintains the computer's clock, starts programs, and assigns the computer's resources, such as devices, programs, data, and information. What does memory resident mean? it means it remains in memory while the computer is running. The Kernel does this. What does non-resident mean?

Instructions that remain on a storage medium until they are needed. A boot drive is the drive from which your computer starts You can boot from a boot disk A recovery disk contains a few system files that will start the computer An operating system includes various shutdown options Sleep mode saves any open documents and programs to RAM, turns off all unneeded functions, and then places the computer in a low-power state Hibernate saves any open documents and programs to a hard disk before removing power from the computer A user interface controls how you enter data and instructions and how information is displayed on the screen With a graphical user interface (GUI), you interact with menus and visual images With a command-line interface, a user uses the keyboard to enter data and instructions Memory management optimizes the use of RAM Virtual memory is a portion of a storage medium functioning as additional RAM The operating system determines the order in which tasks are processed A driver is a small program that tells the operating system how to communicate with a specific device Plug and Play automatically configures new devices as you install them Operating systems typically provide a means to establish Internet connections A performance monitor is a program that assesses and reports information about various computer resources and devices Operating systems often provide users with the capability of: Managing files Searching for files Viewing images Securing a computer Uninstalling programs Cleaning up disks Defragmenting disks

Diagnosing problems Backing up files and disks Setting up screen savers Automatic update automatically provides updates to the program Some operating systems are designed to work with a server on a network A server operating system organizes and coordinates how multiple users access and share resources on a network A network administrator uses the server operating system to: -Add and remove users, computers, and other devices -Install software and administer network security Each user has a user account A user name, or user ID, identifies a specific user A password is a private combination of characters associated with the user name TYPES OF OPERATING SYSTEMS

A stand-alone operating system is a complete operating system that works on a desktop computer, notebook computer, or mobile computing device Windows 7 is Microsofts fastest, most efficient operating system to date and is available in multiple editions: The Macintosh operating system has set the standard for operating system ease of use Latest version is Mac OS X UNIX is a multitasking operating system developed in the early 1970s Linux is an open-source, popular, multitasking UNIX-type operating system Server Operating Systems Windows Server 2008 UNIX Linux Solaris Windows Server 2008 is an upgrade to Windows Server 2003 Part of the Windows Server 2008 family Multiple editions Most editions include Hyper-V, a virtualization technology Virtualization is the practice of sharing or pooling computing resources An embedded operating system resides on a ROM chip on a mobile device or consumer electronic device Windows Embedded CE Windows Mobile Palm OS iPhone OS Blackberry Embedded Linux Symbian OS A utility program is a type of system software that allows a user to perform maintenance-type tasks A file manager is a utility that performs functions related to file management Displaying a list of files Organizing files in folders

Copying, renaming, deleting, moving, and sorting files and folders Creating shortcuts A search utility is a program that attempts to locate a file on your computer based on criteria you specify An image viewer allows users to display, copy, and print the contents of a graphics file An uninstaller removes a program, as well as any associated entries in the system files A disk cleanup utility searches for and removes unnecessary files Downloaded program files Temporary Internet files Deleted files Unused program files A disk defragmenter reorganizes the files and unused space on a computers hard disk so that the operating system accesses data more quickly and programs run faster A backup utility allows users to copy files to another storage medium A restore utility reverses the process and returns backed up files to their original form A screen saver causes a display devices screen to show a moving image or blank screen if no activity occurs for a specified time A personal firewall detects and protects a personal computer from unauthorized intrusions A file compression utility shrinks the size of a file(s) Compressing files frees up room on the storage media Two types of compression Lossy Lossless Compressed files sometimes are called zipped files Can be uncompressed

A media player allows you to view images and animation, listen to audio, and watch video files on your computer Disc burning software writes text, graphics, audio, and video files on a recordable or rewritable optical disc A personal computer maintenance utility identifies and fixes operating system problems, detects and repairs disk problems, and includes the capability of improving a computers performance

OS Lec2 History The 1940's - First Generations No operating system Machines were so primitive Programming languages were unknown Never heard about OS. The 1950's - Second Generation By the early 1950's, punch cards were introduced. IBM 701 has been implemented by the General Motors Research Laboratories as first OS during early 1950s. The system of the 50's generally ran one job at a time. These were called single-stream batch processing systems The 1960's - Third Generation Batch processing with multiprogramming Additional feature was the technique called spooling (simultaneous peripheral operations on line) Timesharing technique Fourth Generation Development of LSI (Large Scale Integration) Microprocessor Technology evolved during 1970s. Tow OS that dominates personal computer scene: MS-DOS of Microsoft, Inc. using the Intel 8088 CPU UNIX using the Motorola 6899 CPU family History Microsoft Windows 1975 1981: Microsoft boots up Co founders : paul allen and bill gates

The dawn of MS-DOS (Microsoft Disk Operating System) During 1980, were Steve Ballmer works with Gates and Allen. When IBM PC running MS-DOS in 1981, it introduces new language general to the public. MS-DOS is effective but difficult to understand for many people 1982 1985: Introducing Windows 1.0 1982 1985: Introducing Windows 1.0 November 20, 1985: initial announcement for Microsoft Windows 1.0 It is unique software designed for serious PC user Features: Drop-down menus Scroll bars Icons Dialog boxes Switch from different programs Remember floppy disks and kilobytes? Windows 1.0 requires a minimum of 256 kilobytes (KB), two double-sided floppy disk drives, and a graphics adapter card. A hard disk and 512 KB memory is recommended for running multiple programs or when using DOS 3.0 or higher. 1987 1992: Windows 2.0 2.11 More windows, more speed

December 9, 1987: Release of Microsoft Windows 2.0 1987 1992: Windows 2.0 2.11 Designed for Intel 286 processor When Intel 386 processor is released, Windows/386 was introduced to take the advantage of its extended memory capabilities. 1988, Microsoft becomes the worlds largest PC software company based on sales. Control Panel makes its first appearance in Windows 2.0. 1990 1994: Windows 3.0 Windows NT Getting the graphics May 22, 1990, Microsoft announces Windows 3.0 1992 Windows 3.1 was released. When Intel 386 processor is released, Windows/386 was introduced to take the advantage of its extended memory capabilities. 1988, Microsoft becomes the worlds largest PC software company based on sales. Program Manager, File Manager, and Print Manager arrive in Windows 3.0. 1990 1994: Windows 3.0 Windows NT Getting the graphics

Windows software is installed with floppy discs. Windows software development kit (SDK) has been introduced with the growing popularity of Windows 3.0 Games like Soltaire, Hearts and Minesweeper Now you can use the incredible power of Windows 3.0 to goof off. Windows 3.11 adds peer-to-peer workgroup and domain networking support. Windows NT Released on July 27, 1993 "Windows NT represent s nothing less than a fundamental change in the way that companies can address their business computing requirements," The group that develops Windows NT was originally called the "Portable Systems" team. 1995 2001: Windows 95 the PC becomes of age 1995 2001: Windows 95 the PC becomes of age Era for fax/modem, email, new online world, multimedia and educational software. Built-in Internet support, dial-up

networking and Plug and Play capabilities 32-bit operating system 486 machine is recommended with 8MB of RAM Upgrade version available for both floppy disk and CDROM formats in 12 languages. First appearance of Start menu, taskbar, and the window manipulation button Windows ME Designed for home computer use Technically speaking, Windows Me was the last Microsoft operating system to be based on the Windows 95 code base . Microsoft announced that all future operating system products would be based on the Windows NT and Windows 2000 ker nel. Windows 2000 Professional Upgrade to Windows NT 4.0 Built to improve reliability, ease of use, Internet compatibility and support mobile computing. Simplifies hardware installation 2001 2005: Windows XP Stable, usable and fast October 25, 2001, Windows XP released with a redesigned look. Available in 25 languages Becomes one of the best selling products More emphasis on Help and Support.

Windows XP Tablet PC Edition (2002) 2006 2008:Windows Vista Smart on Security Strongest security system Windows Ultimate BitLocker Drive Encryption feature Enhanced Windows Media Player 2006 2008:Windows Vista Smart on Security Design plays big role in Windows Vista Search gets new emphasis Introduces new editions that each have different mix of features. Available in 35 languages Redesigned of Start button. 2009 2012: Windows 7 Released in October 2009 By the fall of 2010, Windows 7 is selling seven copies a secondthe fastest-selling operating system in history. Improvements to the Windows 7 taskbar include live thumbnail previews 2012 Today: Windows 8 and counting October 26, 2012 released for general availability Primarily focused towards improving its user experience on mobile devices such as tablets to rival other mobile operating systems Introduces a new shell and user interface based on Microsoft's "Metro" design language, featuring a new Start screen

On August 2Its the most publicized launch Windows XP 64-bit Edition (2001) Windows XP Media Center Edition (2002)

OS lec3 The Operating System n We can view an OS from several vantage points: l Focusing on the services the system provides l Focusing on the interface that it makes available to users and programmers l Focusing on its components and their interconnections Today well cover all three aspects Operating System Services n Functions that are helpful to the user: l User interface - Almost all operating systems have a user interface (UI) Varies between (most systems provide 2 or 3 of these variations): Command-Line (CLI) uses text commands and a method for entering them Graphics User Interface (GUI) Most common Usually a window system with a pointing device to direct I/O, choose from menus and make selections and a keyboard to enter text Recently: gesture control (movie), voice recognition, etc. Batch interface commands are entered into files, and those files are executed l Program execution - load a program into memory and run it, end execution, either normally or abnormally (indicating error) l I/O operations - A running program may require I/O, which may involve a file or an I/O device For efficiency and protection users usually cannot control I/O devices directly User Operating System Interface - CLI Command Line Interface (CLI) or command interpreter allows direct command entry

Interpreter (interpreting a user command to system calls) can be implemented in kernel, or by system programs On systems with multiple interpreters to choose from shells (e.g., in UNIX: Bourne shell, Bourne-again shell, C shell, Korn shell) Primarily fetches a command from user and executes it Sometimes commands built-in (i.e., the commands interpreter jumps to the right section of its code), sometimes just names of programs If the latter, adding new features doesnt require shell modification Example Unix command rm file.txt Search for a file called rm Load file into memory Execute it with the parameter file.txt User Operating System Interface - GUI 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 (known as a folder) Selection from menus Invented at Xerox PARC research facility Many systems now include both CLI and GUI interfaces Microsoft Windows is GUI with CLI command shell Apple Mac OS X as Aqua GUI interface with UNIX kernel underneath and shells available Solaris is CLI with optional GUI interfaces When is it better to use CLI and when GUI? Bourne Shell Command Interpreter The Mac OS X GUI Operating System Services Functions that are helpful to the user:

User interface - Almost all operating systems have a user interface (UI) Varies between (most systems provide 2 or 3 of these variations): Command-Line (CLI) uses text commands and a method for entering them Graphics User Interface (GUI) Most common Usually a window system with a pointing device to direct I/O, choose from menus and make selections and a keyboard to enter text Batch interface commands are entered into files, and those files are executed Program execution - load a program into memory and run it, 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 For efficiency and protection users usually cannot control I/O devices directly Operating System Services (Cont) File-system manipulation (for users and their programs) - read and write files and directories, create and delete them, search them, list file Information, permission management Communications Processes may exchange information, on the same computer or between computers over a network via shared memory or through message passing (packets moved by the OS) Error detection be aware of possible errors May occur in the CPU and memory hardware (e.g., memory error or power failure), in I/O devices (e.g., a connection failure in a network or lack of paper in a printer), in user program (e.g., attempting to access illegal memory location) For each type of error, OS should take the appropriate action to ensure correct and consistent computing Debugging facilities can greatly enhance the users and programmers abilities to efficiently use the system Operating System Services (Cont)

Ensuring the efficient operation of the system: Resource allocation - when multiple users or multiple jobs running concurrently 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 - which users use how much and what kinds of computer resources For billing For usage statistics (later used for tuning and development of mechanisms) Protection and security - concurrent processes should not interfere with each other Protection - ensuring that all access to system resources is controlled Security - user authentication, defending external I/O devices from invalid access attempts, etc. System Calls Provide interface to the services made available by the OS the mechanism by which a program requests a service from an operating system's kernel Typically written in a high-level language (C or C++) Certain low-level tasks (where hardware must be accessed directly) may require assembly-language instructions On Unix, Unix-like and other POSIXcompatible Operating Systems, popular system calls are open, read, write, close, wait, exec, fork, exit, and kill. Many of today's operating systems have hundreds of system calls. Linux has 319 different system calls. Similarly, FreeBSD (free Unix-like OS) has almost 330. Example of System Calls How many system calls do we need to copy the contents of one file to another file? Get the names of the two files. Ask user for the names (write to screen, receive input) Let the user point to the files using GUI (many I/O system calls)

Select from menu Open the input file and create the output file Handle many error conditions (input file does not exist, file is protected against access). Possible reactions: Abort (system call), delete existing file (system call), ask the user (system calls sequence) Example of System Calls (cont.) System call sequence to copy the contents of one file to another file Loop: read from input file and write to output file (system calls) Error handling hardware malfunction, EOF, no more disk space, Close both files Report success to the user Terminate normally (final system call) System Calls (cont.) - API The API specifies the set of functions that are available to the application programmer, including: Parameters that are passed to each function Expected return values Three most common APIs are Win32 API for Windows, POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM) Why use APIs rather than system calls? Portability (compiling on different machines) Simpler calls through API API System Call OS Relationship Standard C Library Example C program invoking printf() library call, which calls write() system call System Call Parameter Passing Often, more information is required than simply identity of desired system call Exact type and amount of information vary according to OS and call Three general methods used to pass parameters to the OS

Simplest: pass the parameters in registers In some cases, may be more parameters than registers Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register This approach taken by Linux and Solaris Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system Block and stack methods do not limit the number or length of parameters being passed Parameter Passing via Table Examples of Windows and Unix System Calls MS-DOS execution FreeBSD Running Multiple Programs System Programs System programs provide a convenient environment for program development and execution. Most users view of the operation system is defined by system programs, not the actual system calls 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 File management - 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 Some systems implement a registry used to store and retrieve configuration information

System Programs (contd) 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 Program loading and executionAbsolute loaders, relocatable loaders, linkage editors, and overlay-loaders, 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 anothers screens, browse web pages, send electronic-mail messages, log in remotely, transfer files from one machine to another Operating System Design and Implementation Design and Implementation of OS not solvable, but some approaches have proven successful Internal structure of different Operating Systems can vary widely Affected by choice of hardware, type of system: Batch, time shared, single user, multiuser, real-time or general purpose User goals and System goals User goals operating system should be convenient to use, easy to learn, reliable, safe, and fast System goals operating system should be easy to design, implement, and maintain, as well as flexible, reliable, errorfree, and efficient Operating System Design and Implementation (Cont) Important principle to separate Policy: What will be done? Mechanism: How to do it? The separation of policy from mechanism is a very important principle, it allows maximum flexibility if policy decisions are to be changed later

Example allocation of CPU Simple Structure MS-DOS written to provide the most functionality in the least space Developed to run a single user, stand alone desktop computer Manages jobs sequentially Not divided into modules carefully Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated MS-DOS Layer Structure UNIX UNIX limited by hardware functionality, the original UNIX operating system had limited structuring. The UNIX OS consists of two separable parts Systems programs The kernel Consists of everything below the system-call interface and above the physical hardware Provides the file system, CPU scheduling, memory management, and other operating-system functions; a large number of functions for one level Traditional UNIX System Structure Layered Approach The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface. With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers Simple debugging Disadvantages: Division of functionality to layers Efficiency Microkernel System Structure Moves as much from the kernel into user space Communication takes place between user modules using message passing Benefits: Easier to extend a microkernel

Easier to port the operating system to new architectures More reliable (less code is running in kernel mode) More secure Detriments: Performance overhead of user space to kernel space communication Modules Most modern operating systems implement kernel modules Uses object-oriented approach Each core component is separate Each talks to the others over known interfaces Each is loadable as needed within the kernel Overall, similar to layers but more flexible Solaris (Unix) Modular Approach Virtual Machines A virtual machine treats hardware and the operating system kernel as though they were all hardware A virtual machine provides an interface identical to the underlying bare hardware The operating system host creates the illusion that a process has its own processor and (virtual) memory Each guest provided with a (virtual) copy of underlying computer Virtual Machines History and Benefits First appeared commercially in IBM mainframes in 1972 Fundamentally, multiple execution environments (different operating systems) can share the same hardware Protect from each other Some sharing of file can be permitted Useful for development, testing Virtual Machines (Cont) (a) Nonvirtual machine (b) virtual machine VMware Architecture The Java Virtual Machine Operating-System Debugging Debugging is finding and fixing errors, or bugs

OSes generate log files containing error information Failure of an application can generate core dump file capturing memory of the process Operating system failure can generate crash dump file containing kernel memory Beyond crashes, performance tuning can optimize system performance

You might also like