Chapter 2 Memory Management: Early Systems. Understanding Operating Systems, Fourth Edition

Size: px
Start display at page:

Download "Chapter 2 Memory Management: Early Systems. Understanding Operating Systems, Fourth Edition"

Transcription

1 Chapter 2 Memory Management: Early Systems Understanding Operating Systems, Fourth Edition

2 Memory Management: Early Systems Memory is second only to processes in importance (and in intensity) with which its managed by the OS Tanenbaum. 2

3 Memory Management Ideally programmers want memory that is large fast non volatile Memory management done by OS memory manager Special purpose hardware Memory hierarchy small amount of fast, expensive memory cache some medium-speed, medium price main memory Gigabytes of slow, cheap disk storage Translate these speeds to human scale 3

4 Memory Management Memory Management means Being aware of what parts of the memory are in use and which parts are not Allocating memory to processes when they request it and de-allocating memory when a process releases it Moving data from memory to disc, when the physical capacity becomes full, and vice versa. Stopping programs interfering with memory that doesn t belong to them 4

5 Memory Management: Early Systems Types of memory allocation schemes: Single-user systems Fixed partitions Dynamic partitions Relocatable dynamic partitions 5

6 Single-User Contiguous Scheme Program is loaded in its entirety into memory and allocated as much contiguous space in memory as it needs Jobs processed sequentially in single-user systems Requires minimal work by the Memory Manager Register to store the base address Accumulator to keep track of the program size One ie BIOS Embedded System DOS 6

7 Memory Protection in Single-User Contiguous Scheme To properly implement this scheme a boundary register is needed Special purpose H/W must be designed into CPUs the contents of the register can only be modified by special privileged instruction When a process references memory the system checks if its outside its boundary Inside: then service the request Outside: Error message and terminate program Of course the user program must access the OS from time to time to perform I/O for example Does this through system calls The system detects the call and switches to kernel mode or executive mode 0x123 CPU boundary register 0x123 7

8 Single-User Contiguous Scheme (continued) Disadvantages of Single-User Contiguous Scheme: Doesn t support multiprogramming Mono-programming is unacceptable for modern user Modern users will not suffer the delay of swapping programs in/out to the hard disk Not cost effective Multiprogramming makes more effective use of the CPU... When a single process is doing I/O the CPU is inactive 8

9 The secret is multiprogramming can improve the utilization of the CPU But now the problem is : how do we to organize the available memory so all the programs can reside there? 9

10 Memory Management: Early Systems Types of memory allocation schemes: Single-user systems Fixed partitions Dynamic partitions Relocatable dynamic partitions 10

11 Fixed Partitions Main memory is partitioned; one partition/job Partitions can be different sizes The partition sizes remain static unless and until computer system is shut down, reconfigured, and restarted Must remember where each space is in memory Also requires protection of the job s memory space Requires matching job size with partition size Allows multiprogramming 11

12 Fixed Partitions (continued) To allocate memory spaces to jobs, the operating system s Memory Manager must keep some sort of table. A very simple example is shown below: Table 2.1: A simplified fixed partition memory table with the free partition shaded 12

13 Fixed Partitions (continued) Job1 is allocated first space large enough to accommodate it Job 2 is allocated next available space large enough to accommodate it Job 3? No partition big enough to accommodate it even though 70K of free space is available in Partition 1 where Job 1 occupies only 30K of the 100K available but unfortunately Job 1 owns all of this partition. 13

14 Fixed Partitions (continued) Programmers In the earliest multi-programming systems the programmer translated the job using an absolute assemble or compiler This meant that the process had a pre-defined precise location defined for it in memory The process could only run in that space If that partition was occupied (while others were free) then this resulted in inefficiencies. To overcome this problem programmers created (more complex) relocating compilers, assemblers, and loaders. These programs produced a relocatable program that could run in any available (big enough) partition 14

15 Fixed Partitions (continued) Disadvantages: Requires entire program to be stored contiguously Jobs are allocated space on the basis of first available partition of required size Works well only if all of the jobs are of the same size or if the sizes are known ahead of time Arbitrary partition sizes lead to undesired results Too small a partition size results in large jobs having to wait such that their turnaround time is extended Too large a partition size results in memory waste or internal fragmentation 15

16 Memory Management: Early Systems Types of memory allocation schemes: Single-user systems Fixed partitions Dynamic partitions Relocatable dynamic partitions 16

17 Dynamic Partitions Dynamic Partitions: Jobs are given only as much memory as they request when they are loaded Available memory is kept in contiguous blocks Memory waste is comparatively small Disadvantages: At first its great and it fully utilizes memory when the first jobs are loaded Subsequent allocation leads to memory waste or external fragmentation 17

18 Dynamic Partitions (continued) Figure 2.2: Main memory use during dynamic partition allocation 18

19 Dynamic Partitions (continued) 5 K 10 K 35K of memory available but Job 8 still has to wait! 20K Figure 2.2 (continued): Main memory use during dynamic partition allocation 19

20 Where to put the jobs With Dynamic memory allocation we give jobs just enough room Easy for first job What happens when we have lots of jobs all arriving one after the other and all with different requirements We need some sort of allocation algorithm 20

21 Best-Fit and First-Fit Fit Allocation Free partitions are allocated on the following basis: First-fit memory allocation: First partition fitting the requirements Leads to fast allocation of memory space Best-fit memory allocation: Smallest partition fitting the requirements Results in least wasted space Internal fragmentation reduced but not eliminated 21

22 Best-Fit Versus First-Fit Fit Allocation First-fit memory allocation: Advantage: Faster in making allocation Disadvantage: Leads to memory waste Best-fit memory allocation Advantage: Makes the best use of memory space Disadvantage: Slower in making allocation 22

23 First-Fit Fit Allocation Figure 2.3: An example of a first-fit free scheme 23

24 Best-Fit? Figure 2.4: An example of a best-fit free scheme 24

25 A Note: The Memory Manager In the following slides we assume that the Memory Manager keeps two lists, one for free memory (LHS) and one for busy memory blocks (RHS) Assume the two lists are of a fixed size and the elements in the list can contain values or be empty. For simplicity the lists are often merged in the diagrams that follow 25

26 A new Job requires a 200 size block First-Fit Fit Algorithm Free Memory List The various addresses where we can get free space.... Where can we put the Job? Please note that = 4180 ( so the space (1045) up to 5225 must be filled with jobs) After Job is placed in memory the list of addresses where free space is available changes 26

27 Best-Fit Algorithm Algorithm for Best-Fit: Goal: find the smallest memory block into which the job will fit NB: Entire table must be searched before allocation 27

28 A Job requires 200 spaces Best-Fit Algorithm Where will it be placed? 28

29 More Allocation Schemes Hypothetical allocation schemes:. Next-fit: Starts searching from last allocated block, for the next available block when a new job arrives Worst-fit: Allocates the largest free available block to the new job Opposite of best-fit Good way to explore the theory of memory allocation; might not be the best choice for an actual system 29

30 Another way to do it? Alternative search strategy Search the entire input queue looking for the largest job that fits into the partition Do not waste a large partition on a small job but smaller jobs are discriminated against Have at least one small partition or ensure that small jobs only get skipped a certain number of times 30

31 When Jobs finish How do we reclaim space when jobs finish? 31

32 Deallocation Deallocation: Freeing an allocated memory space For fixed-partition system: Straightforward process. When job completes, Memory Manager resets the status of the job s memory block to free Any code for example, binary values with 0 indicating free and 1 indicating busy may be used 32

33 Deallocation (continued) For dynamic-partition system: Algorithm tries to combine free areas of memory whenever possible. This makes it more complex. The system must prepare for three possible cases: Case 1: When the block to be deallocated is adjacent to another free block Case 2: When the block to be deallocated is between two free blocks Case 3: When the block to be deallocated is isolated from other free blocks 33

34 Case 1: Joining Two Free Blocks Join This has to be de-allocated. It buts-up to the next highest free memory location (although not to the free space below it... there is probably another process in the green area). 34

35 Case 1: Joining Two Free Blocks The free memory list must be changed to reflect starting address of the new free block In the example, 7600 this was the address of the first instruction of the job that just released this block Memory block size for the new free space must be changed to show its new size that is, the combined total of the two free partitions In the example, ( ) 35

36 Case 2: Joining Three Free Blocks Now notice that the memory we will free is butted-up to free memory above and below it. We ll end up with three free spaces. These can be joined together. This has to be de-allocated 36

37 Case 2: Joining Three Free Blocks. Deallocated memory space is between two free memory blocks Change list to reflect the starting address of the new free block In the example, 7560 which was the smallest beginning address Sizes of the three free partitions must be combined In the example, ( ) Because location 7600 in our list has been combined the pointer in that list location must be changed to null to indicate that it no longer points to free memory space, hence null. 37

38 Case 3: Deallocating an Isolated Block Space to be deallocated is isolated from other free areas 1. System learns that the memory block to be released is tight between two other busy areas 2. Null entry in the busy list 3. Must search the free memory list for a null entry 4. And point that list element to the new free area

39 Memory Management: Early Systems Types of memory allocation schemes: Single-user systems Fixed partitions Dynamic partitions Relocatable dynamic partitions 39

40 Problems so far The fixed and dynamic memory management systems described so far share some unacceptable fragmentation characteristics that must be resolved We ll likely end up with lots of slivers of un-used memory 40

41 Relocatable Dynamic Partitions Relocatable Dynamic Partitions: Memory Manager relocates programs to gather together all of the empty blocks Compact the empty blocks to make one block of memory large enough to accommodate some or all of the jobs waiting to get in Sometimes called garbage collection Its not easy 41

42 Relocatable Dynamic Partitions (continued) Compaction: Reclaiming fragmented sections of the memory space Every program in memory must be relocated so they are contiguous So every address so must be relocated Every reference to an address within the program must be updated Data must not be harmed 42

43 Relocatable Dynamic Partitions (continued) Figure 2.5: An assembly language program that performs a simple incremental operation 43

44 Relocatable Dynamic Partitions (continued) The assembly language program (RHS) after it has been processed by the assembler appear on LHS. Notice the memory locations are flagged by apostrophe 44

45 Relocatable Dynamic Partitions (continued) Compaction issues: What goes on behind the scenes when relocation and compaction take place? What keeps track of how far each job has moved from its original storage area? What lists have to be updated? 45

46 Relocatable Dynamic Partitions (continued) What lists have to be updated? Free list must show the partition for the new block of free memory Busy list must show the new locations for all of the jobs already in process that were relocated Each job will have a new address except for those that were already at the lowest memory locations 46

47 Relocatable Dynamic Partitions (continued) Special-purpose registers are used for relocation: Bounds register Stores highest location accessible by each program Relocation register Contains the value that must be added to each address referenced in the program so it will be able to access the correct memory addresses after relocation If the program isn t relocated, the value stored in the program s relocation register is zero 47

48 Relocatable Dynamic Partitions (continued) Figure 2.7: Three snapshots of memory before and after compaction 48

49 Relocatable Dynamic Partitions (continued) Figure 2.8: Contents of relocation register and close-up of Job 4 memory area (a) before relocation and (b) after relocation and compaction 49

50 Relocatable Dynamic Partitions (continued) Compacting and relocating optimizes the use of memory and thus improves throughput Options for when and how often it should be done: When a certain percentage of memory is busy When there are jobs waiting to get in After a prescribed amount of time has elapsed Goal: Optimize processing time and memory use while keeping overhead as low as possible 50

51 Summary Four memory management techniques were used in early systems: single-user systems, fixed partitions, dynamic partitions, and relocatable dynamic partitions Memory waste in dynamic partitions is comparatively small as compared to fixed partitions First-fit is faster in making allocation but leads to memory waste Best-fit makes the best use of memory space but slower in making allocation 51

52 Summary (continued) Compacting and relocating optimizes the use of memory and thus improves throughput All techniques require that the entire program must: Be loaded into memory Be stored contiguously Remain in memory until the job is completed Each technique puts severe restrictions on the size of the jobs: can only be as large as the largest partitions in memory 52

53 Objectives of this chapter were You will be able to describe: The basic functionality of the three memory allocation schemes presented in this chapter: fixed partitions, dynamic partitions, relocatable dynamic partitions Best-fit memory allocation as well as first-fit memory allocation schemes How a memory list keeps track of available memory The importance of deallocation of memory in a dynamic partition system 53

54 Objectives (continued) You should be able to describe: The importance of the bounds register in memory allocation schemes The role of compaction and how it improves memory allocation efficiency 54

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Memory management basics (1) Requirements (1) Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Lecture 7: Memory Management I Memory management intends to satisfy the following

More information

Operating Systems, 6 th ed. Test Bank Chapter 7

Operating Systems, 6 th ed. Test Bank Chapter 7 True / False Questions: Chapter 7 Memory Management 1. T / F In a multiprogramming system, main memory is divided into multiple sections: one for the operating system (resident monitor, kernel) and one

More information

Chapter 7 Memory Management

Chapter 7 Memory Management Operating Systems: Internals and Design Principles Chapter 7 Memory Management Eighth Edition William Stallings Frame Page Segment A fixed-length block of main memory. A fixed-length block of data that

More information

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging Memory Management Outline Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging 1 Background Memory is a large array of bytes memory and registers are only storage CPU can

More information

Chapter 7 Memory Management

Chapter 7 Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 7 Memory Management Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Memory Management Subdividing

More information

OPERATING SYSTEM - MEMORY MANAGEMENT

OPERATING SYSTEM - MEMORY MANAGEMENT OPERATING SYSTEM - MEMORY MANAGEMENT http://www.tutorialspoint.com/operating_system/os_memory_management.htm Copyright tutorialspoint.com Memory management is the functionality of an operating system which

More information

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note: Chapter 7 OBJECTIVES Operating Systems Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the concept of virtual memory. Understand the

More information

System Software Prof. Dr. H. Mössenböck

System Software Prof. Dr. H. Mössenböck System Software Prof. Dr. H. Mössenböck 1. Memory Management 2. Garbage Collection 3. Linkers and Loaders 4. Debuggers 5. Text Editors Marks obtained by end-term exam http://ssw.jku.at/misc/ssw/ 1. Memory

More information

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation Dynamic Storage Allocation CS 44 Operating Systems Fall 5 Presented By Vibha Prasad Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need

More information

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example The Deadlock Problem Deadlocks A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 tape drives. P 1 and P 2 each

More information

Unit 4.3 - Storage Structures 1. Storage Structures. Unit 4.3

Unit 4.3 - Storage Structures 1. Storage Structures. Unit 4.3 Storage Structures Unit 4.3 Unit 4.3 - Storage Structures 1 The Physical Store Storage Capacity Medium Transfer Rate Seek Time Main Memory 800 MB/s 500 MB Instant Hard Drive 10 MB/s 120 GB 10 ms CD-ROM

More information

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum Scheduling Yücel Saygın These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum 1 Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods

More information

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

OS OBJECTIVE QUESTIONS

OS OBJECTIVE QUESTIONS OS OBJECTIVE QUESTIONS Which one of the following is Little s formula Where n is the average queue length, W is the time that a process waits 1)n=Lambda*W 2)n=Lambda/W 3)n=Lambda^W 4)n=Lambda*(W-n) Answer:1

More information

OPERATING SYSTEM - VIRTUAL MEMORY

OPERATING SYSTEM - VIRTUAL MEMORY OPERATING SYSTEM - VIRTUAL MEMORY http://www.tutorialspoint.com/operating_system/os_virtual_memory.htm Copyright tutorialspoint.com A computer can address more memory than the amount physically installed

More information

In-memory Tables Technology overview and solutions

In-memory Tables Technology overview and solutions In-memory Tables Technology overview and solutions My mainframe is my business. My business relies on MIPS. Verna Bartlett Head of Marketing Gary Weinhold Systems Analyst Agenda Introduction to in-memory

More information

OPERATING SYSTEMS MEMORY MANAGEMENT

OPERATING SYSTEMS MEMORY MANAGEMENT OPERATING SYSTEMS MEMORY MANAGEMENT Jerry Breecher 8: Memory Management 1 OPERATING SYSTEM Memory Management What Is In This Chapter? Just as processes share the CPU, they also share physical memory. This

More information

Part III Storage Management. Chapter 11: File System Implementation

Part III Storage Management. Chapter 11: File System Implementation Part III Storage Management Chapter 11: File System Implementation 1 Layered File System 2 Overview: 1/4 A file system has on-disk and in-memory information. A disk may contain the following for implementing

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ 2008, Prentice Hall I/O Devices Roadmap Organization

More information

Operating System: Scheduling

Operating System: Scheduling Process Management Operating System: Scheduling OS maintains a data structure for each process called Process Control Block (PCB) Information associated with each PCB: Process state: e.g. ready, or waiting

More information

& Data Processing 2. Exercise 3: Memory Management. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen

& Data Processing 2. Exercise 3: Memory Management. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen Folie a: Name & Data Processing 2 3: Memory Management Dipl.-Ing. Bogdan Marin Fakultät für Ingenieurwissenschaften Abteilung Elektro-und Informationstechnik -Technische Informatik- Objectives Memory Management

More information

Chapter 12. Paging an Virtual Memory Systems

Chapter 12. Paging an Virtual Memory Systems Chapter 12 Paging an Virtual Memory Systems Paging & Virtual Memory Virtual Memory - giving the illusion of more physical memory than there really is (via demand paging) Pure Paging - The total program

More information

Record Storage and Primary File Organization

Record Storage and Primary File Organization Record Storage and Primary File Organization 1 C H A P T E R 4 Contents Introduction Secondary Storage Devices Buffering of Blocks Placing File Records on Disk Operations on Files Files of Unordered Records

More information

CS5460: Operating Systems

CS5460: Operating Systems CS5460: Operating Systems Lecture 13: Memory Management (Chapter 8) Where are we? Basic OS structure, HW/SW interface, interrupts, scheduling Concurrency Memory management Storage management Other topics

More information

Chapter 2: OS Overview

Chapter 2: OS Overview Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system:

More information

Operating System Tutorial

Operating System Tutorial Operating System Tutorial OPERATING SYSTEM TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Operating System Tutorial An operating system (OS) is a collection

More information

Garbage Collection in the Java HotSpot Virtual Machine

Garbage Collection in the Java HotSpot Virtual Machine http://www.devx.com Printed from http://www.devx.com/java/article/21977/1954 Garbage Collection in the Java HotSpot Virtual Machine Gain a better understanding of how garbage collection in the Java HotSpot

More information

Memory unit sees only the addresses, and not how they are generated (instruction counter, indexing, direct)

Memory unit sees only the addresses, and not how they are generated (instruction counter, indexing, direct) Memory Management 55 Memory Management Multitasking without memory management is like having a party in a closet. Charles Petzold. Programming Windows 3.1 Programs expand to fill the memory that holds

More information

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University Operating Systems CSE 410, Spring 2004 File Management Stephen Wagner Michigan State University File Management File management system has traditionally been considered part of the operating system. Applications

More information

Linux Process Scheduling Policy

Linux Process Scheduling Policy Lecture Overview Introduction to Linux process scheduling Policy versus algorithm Linux overall process scheduling objectives Timesharing Dynamic priority Favor I/O-bound process Linux scheduling algorithm

More information

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No. # 26 Real - Time POSIX. (Contd.) Ok Good morning, so let us get

More information

6. Storage and File Structures

6. Storage and File Structures ECS-165A WQ 11 110 6. Storage and File Structures Goals Understand the basic concepts underlying different storage media, buffer management, files structures, and organization of records in files. Contents

More information

INTRODUCTION The collection of data that makes up a computerized database must be stored physically on some computer storage medium.

INTRODUCTION The collection of data that makes up a computerized database must be stored physically on some computer storage medium. Chapter 4: Record Storage and Primary File Organization 1 Record Storage and Primary File Organization INTRODUCTION The collection of data that makes up a computerized database must be stored physically

More information

Chapter 3 Operating-System Structures

Chapter 3 Operating-System Structures Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

Disk Space Management Methods

Disk Space Management Methods Volume 1, Issue 1, June 2013 International Journal of Advance Research in Computer Science and Management Studies Research Paper Available online at: www.ijarcsms.com Disk Space Management Methods Ramakrishna

More information

Cloud Computing. Up until now

Cloud Computing. Up until now Cloud Computing Lecture 11 Virtualization 2011-2012 Up until now Introduction. Definition of Cloud Computing Grid Computing Content Distribution Networks Map Reduce Cycle-Sharing 1 Process Virtual Machines

More information

Windows Server Performance Monitoring

Windows Server Performance Monitoring Spot server problems before they are noticed The system s really slow today! How often have you heard that? Finding the solution isn t so easy. The obvious questions to ask are why is it running slowly

More information

Chapter 13: Query Processing. Basic Steps in Query Processing

Chapter 13: Query Processing. Basic Steps in Query Processing Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing

More information

CHAPTER 17: File Management

CHAPTER 17: File Management CHAPTER 17: File Management The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides

More information

An Implementation Of Multiprocessor Linux

An Implementation Of Multiprocessor Linux An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than

More information

Operating Systems Lecture #6: Process Management

Operating Systems Lecture #6: Process Management Lecture #6: Process Written by based on the lecture series of Dr. Dayou Li and the book Understanding 4th ed. by I.M.Flynn and A.McIver McHoes (2006) Department of Computer Science and Technology,., 2013

More information

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer Computers CMPT 125: Lecture 1: Understanding the Computer Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University January 3, 2009 A computer performs 2 basic functions: 1.

More information

Chapter 12 File Management

Chapter 12 File Management Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Roadmap Overview File organisation and Access

More information

Chapter 12 File Management. Roadmap

Chapter 12 File Management. Roadmap Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Overview Roadmap File organisation and Access

More information

An Introduction to the ARM 7 Architecture

An Introduction to the ARM 7 Architecture An Introduction to the ARM 7 Architecture Trevor Martin CEng, MIEE Technical Director This article gives an overview of the ARM 7 architecture and a description of its major features for a developer new

More information

Memory management. Chapter 4: Memory Management. Memory hierarchy. In an ideal world. Basic memory management. Fixed partitions: multiple programs

Memory management. Chapter 4: Memory Management. Memory hierarchy. In an ideal world. Basic memory management. Fixed partitions: multiple programs Memory management Chater : Memory Management Part : Mechanisms for Managing Memory asic management Swaing Virtual Page relacement algorithms Modeling age relacement algorithms Design issues for aging systems

More information

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems Lecture Outline Operating Systems Objectives Describe the functions and layers of an operating system List the resources allocated by the operating system and describe the allocation process Explain how

More information

1. Computer System Structure and Components

1. Computer System Structure and Components 1 Computer System Structure and Components Computer System Layers Various Computer Programs OS System Calls (eg, fork, execv, write, etc) KERNEL/Behavior or CPU Device Drivers Device Controllers Devices

More information

APP INVENTOR. Test Review

APP INVENTOR. Test Review APP INVENTOR Test Review Main Concepts App Inventor Lists Creating Random Numbers Variables Searching and Sorting Data Linear Search Binary Search Selection Sort Quick Sort Abstraction Modulus Division

More information

361 Computer Architecture Lecture 14: Cache Memory

361 Computer Architecture Lecture 14: Cache Memory 1 361 Computer Architecture Lecture 14 Memory cache.1 The Motivation for s Memory System Processor DRAM Motivation Large memories (DRAM) are slow Small memories (SRAM) are fast Make the average access

More information

Chapter 1 Computer System Overview

Chapter 1 Computer System Overview Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Eighth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides

More information

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture Operating System Concepts 2.1 Computer-System Architecture

More information

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization Lesson Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization AE3B33OSD Lesson 1 / Page 2 What is an Operating System? A

More information

How To Understand The History Of An Operating System

How To Understand The History Of An Operating System 7 Operating Systems 7.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: 7.2 Understand the role of the operating system.

More information

Operating Systems Concepts: Chapter 7: Scheduling Strategies

Operating Systems Concepts: Chapter 7: Scheduling Strategies Operating Systems Concepts: Chapter 7: Scheduling Strategies Olav Beckmann Huxley 449 http://www.doc.ic.ac.uk/~ob3 Acknowledgements: There are lots. See end of Chapter 1. Home Page for the course: http://www.doc.ic.ac.uk/~ob3/teaching/operatingsystemsconcepts/

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

File System Management

File System Management Lecture 7: Storage Management File System Management Contents Non volatile memory Tape, HDD, SSD Files & File System Interface Directories & their Organization File System Implementation Disk Space Allocation

More information

Filing Systems. Filing Systems

Filing Systems. Filing Systems Filing Systems At the outset we identified long-term storage as desirable characteristic of an OS. EG: On-line storage for an MIS. Convenience of not having to re-write programs. Sharing of data in an

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operatin g Systems: Internals and Design Principle s Chapter 11 I/O Management and Disk Scheduling Seventh Edition By William Stallings Operating Systems: Internals and Design Principles An artifact can

More information

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer. Guest lecturer: David Hovemeyer November 15, 2004 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds

More information

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation

More information

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation

More information

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Based on original slides by Silberschatz, Galvin and Gagne 1 Basic Concepts CPU I/O Burst Cycle Process execution

More information

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines Operating System Concepts 3.1 Common System Components

More information

Computer Architecture

Computer Architecture Computer Architecture Slide Sets WS 2013/2014 Prof. Dr. Uwe Brinkschulte M.Sc. Benjamin Betting Part 11 Memory Management Computer Architecture Part 11 page 1 of 44 Prof. Dr. Uwe Brinkschulte, M.Sc. Benjamin

More information

COS 318: Operating Systems. Virtual Memory and Address Translation

COS 318: Operating Systems. Virtual Memory and Address Translation COS 318: Operating Systems Virtual Memory and Address Translation Today s Topics Midterm Results Virtual Memory Virtualization Protection Address Translation Base and bound Segmentation Paging Translation

More information

Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc()

Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc() CS61: Systems Programming and Machine Organization Harvard University, Fall 2009 Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc() Prof. Matt Welsh October 6, 2009 Topics for today Dynamic

More information

MS SQL Performance (Tuning) Best Practices:

MS SQL Performance (Tuning) Best Practices: MS SQL Performance (Tuning) Best Practices: 1. Don t share the SQL server hardware with other services If other workloads are running on the same server where SQL Server is running, memory and other hardware

More information

Lecture 25 Symbian OS

Lecture 25 Symbian OS CS 423 Operating Systems Design Lecture 25 Symbian OS Klara Nahrstedt Fall 2011 Based on slides from Andrew S. Tanenbaum textbook and other web-material (see acknowledgements) cs423 Fall 2011 1 Overview

More information

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems Fastboot Techniques for x86 Architectures Marcus Bortel Field Application Engineer QNX Software Systems Agenda Introduction BIOS and BIOS boot time Fastboot versus BIOS? Fastboot time Customizing the boot

More information

Chapter 6, The Operating System Machine Level

Chapter 6, The Operating System Machine Level Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General

More information

Real-Time Scheduling 1 / 39

Real-Time Scheduling 1 / 39 Real-Time Scheduling 1 / 39 Multiple Real-Time Processes A runs every 30 msec; each time it needs 10 msec of CPU time B runs 25 times/sec for 15 msec C runs 20 times/sec for 5 msec For our equation, A

More information

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling Objectives To introduce CPU scheduling To describe various CPU-scheduling algorithms Chapter 5: Process Scheduling To discuss evaluation criteria for selecting the CPUscheduling algorithm for a particular

More information

ICS 143 - Principles of Operating Systems

ICS 143 - Principles of Operating Systems ICS 143 - Principles of Operating Systems Lecture 5 - CPU Scheduling Prof. Nalini Venkatasubramanian nalini@ics.uci.edu Note that some slides are adapted from course text slides 2008 Silberschatz. Some

More information

Introduction. What is an Operating System?

Introduction. What is an Operating System? Introduction What is an Operating System? 1 What is an Operating System? 2 Why is an Operating System Needed? 3 How Did They Develop? Historical Approach Affect of Architecture 4 Efficient Utilization

More information

Readings for this topic: Silberschatz/Galvin/Gagne Chapter 5

Readings for this topic: Silberschatz/Galvin/Gagne Chapter 5 77 16 CPU Scheduling Readings for this topic: Silberschatz/Galvin/Gagne Chapter 5 Until now you have heard about processes and memory. From now on you ll hear about resources, the things operated upon

More information

Recommended hardware system configurations for ANSYS users

Recommended hardware system configurations for ANSYS users Recommended hardware system configurations for ANSYS users The purpose of this document is to recommend system configurations that will deliver high performance for ANSYS users across the entire range

More information

Chapter 12 File Management

Chapter 12 File Management Operating Systems: Internals and Design Principles Chapter 12 File Management Eighth Edition By William Stallings Files Data collections created by users The File System is one of the most important parts

More information

Chapter 2 System Structures

Chapter 2 System Structures Chapter 2 System Structures Operating-System Structures Goals: Provide a way to understand an operating systems Services Interface System Components The type of system desired is the basis for choices

More information

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface File Management Two Parts Filesystem Interface Interface the user sees Organization of the files as seen by the user Operations defined on files Properties that can be read/modified Filesystem design Implementing

More information

A Comparative Study of CPU Scheduling Algorithms

A Comparative Study of CPU Scheduling Algorithms IJGIP Journal homepage: www.ifrsa.org A Comparative Study of CPU Scheduling Algorithms Neetu Goel Research Scholar,TEERTHANKER MAHAVEER UNIVERSITY Dr. R.B. Garg Professor Delhi School of Professional Studies

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

Reconfigurable Architecture Requirements for Co-Designed Virtual Machines

Reconfigurable Architecture Requirements for Co-Designed Virtual Machines Reconfigurable Architecture Requirements for Co-Designed Virtual Machines Kenneth B. Kent University of New Brunswick Faculty of Computer Science Fredericton, New Brunswick, Canada ken@unb.ca Micaela Serra

More information

Chapter 14 MS-DOS Operating System

Chapter 14 MS-DOS Operating System Understanding Operating Systems, Fifth Edition 14-1 Chapter 14 MS-DOS Operating System At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion Topics Additional

More information

Operating System Overview. Otto J. Anshus

Operating System Overview. Otto J. Anshus Operating System Overview Otto J. Anshus A Typical Computer CPU... CPU Memory Chipset I/O bus ROM Keyboard Network A Typical Computer System CPU. CPU Memory Application(s) Operating System ROM OS Apps

More information

Physical Data Organization

Physical Data Organization Physical Data Organization Database design using logical model of the database - appropriate level for users to focus on - user independence from implementation details Performance - other major factor

More information

Operating Systems. Virtual Memory

Operating Systems. Virtual Memory Operating Systems Virtual Memory Virtual Memory Topics. Memory Hierarchy. Why Virtual Memory. Virtual Memory Issues. Virtual Memory Solutions. Locality of Reference. Virtual Memory with Segmentation. Page

More information

1 Organization of Operating Systems

1 Organization of Operating Systems COMP 730 (242) Class Notes Section 10: Organization of Operating Systems 1 Organization of Operating Systems We have studied in detail the organization of Xinu. Naturally, this organization is far from

More information

CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont.

CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont. CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont. Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/ 1 Bare 5-Stage Pipeline Physical Address PC Inst.

More information

Convenience: An OS makes a computer more convenient to use. Efficiency: An OS allows the computer system resources to be used in an efficient manner.

Convenience: An OS makes a computer more convenient to use. Efficiency: An OS allows the computer system resources to be used in an efficient manner. Introduction to Operating System PCSC-301 (For UG students) (Class notes and reference books are required to complete this study) Release Date: 27.12.2014 Operating System Objectives and Functions An OS

More information

CHAPTER 1 INTRODUCTION

CHAPTER 1 INTRODUCTION 1 CHAPTER 1 INTRODUCTION 1.1 MOTIVATION OF RESEARCH Multicore processors have two or more execution cores (processors) implemented on a single chip having their own set of execution and architectural recourses.

More information

Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff

Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff Process Scheduling CS 241 February 24, 2012 Copyright University of Illinois CS 241 Staff 1 Announcements Mid-semester feedback survey (linked off web page) MP4 due Friday (not Tuesday) Midterm Next Tuesday,

More information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

System Virtual Machines

System Virtual Machines System Virtual Machines Introduction Key concepts Resource virtualization processors memory I/O devices Performance issues Applications 1 Introduction System virtual machine capable of supporting multiple

More information

How To Understand And Understand An Operating System In C Programming

How To Understand And Understand An Operating System In C Programming ELEC 377 Operating Systems Thomas R. Dean Instructor Tom Dean Office:! WLH 421 Email:! tom.dean@queensu.ca Hours:! Wed 14:30 16:00 (Tentative)! and by appointment! 6 years industrial experience ECE Rep

More information

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System CS341: Operating System Lect 36: 1 st Nov 2014 Dr. A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati File System & Device Drive Mass Storage Disk Structure Disk Arm Scheduling RAID

More information

Introduction. What is RAID? The Array and RAID Controller Concept. Click here to print this article. Re-Printed From SLCentral

Introduction. What is RAID? The Array and RAID Controller Concept. Click here to print this article. Re-Printed From SLCentral Click here to print this article. Re-Printed From SLCentral RAID: An In-Depth Guide To RAID Technology Author: Tom Solinap Date Posted: January 24th, 2001 URL: http://www.slcentral.com/articles/01/1/raid

More information

Outline: Operating Systems

Outline: Operating Systems Outline: Operating Systems What is an OS OS Functions Multitasking Virtual Memory File Systems Window systems PC Operating System Wars: Windows vs. Linux 1 Operating System provides a way to boot (start)

More information

Introduction to Embedded Systems. Software Update Problem

Introduction to Embedded Systems. Software Update Problem Introduction to Embedded Systems CS/ECE 6780/5780 Al Davis logistics minor Today s topics: more software development issues 1 CS 5780 Software Update Problem Lab machines work let us know if they don t

More information