Operating System Overview and Structure PDF
Document Details
Uploaded by PositiveStar
جامعة الدمام
Prof.Haytham Al-Feel
Tags
Summary
This document provides an overview of operating systems, focusing on their structure, evolution, and key functions. It explores the key concepts of operating systems, starting with early systems and progressing through to modern time-sharing models. In addition, it provides examples of system calls and the relationship between APIs, system calls and the OS.
Full Transcript
OPERATING SYSTEM OVERVIEW Operating Systems: Internals and AND STRUCTURE Design Principles Prof.Haytham Al-Feel Book Name: Operating Systems : Internals and Design Principles, by William Stallings OPERATING-SYSTEM STRUCTURES Operating System Object...
OPERATING SYSTEM OVERVIEW Operating Systems: Internals and AND STRUCTURE Design Principles Prof.Haytham Al-Feel Book Name: Operating Systems : Internals and Design Principles, by William Stallings OPERATING-SYSTEM STRUCTURES Operating System Objectives and Functions The Evolution of Operating Systems Operating System Services User Operating System Interface System Calls System Programs Operating System Objectives and Functions The Operating System as a User/Computer Interface The Operating System as Resource Manager Ease of Evolution of an Operating System The Evolution of Operating Systems Serial Processing Simple Batch Systems Multiprogrammed Batch Systems Time-Sharing Systems Developments Leading to Modern Operating Systems LEARNING OBJECTIVES After studying this chapter, you should be able to: Summarize, at a top level, the key functions of an operating system (OS). Discuss the evolution of operating systems for early simple batch systems to modern complex systems. To discuss the various ways of structuring an operating system A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals: Execute user programs and make solving user problems easier. Make the computer system convenient to use. Use the computer hardware in an efficient manner. Computer system can be divided into four components Hardware – provides basic computing resources CPU, memory, I/O devices Operating system Controls and coordinates use of hardware among various applications and users Application programs Define the ways in which the system resources are used to solve the computing problems of the users. e,.g Word processors, compilers, web browsers, database systems, video games Users People, machines, other computers There are many definitions for the O.S such as: OS is a resource allocator Manages all resources Decides between conflicting requests for efficient and fair resource use OS is a control program Controls execution of programs to prevent errors and improper use of the computer, it receives many requests and decide which one will execute first. “The one program running at all times on the computer” is the kernel. 1. Convenience: An OS makes a computer more convenient to use. 2. Efficiency: An OS allows the computer system resources to be used in an efficient manner. 3. Ability to evolve: An OS should be constructed in such a way as to permit the effective development. A computer is a set of resources for the movement, storage, and processing of data The OS is responsible for managing these resources A major OS will evolve over time for a number of reasons: Hardware upgrades New types of hardware New services Fixes Stages include: 4. Time Sharing 3. Multiprogrammed Systems Batch Systems 2. Simple Batch Systems 1. Serial Processing Earliest Computers: Problems: No operating system Scehduling: programmers interacted directly with the most installations used a hardcopy computer hardware sign-up sheet Computers ran from a console time allocations resulting in wasted computer time Setup time: amount of time was spent just on setting up the program to run Early computers were very expensive, the wasted time due to scheduling and setup time was unacceptable. To improve utilization, the concept of a batch OS was developed. The central idea behind the simple batch-processing scheme is the use of a piece of software known as the monitor. -jobs are submitted to computer operator who (monitor) batches them together sequentially and places them on an input device -program branches back to the monitor when finished, the monitor automatically begins loading the next program. SIMPLE BATCH SYSTEM OVERHEAD With a batch OS, Processor time alternates between execution of user programs and execution of the monitor. There have been two some main memory is now given over to the monitor some processor time is consumed by the monitor Despite overhead, the simple batch system improves utilization of the computer The processor spends a certain amount of time executing, until it reaches an I/O instruction; it must then wait until that I/O instruction concludes before proceeding Also known as multitasking multiprogramming increases the CPU utilization according to the organization of different jobs. The O.S holds a number of jobs in memory simultaneously and if the number of jobs available in memory less than the jobs available in the job pool, then the O.S will execute one of the jobs available in memory. Job Pool: All jobs entered the O.S memory is expanded to hold three, four, or more programs and switch among all of them Multiprogramming is the central theme of modern operating systems. Can be used to handle multiple interactive jobs Processor time is shared among multiple users Multiple users simultaneously access the system through terminals, with the OS interleaving the execution of each user program in a short burst or quantum of computation Is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running creating interactive computing. Response Time should be less than 1 second. Each user should has at least one program executing in memory (process). If several jobs ready to run at the same time (CPU Scheduling). If processes don’t fit in memory, swapping moves them in and out to run. Operating Systems are among the most complex pieces of software ever developed Major advances in development include: Processes Memory management Information protection and security Scheduling and resource management Resource allocation : When multiple users or multiple jobs running concurrently, resources must be allocated to each of them. Protection and security - The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other Protection involves ensuring that all access to system resources is controlled Security of the system from outsiders requires user authentication Program development: The OS provides a variety of facilities and services, such as editors and debuggers , to assist the programmer in creating programs. Program execution: A number of steps need to be performed to execute program. Instructions and data must be loaded into main memory, I/O devices and files must be initialized, and other resources must be prepared. User interface - Almost all operating systems have a user interface (UI) Varies between Command-Line Interface (CLI), Graphics User Interface (GUI), Batch I/O operations - A running program may require I/O, which may involve a file or an I/O device File-system manipulation - The file system is of particular interest. Obviously, programs need to read and write files and directories, create and delete files, search them, list file information, permission management to allow or deny access to files or directories based on file ownership USER OPERATING SYSTEM INTERFACE - CLI CLI (Command Line Interface) allows direct command entry Sometimes implemented in kernel, sometimes by systems program Primarily fetches a command from user and executes it Sometimes commands built-in, sometimes just names of programs User-friendly desktop 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) Many systems now include both CLI and GUI interfaces Microsoft Windows is GUI with CLI “command” shell Apple Mac OS X GUI interface with UNIX kernel underneath and shells available System calls provide an interface to the services provided by the OS Typically, it is routines written in a high-level language (C or C++) Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call use System call sequence to copy the contents of one file to another file The handling of a user application invoking the open() system call (a) At system startup (b) running a program System programs (system utilities) provide a convenient environment for program development and execution. They can be divided into: File manipulation Status information File modification Programming-language support Program loading and execution Communications Application programs Most users’ view of the operation system is defined by system programs, not the actual system calls Any Questions!