Chapter SW 2 SYSTEMS SOFTWARE In this chapter we learn more about systems software. Systems Software • • • Manager, Coordinator Role of Mediator Three Types: – – – Operating Systems Utility Programs Language Translators Systems software is software that manages and coordinates a computer system so that application programs can be run efficiently. Its role is to be a mediator between the application programs and the computer hardware. As we learned in the last chapter, there are three types of systems software: operating systems, utility programs, and language translators. The Operating System • • • • (OS) Collection of programs Manages computer activities Controls computer resources Insures orderly, optimal system An operating system or OS is a collection of programs that manages the activities of a computer system and controls the system’s resources. It insures that a system runs orderly and as optimally as possible. All tasks that you do on the computer involve the operating system. At a minimum the operating system has to start and stop the task. OS Differences • • • Personal Operating Systems – Targeted to individual users Network Operating Systems – Designed for networked workstations Mainframe & Midrange OSs – Designed for multiple terminal users and batch processing Operating systems differ in many respects. This is because of the hardware that they were designed to run on and the type of user that they were designed to serve. So they can differ in functionality, flexibility, and ease of use. A personal operating system is targeted at the needs of a single individual. Until recently, they didn’t even recognize that different people might be using the same computer. A network operating systems or NOS is designed to handle multiple individuals at workstations on a network. If these workstations are PCs running personal operating systems, you are still limited. If you change the options in MS-Word, the next person that uses the same computer inherits your changes. Clemson has written a lot of software that gives you the appearance of having the same environment no matter which lab computer you use. In fact, that software recently won some awards and prizes. You give up something by using this software because the environment has to be the same for everyone. If I install a software package on a lab computer, when I log off, it is gone. Chapter SW1 Page 1 Operating Systems • Mainframe • Micro – OS/390, VM – MS-DOS (PC-DOS) – UNIX – MacOS • Midrange – Windows 3.X – OS/400 – Windows 9X – VAX/VMS – Windows NT Workstation (2000 Professional) – UNIX – OS/2 Warp • Network – UNIX – Netware • PalmTop – Windows NT/2000 Server – Windows CE – OS/2 Warp Server – PinPoint – UNIX This shows some popular operating systems for personal computers, networks, midrange, and mainframe computers. Notice that Unix shows up in many of these categories. OS Functions • • • (1/3) Interacting with Users – User interface Making Resources Available – Who gets what when Scheduling Resources and Jobs – Who gets to run All operating systems have certain functions that they perform and the author has divided these into some categories. If you went to a good book on operating systems, they would the functions up differently but this may be easier to understand. In Software 1, we looked at different ways that the operating system might interact with users. One thing that the operating system has to do is communicate with the user about things that the user needs to know about. So if you try to access a diskette drive and there isn’t a diskette in the drive, the operating system needs to let you know. Different operating system might let you know in different ways. The author says that whenever you enter a keystroke, the operating system summons a translator. In actually, the routines that handle things like this are already translated into machine language. The operating system simply goes to the correct routine to handle the event. A computer has a certain amount of resources like CPUs, memory, secondary storage, and input or output devices. Whenever a computer is turned on or reset, the operating system boots up or is bootstrapped. During a bootstrap, part of the operating system is brought into memory. That part is then responsible for loading the rest. Either all the devices are predefined in the OS or the system goes out and determines which resources are there. In the IBM mainframe world, this is called an IPL, Initial Program Load. When a program needs access to a resource, it has to request it through the operating system. Some resources, like memory, can be shared. However, unless a file is explicitly opened in share mode, only one program at a time can access a file. And, it wouldn’t do to have two programs at a time actually printing to a printer. So resources and tasks have to be scheduled. Which program is going to use the CPU and for how long. Who has the highest priority to use a device? OS Functions • • (2/3) Monitoring Activities – How’s it going Housekeeping – Keep it in order Chapter SW1 Page 2 An OS has to monitor ongoing activities to make sure that everything is going OK and that the system is performing well. It may have to make some adjustments such as terminating a program or putting it to sleep for a while. Even an OS has to do housekeeping. One big housekeeping task is keeping up with the contents of hard disk. Organizing Files into Directories Many OSs organize the disk as a hierarchy of directories. Each directory can consist of files and subdirectories. The directory at the top of the hierarchy is called the root directory or main directory. Files and subdirectories are often called documents and folders. Whenever you want to access a file in a directory other than the current one, you have to specify the path of directories to reach it. OS Functions • • (3/3) Security – Authorized users only Other Tasks – Utility programs can handle it Many operating systems require that you enter a login or user id and a password for security to use the system or gain access to protected resources. Other functions are generally covered by utility programs. Interleaved Processing Techniques • • • Multiprogramming Multitasking Time-Sharing If a computer has one CPU, only one program at a time can run. That one program can be the OS or one of the other programs in memory. The CPU is a scarce resource that many programs want to use at the same time. Generally, when a program other than the OS is running, it is only a short while before it needs some services from the OS like some input from the user or a message from the Internet or perhaps a cluster from the hard disk. If only one program is in the system, the system also waits for this task to complete. It would be nice if we could interleave the processing of more than one program. Interleaved (Concurrent) Processing Rather than having the whole system sit and wait while this task in completes, the OS starts another program running if there is one that is ready. Once the request for service task that the first program requested is complete, then the first program is ready to run again. With a fast CPU, unless you have a large number of programs running, the operating system will be spending a large portion of the time waiting. This interleaving of programs makes it appear to the user that programs are running simultaneously. But, they aren’t. They are being run concurrently, not simultaneously. Multiprogramming When this interleaving technique is used on a multi-user system, it is called multiprogramming. Here we see multiple users and multiple programs. Multitasking • Cooperative – Voluntary • Preemptive – Enforced When it is used in a single user OS, it is commonly called multitasking. Here we see one user and multiple programs and tasks. Cooperative multitasking is when tasks cooperate and voluntarily give up control of the CPU. Preemptive multitasking is when the OS can preempt a task and go on to another task. Multiprogramming & Multitasking Some multi-user systems, such as UNIX, combine multiprogramming and multitasking. Chapter SW1 Page 3 Time Sharing Time sharing is a multiprogramming technique that gives each program a fixed slice of time. It this goes to the next program, and the next, and so forth. After all the programs have given given a time slice, it goes back to the first. IBM OS/390 Some operating systems such as IBM’s OS/390 combine all of these techniques. Interleaved Processing Techniques • • • Multiprocessing – Simultaneous Execution • Coprocessor • Parallel Processing Virtual Memory Spooling If you have multiple CPUs, you can actually run more than one program or task simultaneously. Multiprocessing is the processing of programs or tasks utilizing multiple processors or CPUs. This can either be co-processing where a CPU has specialized slave processor or it can be parallel processing where the CPUs operate at the same level. Virtual Memory Memory is also a scarce resource. Since most of the memory required by a program is not used for long period of time, a hardware-software technique called virtual memory was developed. More programs and data are brought into virtual memory that will fit into actual memory. This virtual memory is kept on hard disk. We might say that RAM is being extended by the hard disk. With virtual memory, variable sized memory segments or fixed sized memory pages are moved from the disk to memory and back as needed. This might seem time consuming but it allows more work to be done on the computer. Spooling Many input and output devices are extremely slow compared to the CPU. For example, if multiple tasks want to print at the same time, the printer can’t be shared between multiple programs. If it were, the printout would be all mixed together. With print spooling, the print first goes to disk and then when the printer is available, it goes to the printer. Input spooling is similar. Personal Operating Systems •Single User •Single Microcomputer Personal operating systems were designed to handle the needs of a single user on a single micro computer. MS-DOS and PC-DOS • • • PC-DOS MS-DOS Windows 3.x – Graphical Shell for DOS When IBM went looking for an operating system for the micro that they were developing, they ended up at Microsoft who up until then specialized in writing language translators. Microsoft showed them one that they got from Seattle Computing. IBM decided to use that one instead of CPM which was the dominant micro OS at the time. The operating system became PC-DOS. When IBM compatibles came out, Microsoft supplied a form of PC-DOS called MS-DOS. Later Microsoft built a graphical shell for DOS called Windows. These versions called 3.x are not full operating systems. They are a shell built on top of DOS. They only support cooperative multitasking. Windows 9X • Windows 95 & Windows 98 Chapter SW1 Page 4 In 1995, Microsoft released Windows 95 and in 1998, Windows 98. The windows 9X OSs are true operating systems although there are some remnants of DOS hanging around that you can see when you boot them up. They have a better graphical interface, preemptive multitasking, plug and play, long filenames, and other improvements. Mac OS (System 8) • Sets the Standard for Graphical Interfaces The look and feel of Windows is similar to MacOS which runs on Apple equipment. Apple started out using Motorola microchips rather than Intel. They now use the PowerPC chip developed by IBM and Motorola. Microsoft initially got their GUI from Apple. But then, Apple copied it from Xerox. NOS - Network Operating Systems We will now look at the the most popular network operating systems (NOSs) found in PC network environments. UNIX • • • • Over Twenty Years Old – Developed at Bell Labs Multi-user, Multitasking Portable Most Popular Internet Server – – www.cs.clemson.edu people.clemson.edu Unix was created over two decades ago at Bell Labs and today is a multi-user, multitasking, network operating system. It is portable because only a very small portion of the OS is developed in a symbolic machine language. The majority is written in the C programming language. To port to a new computer, all that you need is to write that kernel of Unix and a translator for C. Today Unix is the most popular choice as an Internet server system. The computer science system is Unix and the host for your Web pages is Unix. NetWare • • Novell – Most widely used PC LAN NOS Shell Routine – Interface between PC OS and Netware The most widely used micro LAN NOS was developed by Novell and is called Netware. Netware runs on the server only. Novel has routines that interface with other operating systems that allow them to communicate with Netware. Windows NT/2000 • • • Microsoft Built For Client-Server Editions: – – Workstation Server Windows NT was built by Microsoft for client-server networking and powerful processors. There are two editions. NT Workstation is the client for the desktop. NT Server is the server for server functions and network management. It is thought that a Windows 9X successor and a Windows NT successor will be the same program. Utility Programs •Device Drivers –Software to interface OS to hardware •Disk Utilities Chapter SW1 Page 5 The second type of systems software is utility programs. Two common types of utility programs are device drivers and disk utilities. A device driver is a routine that interfaces between the OS and a hardware device. It can be written by the OS authors, the device manufacturer, or someone else. Disk Utilities • • • • Disk Toolkits – Recover disk errors Data Compression – Make files smaller Backup Utilities – Save files Virus – Protect files • Disk Optimizers – Faster disk access There are lots of disk utilities. If you have some type of problem with your hard disk, you might need a disk toolkit to repair it. If you wish to make a file or multiple files smaller to save disk space or so that it will transmit quicker, you might want to use a data compression program such as a Zip program. To backup or save the contents of your hard disk, you would use a backup program. To protect your files against viruses, you would use a virus protection program. To give your disk a tune-up for faster disk access, you use a disk optimizer. Disk Fragmentation A disk optimizer program called Disk Defragmenter comes with with Windows. Many OSs end up spreading files out over the disk in fragments. These utilities defragment the disk by making the files contiguous and compressing them together. It may also reposition system files together or move them near the file directory so that frequently accessed files can be reached quicker. Language Translators Language translators convert programs from a higher level language to machine language. Language Translators • • • Compilers – Translate to machine language Interpreters – Compile as you run Assemblers – Translate symbolic machine language There are three types: A compiler translates a program entirely into machine language. An interpreter reads, translates, and executes a program one line at a time. An assembler converts assembly, which is a symbolic machine language. Some languages use a combination of compiler and interpreter. They compile the code into an intermediate form. This is interpreted by a run time module when the program is run. Chapter SW1 Page 6 Matching 1 A. Path B. Root C. Time sharing D. Booting E. Virtual processing F. OS (Operating System) G. Folder H. Multiprogramming I. Multiprocessing J. Multitasking 1. Collection of programs that manages computer resources 2. Gives each program a slice of time 3. Directory or subdirectory 4. The top or main directory 5. Ordered set of directories leading to a file 6. Loads part of the OS 7. Concurrent (not simultaneous) processing of several programs 8. Enables multiple tasks from a single user to run concurrently. 9. True simultaneous execution of multiple programs Matching 2 A. Intrepreter B. Virtual memory C. Windows NT/2000 D. Unix E. Windows 95/98 F. Compiler G. Spooling H. Defragment I. Netware J. Windows 3.1 1. 2. 3. 4. 5. 6. 7. 8. 9. Most popular Internet server OS Most popular LAN OS Graphical shell Microsoft’s network OS Uses hard disk to “extend” RAM Completely translates a program before execution Translates a program as it is being executed Combines MS/DOS & Win 3.1 Enables data on disk to be accessed faster End of Chapter SW 2 Key Terms Assembler. A language translator that converts assembly-language, a symbolic machine language, instructions into machine language. Boot. The process of loading the operating system into the computer system’s RAM. Compiler. A language translator that converts an entire program into machine language before executing it. Data compression. Squeezing data into a smaller storage space that they would normally require. Device driver. A utility program that enables an operating system to communicate with a specific hardware device. Directory. A collection of files and/or subdirectories grouped under a name of its own. Also called a folder. Disk utility. A utility program that enables an operating system to communicate with a specific hardware device. Interpreter. A language translator that converts program statements line by line into machine language, immediately executing each one. Language translator. A systems program that converts a program from a source language into machine language. MacOS. The operating system for Apple’s Macintosh line of computer systems. MS-DOS. An operating system widely used on early PC-compatible microcomputer systems. Multiprocessing. A technique for simultaneous execution of two or more programs or tasks by multiple processors operating under common control. Multiprogramming. Concurrent execution of two or more programs on a single multi-user computer. Multitasking. A capability of an operating system to execute for a single user two or more programs or tasks concurrently. NetWare. The most widely used operating system on PC LANs. Developed by Novell. Operating system. The main collection of systems software that enables the computer system to manage the resources under its control. Path. An ordered list of directories that lead to a particular file or directory. PC-DOS. The operating system designed for and widely used on early IBM microcomputers. Spooling program. A program that manages input or output by temporarily holding it in secondary storage to expedite processing. Systems software. Computer programs that enable application programs to run on a given set of hardware. Time-sharing. An interleaved processing technique for a multi-user environment in which the computer handles users’ jobs in repeated cycles of time slices. Chapter SW1 Page 7 Unix. A long-standing operating system most commonly used on midrange computers, microcomputer networks, graphics workstations, and the Internet. The most popular Internet server operating system. Utility program. A general-purpose program that performs some frequently encountered operation in a computer system. Virtual memory. A hardware-software technique for extending RAM by using disk where programs are stored in manageable pieces for processing. Windows NT. An operating system designed by Microsoft for client-server (workstation & server) processing and network management. Windows 3.x. A graphical shell created by Microsoft to run in conjunction with DOS. Windows 9X. The true operating system that succeeded the DOS & Windows 3.x combination. Refers to Windows 95 & Windows 98. Chapter SW1 Page 8