Operating Systems. Instructor: Dmitri A. Gusev. Spring Lecture 16, April 17, CSC : Introduction to Computer Science

Similar documents
For The following Exercises, mark the answers True and False

Chapter 5: CPU Scheduling

Memory Management. 3. What two registers can be used to provide a simple form of memory protection? Base register Limit Register

The Memory Management Unit. Operating Systems. Autumn CS4023

Scheduling of processes

CS418 Operating Systems

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

Roadmap. Tevfik Koşar. CSC Operating Systems Spring Lecture - XII Main Memory - II. Louisiana State University

CS370 Operating Systems

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

CS307 Operating Systems Main Memory

CPU Scheduling Algorithms

Operating Systems Unit 6. Memory Management

Main Memory (Part I)

Scheduling. The Basics

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

Chapter 6: CPU Scheduling

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

So far. Next: scheduling next process from Wait to Run. 1/31/08 CSE 30341: Operating Systems Principles

1.1 CPU I/O Burst Cycle

Memory Management. Jo, Heeseung

OPERATING SYSTEM. Functions of Operating System:

Chapter 8: Memory Management. Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

Operating Systems. Memory Management. Lecture 9 Michael O Boyle

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition

Process behavior. Categories of scheduling algorithms.

Operating systems. Part 1. Module 11 Main memory introduction. Tami Sorgente 1

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

CPU Scheduling: Part I ( 5, SGG) Operating Systems. Autumn CS4023

Chapter 7 Memory Management

3. CPU Scheduling. Operating System Concepts with Java 8th Edition Silberschatz, Galvin and Gagn

CS3733: Operating Systems

EECE.4810/EECE.5730: Operating Systems Spring 2017 Homework 3 Solution

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation

Operating Systems (2INC0) 2017/18

FCM 710: Architecture of Secure Operating Systems

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit

Properties of Processes

CPU Scheduling. Rab Nawaz Jadoon. Assistant Professor DCS. Pakistan. COMSATS, Lahore. Department of Computer Science

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

LECTURE 3:CPU SCHEDULING

MEMORY MANAGEMENT. Jo, Heeseung

Ch 4 : CPU scheduling

Chapter 9: Memory Management. Background

CHAPTER 2: PROCESS MANAGEMENT

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies

Chapter 8: Memory Management

CS370 Operating Systems

Memory Management. Contents: Memory Management. How to generate code? Background

Background. Contiguous Memory Allocation

Part Three - Memory Management. Chapter 8: Memory-Management Strategies

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

Chapter 8: Main Memory

CS 322 Operating Systems Practice Midterm Questions

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013

Memory Management. Memory Management

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006

Uniprocessor Scheduling. Aim of Scheduling

Uniprocessor Scheduling. Aim of Scheduling. Types of Scheduling. Long-Term Scheduling. Chapter 9. Response time Throughput Processor efficiency

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

Chapter 8: Memory-Management Strategies

Uniprocessor Scheduling. Chapter 9

Last Class: Processes

TDIU25: Operating Systems II. Processes, Threads and Scheduling

CS370 Operating Systems

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling

Chapter 8: Main Memory

CPU scheduling. Alternating sequence of CPU and I/O bursts. P a g e 31

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management

Lecture 2 Process Management

Module 8: Memory Management

Chapter 2 SOFTWARE CONCEPTS

Chapter 8: Main Memory

Techno India Batanagar Department of Computer Science & Engineering. Model Questions. Multiple Choice Questions:

Chapters 9 & 10: Memory Management and Virtual Memory

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

Module 9: Memory Management. Background. Binding of Instructions and Data to Memory

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

(b) External fragmentation can happen in a virtual memory paging system.

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

Model answer of AS-4159 Operating System B.tech fifth Semester Information technology

Chapter 8: Main Memory

MYcsvtu Notes. Unit - 1

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

Last Class: Deadlocks. Where we are in the course

Chapter 8: Memory Management Strategies

Wait-For Graph. Exercise. Wait-For Graph. Today. Comp 104: Operating Systems Concepts. Corresponding Wait-For Graph 13/01/2014. Process Scheduling

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

CS307: Operating Systems

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

CS420: Operating Systems

MEMORY MANAGEMENT/1 CS 409, FALL 2013

Transcription:

Operating Systems Instructor: Dmitri A. Gusev Spring 2007 CSC 120.02: Introduction to Computer Science Lecture 16, April 17, 2007

Functions of an Operating System The operating system (OS) is the core of the system software. It manages computer resources (memory, input/output devices) and provides an interface for human-computer interaction (HCI). Computer hardware is wired to initially load a small set of system instructions stored in permanent (nonvolatile) memory (ROM). Its popular name, BIOS, stands for Basic Input/Output System. BIOS boots the computer by loading a larger portion of systems software, usually from the hard disk. Nowadays, BIOS usually resides on EEPROM (Electrically Erasable Programmable Read-Only Memory) or flash memory. The terms dual-boot and multi-boot system apply to computers that have two or more operating systems, respectively.

Functions of an Operating System (cont d) Multiprogramming is the technique of keeping multiple programs in main memory at the same time. Memory management means keeping track of what programs are in memory and where in memory they reside. A program in execution is called a process. A process may get interrupted during execution. A context switch is the procedure of storing and restoring the state (context) of a CPU so that multiple processes can share a single CPU resource. Process management means keeping track of information for active processes. CPU scheduling determines which process in memory is executed by the CPU at any given point.

Batch Processing In a modern operating system, a batch is a system in which programs and system resources are coordinated and executed without interaction between the user and the programs.

Time-Sharing Time-sharing refers to sharing a computing resource among many users by multitasking. Multitasking is a method by which multiple tasks, also known as processes, share common processing resources such as a CPU. In a time-sharing system, each user has a virtual machine. Early time-sharing systems were written for large mainframes. Modern time-sharing systems support connection of multiple users to computers via networks.

Real-Time Systems A real-time system is a system in which response time is crucial given the nature of the application domain.

Response Time Response time is the time between receiving a stimulus and producing a response.

Memory Management A logical address is a reference to a stored value relative to the program making the reference. A physical address is an actual address in the main memory device. The mapping of a logical address to a physical address is called address binding.

Single Contiguous Memory Management Operating system Application program physical_address = base + logical_address

Partition Memory Management Fixed-partition technique: Main memory is divided into a specific number of partitions into which programs are loaded Dynamic-partition technique: Main memory is divided into partitions as needed to accommodate programs The base register holds the beginning address of the current partition The bounds register stores the length of the current partition Three general approaches to partition selection: First fit: The first partition big enough to hold the program is allocated to it Best fit: The smallest partition big enough to hold the program is allocated to it Worst fit: The largest partition big enough to hold the program is allocated to it

Paged Memory Management Processes are divided into fixed-size pages and stored in memory frames when loaded The operating system maintains a separate pagemap table (PMT) for each process in memory A logical address is invalid if (a) the page number is out of bounds for the process, and/or (b) the offset is larger than the frame size Demand paging: Pages are brought into memory only when referenced (on demand) Virtual memory: The illusion that there is no restriction on program size Thrashing: Inefficient processing caused by constant page swapping

Process Management Process states: new [being created], ready [waiting for the CPU only], waiting [for resources other than the CPU], running, terminated. Process control block (PCB) is the data structure used by the operating system to manage information about a process

CPU Scheduling Non-preemptive scheduling: The currently executing process must give up the CPU voluntarily in order for another process to run Preemptive scheduling: The operating system may decide to favor another process, preempting the current process Turnaround time: The time elapsed between a process s arrival in the ready state and its termination

Scheduling Approaches First-Come, First-Served (FCFS): Nonpreemptive Shortest Job Next (SJN): Also nonpreemptive; it s hard to know which job would run for the shortest time! Round robin: A time slice given to each process before being preempted is established