Summary

This document provides an overview of operating systems. It explores the fundamental concepts and functionalities of different operating systems, touching on topics like user interface, system components, and kernel mode/user mode.

Full Transcript

, OPERATING SYSTEMS LESSON 1 Overview of the Operating Systems - Prelim ✔ TOPIC OUTLINE ▪ Explain the operating system environment. ✔ BEFORE THE DISCUSSION Defin...

, OPERATING SYSTEMS LESSON 1 Overview of the Operating Systems - Prelim ✔ TOPIC OUTLINE ▪ Explain the operating system environment. ✔ BEFORE THE DISCUSSION Define the following: 1. Operating System 2. Hardware 3. Application Programs 4. Users ✔ TOPIC DISCUSSION Operating System 1 An operating system is - The most important software that runs on a computer. - An integrated set of programs that acts as an intermediary between the user and computer hardware. - Responsible for everything from the control and allocation of memory to recognizing input from external devices and transmitting output to computer displays. - Operating systems usually come preloaded on the desktop and laptop computers. - Most people use the operating system that comes with their computer, but it is possible to upgrade or even change operating systems. - The three most common operating systems for personal computers are - Microsoft Windows, Apple Mac OS X, and Linux. OPERATING SYSTEMS Goal of Operating System - PRIMARY: to make the computer system convenient to use in an efficient manner. - SECOND: to manage the resource of a computer system. It is considered the backbone of a computer, managing both software and hardware resources. - Manage files on computer hard drives and control peripherals, like printers and scanners. Without an operating system, a computer is useless. Operating System’s Job Booting is the process that occurs when we press the power button to turn computer on. At the end of that process, the operating system loads. From this point: 2 - The OS begins to do its job of controlling the way in which the computer functions. - The operating system serves as the boss, or manager, and makes sure all the various parts of the computer get what they need. Users may work on a Word document, print an email, and have Internet browser open for web surfing, all at the same time. These three programs need attention from the central processing unit (CPU) to do whatever task that the users are telling it to do. These programs need memory and storage, and need to be able to send messages to devices such as the mouse and the printer to accomplish these tasks. The operating system is responsible for handling these areas, as well as processor and network management. User Mode/Kernel Mode USER MODE: - A mode of the CPU when running a program. - In this mode, the user process has no access to the memory locations used by the kernel. - When a program is running in User Mode, it cannot directly access the kernel data structures or the kernel programs. KERNEL MODE: - A mode of the CPU when running a program. - In this mode, it is the kernel that is running on behalf of the user process and directly access the kernel data structures or the kernel programs. - Once the system call returns, the CPU switches back to user mode. Basic Functions of Operating Systems Managing resources: 3 - These programs coordinate all the computer’s resources including keyboard, mouse, printer, monitor, storage devices and memory. - An operating system creates a file structure on the computer hard drive where user data can be stored and retrieved. - When a file is saved, the operating system saves it, attaches a name to it, and remembers where it put the file for future use. - The way an operating system organizes information into files is called the file system. - Most operating systems use a hierarchical file system, which organizes files into directories (folders) under a tree structure. Providing a user interface: - Users interact with application programs and computer hardware through a user interface. - Almost all operating systems today provide a windows-like Graphical User Interface (GUI) in which graphic objects called icons are used to represent commonly used features. Running applications: - These programs load and run applications such as word processors and spreadsheets. - Most operating systems support multitasking, or the ability to run more than one application at a time. - When a user requests a program, the operating system locates the application and loads it into the primary memory or RAM of the computer. - As more programs are loaded, the operating system must allocate the computer resources. Support for built-in utility programs: - The operating system uses utility programs for maintenance and repairs. - Utility programs help identify problems, locate lost files, repair damaged files, and backup data. Types of Operating System 4 1. Monolithic 2. Layered 3. Microkernel 4. Networked/Distributed Monolithic The components of monolithic operating system are: - Organized haphazardly and any module can call any other module without any reservation. Applications in monolithic OS are: - Separated from the operating system itself The operating system code runs - In a privileged processor mode (referred to as kernel mode), with access to system data and to the hardware; applications run in a non- privileged processor mode (called as user mode), with a limited set of interfaces available and with limited access to system data. When a user-mode program calls a system service: - The processor traps the call and then switches the calling thread to kernel mode. - Upon completion, thread switched back to the user mode, by the operating system and allows the caller to continue. - It delivers better application performance, but extending such a system can be difficult work because modifying a procedure can introduce bugs in seemingly unrelated of the system. The example of this structure like a MS-DOS. Layered The components of layered OS are: - Organized into modules and layers them on top of the other. - Each module provides a set of functions that other module can call. 5 - Interface functions at any particular level can invoke services provided by lower layers but not the other way around. - A layer does not need to know how these services are implemented, it needs to know only what the service do. Advantage of layered structure: - Each layer is given access to only lower-level interfaces (Nth layer can access services provided by N-1th layer and provide services on N+1th layer). - Allow the OS to be debugged starting at the lowest layer. - Easier to enhance the OS, one entire layer can be replaced without affecting other parts of the system. Disadvantage of layered structure: - Delivers low application performance in comparison to monolithic OS. Example: UNIX Microkernel Moves as much from kernel into “user” space The main function of the microkernel is: - To provide communication facility between the client program and the various services that is also running in user space. Communication takes place between user modules using message passing. - If the client program wishes to access a file, it must interact with the server. - The client program and the service never interact directly, they communicate indirectly by exchanging messages with microkernel. Benefits: - Easier to extend microkernel. - Easier to port the operating system to new architecture. - More reliable (less code running in kernel mode). - More secure. Example: Windows NT. 6 Networked and Distributed 1. Network Operating System (NOS) - Loosely-coupled operating system for heterogeneous multicomputer (LAN and WAN). - Offer local services to remote clients. Characteristics of NOS - Extension of centralized operating systems. - Offer local services to remote clients. - Each processor has own operating system. - User owns a machine, but can access others (e.g. rlogin, telnet) - No global naming of resources. - System has little fault tolerance Example: UNIX, Windows NT, 2000 2. Distributed Operating System (DOS) - Tightly-coupled operating system for multi-processors and homogeneous multicomputer. - Hide and manage hardware resources. Characteristics of DOS - Allows multiprocessor multicomputer network resources to be integrated as a single system image. - Hide and manage hardware and software resources. - Provide heterogeneity support. - Control network in most effective way. - Remote file and device access. - Synchronization and deadlock avoidance. - Resource allocation and protection. - Global resource sharing. - Deadlock avoidance. 7 - Communication security. - No examples in general use but many research systems: Amoeba, Chorus etc. Comparison of DOS and NOS Architecture of OS 1. Single Processor System 2. Multi-Processor System 3. Cluster System Single Processor System Most systems use single processor systems. They perform only one process at a given time, and it carries out the next process in the queue only after the current process is completed. OS monitors the status of them and also sends them next executable instruction. It relieves CPU of disk scheduling and other tasks. 8 It is suitable for general purpose computers, as it cannot run multiple processes in parallel. Multi-Processor System Also known as parallel or tightly coupled systems as they can run multiple processes in parallel to each other efficiently. Two or more processors will be in close communication with each other with shared memory, storage and power supply. Cluster System Clustering allows two or more systems to share storage. Provides high reliability. Asymmetric clustering: one server runs the application or applications while other servers’ standby. Symmetric clustering: all N hosts are running the application or applications. Product of OS 1. Closed Source System 2. Open Source System Closed Source System Developed by Companies and developers work for economic purposes. Users may suggest requirements but they may or may not be implemented. Release is not too often. There may be only yearly releases. Market believes commercial CSS is highly secure because it is developed by a group of professionals confined to one geographical area under a strict time schedule. - But quite often this is not the case, hiding information does not make it secure, it only hides its weaknesses. Security cannot be enhanced by modifying the source code. 9 Example: WINDOWS Open Source System Developed by Volunteers work for peer recognition. - People know that recognition as a good developer has great advantage. User suggests additional features that often get implemented. Software is released on a daily or weekly basis. OSSD is not market driven; it is quality driven. - Community reaction to bug reports is much faster compared to CSSD which makes it easier to fix bugs and make the component highly secure. The ability to modify the source code could be a great advantage if you want to deploy a highly secure system? Example LINUX Concepts in Relation to Operating System Multitasking The ability to execute more than one task at the same time, a task being a program. In multitasking, only one CPU is involved, but it switches from one program to another so quickly that it gives the appearance of executing all of the programs at the same time. There are two basic types of multitasking: - Preemptive o The operating system parcels out CPU time slices to each program. o Example: Windows 95, Windows NT, Amiga operating system and UNIX. - Cooperative o Each program can control the CPU for as long as it needs it. If a program is not using the CPU, however, it can allow another program to use it temporarily. 10 o Example: Microsoft Windows 3.x and the MultiFinder (for Macintosh computers). Multiprogramming Multiprogramming is the technique of running several programs at a time using timesharing. It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism. The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating system selects a job from the job pool and starts executing a job, when that job needs to wait for any i/o operations the CPU is switched to another job. Example of multiprogramming, we listen to music and do internet browsing at the same time (they execute parallel). Time-Sharing The use of a computer system by more than one individual at the same time. Time-sharing runs separate programs concurrently by interleaving portions of processing time allotted to each program (user). Time-sharing, however, is generally associated with multiple users accessing larger computers and service organizations, whereas multitasking in functions related to microcomputers implies the performance of multiple tasks for a single user. Buffering A temporary storage area, usually in RAM. Store data in memory while transferring between devices. The purpose of most buffers is to act as a holding area, enabling the CPU to manipulate data before transferring it to a device. 11 - Because the processes of reading and writing data to a disk are relatively slow, many programs keep track of data changes in a buffer and then copy the buffer to a disk. For example: - Word processors employ a buffer to keep track of changes to files. Then when you save the file, the word processor updates the disk file with the contents of the buffer. This is much more efficient than accessing the file on the disk each time you make a change to the file. Commonly used when: - Burning data onto a compact disc, where the data is transferred to the buffer before being written to the disc. - Printing documents. When you enter a PRINT command, the operating system copies your document to a print buffer (a free area in memory or on a disk). Spooling Spool stands for “simultaneous peripheral operations online”. A spool is a buffer that holds output for a device, such as a printer that cannot accept interleaved data streams. Spooling refers to: - Process of transferring data by placing it in a temporary working area where another program may access it for processing at a later point in time. Although a printer can serve only one job at a time: - Several applications may wish to print their output concurrently, - Without having their output mixed together. - Operating system solves this problem by intercepting all output to the printer. Each application's output is spooled to a separate disk file. - When an application finishes printing, the spooling system queues the corresponding spool file for output to the printer. The spooling system copies the queued spool files to the printer one at a time. 12 Without a spooler, the OS would allow data to pass to the printer and the application program would wait for completion before continuing. Caching A cache is a temporary storage area that keeps data available for fast and easy access. For example, the files you automatically request by looking at a web page are stored on your hard disk in a cache subdirectory under your browser’s directory. When you return to a page that you have recently viewed, the browser can get those files from the cache rather than from the original server, saving you time and saving the network the burden of additional traffic. Caching (verb, pronounced “cashing”) is the process of storing data in a cache. Components of Operating System 1. Kernel 2. Shell 3. File System Kernel Represents the OS basic functions such as: - management of memory - processes - files - main inputs/outputs - communication functionalities Shell Allowing communication with the operating system via a control language. Letting the user control the peripherals without knowing the characteristics of the hardware used. 13 Management of physical addresses, etc. File System A file system (sometimes written filesystem) is the way in which files are named and where they are placed logically for storage and retrieval. Operating System Interfaces VOICE ACTUATED COMMAND GRAPHICAL USER LINE INTERFACE (GUI) WEB FORM User Interface A user interface is: - The system by which people (users) interact with a machine. The user interface includes hardware (physical) and software (logical) components. User interfaces exist for various systems, and provide a means of: - Input, allowing the users to manipulate a system. - Output, allowing the system to indicate the effects of the users' manipulation. 14 Users may also interact with the operating system with some kind of software user interface like typing commands by using command line interface (CLI) or using a graphical user interface. For hand-held and desktop computers, the user interface is generally considered part of the operating system. On large multi-user systems such as Unix-like systems, the user interface is generally implemented as an application program that runs outside the operating system. Components of the User Interface The user interface has two main components: - Presentation language - which is the computer-to-human part of the transaction. - Action language - characterizes the human-to-computer portion. 1. Voice User Interface A Voice User Interface (VUI) makes human interaction with computers possible through a voice/speech platform in order to initiate an automated service or process. - The interface to any speech application. There are two different types of voice recognition: - Continuous speech systems, allowing for dictation. - Speaker independence, so people can enter commands or words at a given workstation. 2. Graphical User Interface (GUI) A graphical user interface or GUI is: - A type of user interface item that allows people to interact with programs in more ways than typing such as computers. Examples: - Hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment with images rather than text commands. 15 A GUI offers graphical icons, and visual indicators, as opposed to text- based interfaces, typed command labels or text navigation to fully represent the information and actions available to a user. Characteristics Description Windows Multiple windows allow different information to be displayed simultaneously on the user’s screen. Icons Icons different types of information on some systems. On some systems, icons represent files. Can also represent processes. Pointing A pointing device such as mouse is used for selecting choices from a menu or indicating items or interest in a window. Graphics Graphical elements can be mixed with text on the same display. 3. Web Form Interfaces Web Form interfaces are onscreen forms displaying fields containing data items or parameters that need to be communicated to the user. Web Form interfaces may be implemented using the Web. A Web Form allows a user to enter data that is sent to a server for processing. Web forms resemble paper forms because internet users fill out the forms using checkboxes, radio buttons, or text fields. 16 - For example, Web Forms can be used to enter shipping or credit card data to order a product or can be used to retrieve data (e.g.: searching on a search engine). In addition to functioning as input templates for new information, Web Forms can also be used to query and display existing data in a similar manner to mail merge forms, with the same advantages. Web Form Interface 4. Command-Line Interface CLI are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. Examples of CLI application: 17 ✔ Activity I. True or False 1. Operating System is the most important software that runs on a computer. 2. The primary goal of operating system is to manage the resource of a computer system. 3. Without operating system, a computer is useless. 4. Booting is the process that occurs when we press the power button to turn the computer off. 5. Most operating system support multitasking. 6. Kernel mode is a mode of the CPU when running a program. 7. The way an operating system organizes information into files is called the file system. 8. Application in layered OS is separated from the operating system itself. 9. When a user-mode program calls a system service, the processor traps the call and then switches the calling thread to kernel mode. 10. Layered advantage is it delivers low application performance in comparison to monolithic OS. 11. An example of Microkernel is Windows NT. 12. Distributed Operating System has no global naming of resources. 13. Network Operating System is not fault-tolerant. 14. Single processor system provides high reliability. 15. Symmetric clustering means all N hosts are running the application or applications. II. Essay 1. Differentiate closed and open source system and give example each. 2. Discuss the components of operating system. 18 ✔ References Rafiuddin, A. (2017). Introduction to Operating System. Retrieved 2020, from SlideShare: https://www.slideshare.net/AisyahRafiuddin/chapter-1-introduction-to- operating-system-71170404 19

Use Quizgecko on...
Browser
Browser