OPERATING SYSTEMS Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department 1.

Slides:



Advertisements
Similar presentations
Operating-System Structures
Advertisements

So far Binary numbers Logic gates Digital circuits process data using gates – Half and full adder Data storage – Electronic memory – Magnetic memory –
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Operating System Structures
Part IV: Memory Management
7 Operating Systems Foundations of Computer Science ã Cengage Learning.
Chapter 10 Operating Systems.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Chapter 9 – Real Memory Organization and Management
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
Computer Organization and Architecture
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 9 – Real Memory Organization and Management Outline 9.1 Introduction 9.2Memory Organization.
Part two. 3.2 operating system architecture  Software have two categories  Application software  System software  Application software: consists of.
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
SOFTWARE.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Operating Systems What do you have left on your computer after you strip away all of the games and application programs you bought and installed? Name.
Chapter 3 Memory Management: Virtual Memory
Operating systems CHAPTER 7.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
The Operating Systems Layer
©Brooks/Cole, 2003 Chapter 7 Operating Systems. ©Brooks/Cole, 2003 Define the purpose and functions of an operating system. Understand the components.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Computing and the Web Operating Systems. Overview n What is an Operating System n Booting the Computer n User Interfaces n Files and File Management n.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Processes and OS basics. RHS – SOC 2 OS Basics An Operating System (OS) is essentially an abstraction of a computer As a user or programmer, I do not.
OPERATING SYSTEMS UNIT – I R.SOUJANYA IT Dept. UNIT I Computer System and Operating System Overview Chapter 1: IntroductionIntroduction Overview of Computer.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
© Paradigm Publishing Inc. 4-1 OPERATING SYSTEMS.
Lecture 8: 9/19/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
1 Sec (3.2) Operating System Architecture OS. 2 Software dividing into two categories: 1. Application software 2. System Software  Operating System 
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
OPERATING SYSTEM - program that is loaded into the computer and coordinates all the activities among computer hardware devices. -controls the hardware.
Operating System Principles And Multitasking
Operating Systems COMP 4850/CISG 5550 Basic Memory Management Swapping Dr. James Money.
Computer Systems Week 14: Memory Management Amanda Oddie.
1 Software. 2 What is software ► Software is the term that we use for all the programs and data on a computer system. ► Two types of software ► Program.
Basic Memory Management 1. Readings r Silbershatz et al: chapters
7.1 7 Operating Systems Foundations of Computer Science  Cengage Learning.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 OS 1.
Chapter 7 Operating Systems Foundations of Computer Science  Cengage Learning 1.
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
1 Memory Management n In most schemes, the kernel occupies some fixed portion of main memory and the rest is shared by multiple processes.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 9 – Real Memory Organization and Management Outline 9.1 Introduction 9.2Memory Organization.
7.1 Operating Systems. 7.2 A computer is a system composed of two major components: hardware and software. Computer hardware is the physical equipment.
CPIT 201 King AbdulAziz University Faculty of Computing & Information Technology Information Technology Department CH (7) Operating System CPIT 201 Introduction.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
CT101: Computing Systems Introduction to Operating Systems.
Introduction to Operating Systems Concepts
Memory Management.
Lecture 1-Part 2: Operating-System Structures
Chapter 2 Memory and process management
Understanding Operating Systems Seventh Edition
Chapter 2: Operating-System Structures
Chapter 9 – Real Memory Organization and Management
7 Operating system Foundations of Computer Science ã Cengage Learning.
Operating systems Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department.
Operating System Architecture OS
Chapter 2: System Structures
Operating Systems.
Chapter 2: Operating-System Structures
Windows Operating System
Presentation transcript:

OPERATING SYSTEMS Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department 1

Outline Networks and Communication Department  Define the operating system  Discuss the process of bootstrapping  Identify the components of an operating system  Memory manager  Process manager  Device manager  File manager

Computer System Networks and Communication Department

7.4 Figure 7.1 A computer system

Computer System Networks and Communication Department  A computer is a system composed of 2 major components:  hardware and software.  Computer hardware: is the physical equipment.  Software is the collection of programs that allows the hardware to do its job.

Computer System Networks and Communication Department  Computer software is divided into 2 broad categories:  The operating system and application programs  Application programs: use the computer hardware to solve users’ problems.  The operating system: controls the access to hardware by users.

Operating System Introduction Networks and Communication Department

Operating System Networks and Communication Department An operating system: is an interface between the hardware of a computer and the user (programs or humans) that facilitates the execution of other programs and the access to hardware and software resources Two major design goals of an operating system are:  Efficient use of hardware.  Ease of use of resources.

Bootstrap Process Networks and Communication Department

Bootstrap Process Networks and Communication Department  The operating system is responsible for loading other programs into memory for execution.  However, the operating system itself is a program that needs to be loaded into the memory and be run. How is this dilemma solved?

What is the Bootstrap process? Networks and Communication Department  So a very small section of memory is made of ROM and holds a small program called the bootstrap program (Firmware).  The program is only responsible for loading the operating system itself, or that part of it required to start up the computer, into RAM memory.

Bootstrap Process Networks and Communication Department 1. When the computer is turned on, the CPU counter (a type of the CPU registers) is set to the first instruction of this bootstrap program and executes the instructions in this program. 2. When loading is done, the program counter is set to the first instruction of the operating system in RAM.

7.13 Figure 7.2 The bootstrap process

The typical components of an operating system Networks and Communication Department

Operating System Components Networks and Communication Department  Today’s operating systems are very complex.  An operating system needs to manage different resources in a computer system.  It resembles an organization with several managers at the top level.

Operating System Components Networks and Communication Department  Each manager is responsible for managing their department, but also needs to cooperate with others and coordinate activities.  A modern operating system has at least four duties: memory manager, process manager, device manager and file manager.

OS Components- User interface Networks and Communication Department  Each operating system has a : user interface: a program that accepts requests from users (processes) and interprets them for the rest of the operating system.  A user interface in some operating systems, such as UNIX, is called a shell. In others, it is called a window to denote that it is menu driven and has a GUI (graphical user interface) component.

User Operating System Interface - CLI Networks and Communication Department  Command Line Interface (CLI) or command interpreter allows direct command entry  Which is an operating system shell that uses alphanumeric characters typed on a keyboard to provide instructions and data to the operating system, interactively.

User Operating System Interface - GUI Networks and Communication Department  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)  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 (Java Desktop, KDE)

OS Components- Memory manager Networks and Communication Department  Although the memory size of computers has increased tremendously in recent years, so has the size of the programs and data to be processed.  Memory allocation must be managed to prevent applications from running out of memory.  Operating systems can be divided into two broad categories of memory management: monoprogramming and multiprogramming.

Monoprogramming Networks and Communication Department  In monoprogramming, most of the memory capacity is dedicated to a single program.  only a small part is needed to hold the operating system.  In this configuration, the whole program is in memory for execution.  When the program finishes running, the program area is occupied by another program.

Monoprogramming Networks and Communication Department Figure shows memory in Monoprogramming a environment

Monoprogramming (Cont.) Networks and Communication Department  There are several problems with this technique: If the size of memory is less than the size of the program, can the program run?  the program cannot be run  Inefficient use of memory and CPU time

Multiprogramming Networks and Communication Department  In multiprogramming:  more than one program is in memory at the same time and they are executed concurrently  with the CPU switching rapidly between the programs

Multiprogramming Networks and Communication Department Figure shows memory in a multiprogramming environment

Categories of multiprogramming Networks and Communication Department

Multiprogramming (Cont.) Networks and Communication Department

Multiprogramming (Cont.) Networks and Communication Department  Nonswapping category:  This means that the program remains in memory for the duration of execution  Two techniques belong to the this category: Partitioning paging

Multiprogramming (Cont.) Networks and Communication Department  Swapping category:  This means that, during execution, the program can be swapped between memory and disk one or more times.  Two techniques belong to the this category: Demand paging Demand segmentation

Partitioning Networks and Communication Department  The first technique used in multiprogramming.  Memory is divided into variable length sections  Each section or partition holds one program  The CPU switches between programs  With this technique, each program is entirely in memory and occupying contiguous locations

Partitioning- how its work ?! Networks and Communication Department 1. The CPU starts with one program, executing some instructions until it either encounters an input/output operation or the time allocated for that program has expired 2. Then, it saves the address of the memory location where the last instruction was executed and moves to the next program. 3. The same procedure is repeated with the second program 4. After all the programs have been served, the CPU moves back to the first program

Partitioning- how its work ?! (Cont.) Networks and Communication Department  Priority levels can be used to control the amount of CPU time allocated to each program  Its improves the efficiency of the CPU, but there are still some issues

Partitioning- how its work ?! (Cont.) Networks and Communication Department Figure shows memory with partitioning technique

Partitioning issues Networks and Communication Department  The size of the partitions has to be determined beforehand by the memory manager what will happen if partition sizes are small or large?!  The memory manager can compact the partitions to remove the holes and creates new partitions, but this creates extra overhead on the system

Paging Networks and Communication Department  Paging improves the efficiency of partitioning  Memory is divided into equally sized sections called frames  Programs are also divided, into equally sized sections called pages  The size of a page and frame is usually the same and equal to the size of the block used by the system to retrieve information from a storage device

Paging - how its work!! Networks and Communication Department  A page is loaded into a frame in memory  The program does not have to be contiguous in memory  There is no need for the new program to wait until set of contiguous frames are free before being loaded into memory

Paging - how its work!! Networks and Communication Department Figure shows memory with paging technique

Paging issues Networks and Communication Department  The whole program still needs to be in memory before being executed  Ex: A program has six pages, cannot be loaded into memory if there are only four unoccupied frames

Demand paging Networks and Communication Department  In this technique the program is divided into pages  but the pages can be loaded into memory one by one, executed, and replaced by another page.  In addition, a page can be loaded into any free frame

Demand paging (Cont.) Networks and Communication Department  An example of demand paging is shown in figure below. Two pages from program A, one page from program B, and one page from program C are in the memory

Demand segmentation Networks and Communication Department  A technique similar to paging is segmentation  A programmer thinks in terms of modules  A program is usually made up of a main program and subprograms  In demand segmentation, the program is divided into segments that match the programmer’s view  These are loaded into memory, executed, and replaced by another module from the same or a different program  since segments in memory are of equal size, part of a segment may remain empty

Demand segmentation Networks and Communication Department An example of demand segmentation is shown in figure

Demand paging and segmentation Networks and Communication Department  Demand paging and segmentation can be combined to further improve the efficiency of the system  A segment may be too large to fit any available free space in memory  Memory can be divided into frames, and module can be divided into pages  The pages of a module can then be loaded into memory one by one and executed