Chapter 8. Operating System Support. Yonsei University
|
|
- Terence Franklin
- 5 years ago
- Views:
Transcription
1 Chapter 8 Operating System Support
2 Contents Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management 8-2
3 OS Objectives & Functions OS is a program that Manages the computer s resources, provides services for programmers Schedules the execution of other programs Objective Convenience Makes a computer more convenient Efficiency Allows the computer system resources to be used in a efficiency manner Operation System Overview 8-3
4 OS : User/Computer Interface Operation System Overview To ease a complex task, a set of systems program is provided Some of programs are referred to as utilities These implement use functions that assist in program creation, the management of files, the control of I/O devices Programmers make use of these facilities in developing an application OS provides a programmer with a convenient interface for using the system 8-4
5 Layers of a Computer System Operation System Overview 8-5
6 OS Services Operation System Overview Program Creation Assists the programmer in creating programs Program execution Handles program execution for user Access to I/O devices Controlled access to files System access Access to the system as a whole and to specific system resource Error detection and response Accounting 8-6
7 OS : Resource Manager Operation System Overview OS functions in the same way ordinary computer software; it is a program executed by the processor OS frequently relinquishes control and must depend on the processor to allow it to regain control 8-7
8 OS : Resource Manager Operation System Overview The OS is nothing more than a computer program The OS directs the processor in the use of the other system resources and in timing of its execution of other programs Kernel, nucleus Contains the most frequently used functions in operating system and at a given time, other portions of the operating system currently in use The OS decides when an I/O device can be used by a program in execution, and controls access to and use of files 8-8
9 OS : Resource Manager Operation System Overview 8-9
10 Types of Operating Systems Operation System Overview Interactive system User/programmer interacts directly with the computer, usually through a keyboard/display terminal, the request the execution of a job or to perform a transaction Batch system(opposite of interactive) User s program is batched together with programs from other users and submitted by a computer operator Multiprogramming Uniprogramming only one program at a time 8-10
11 Early Systems Operation System Overview Early computer(late 1940 to the mid-1950) No operating system The processor were run from a console The program in processor code were loaded via input device Two main problems Scheduling Setup time 8-11
12 Simple Batch Systems Operation System Overview Early processors were very expensive It was important to maximize processor utilization Monitor : Simple batch operating systems Batch : Job together sequentially Resident monitor Users submit jobs to operator Operator batches jobs Monitor controls sequence of events to process batch When the job is completed, it returns control to the monitor, which immediately reads in the next job Monitor handles scheduling 8-12
13 Memory Layout Operation System Overview 8-13
14 Simple Batch Systems Operation System Overview At a certain point in time, the processor is executing instructions from the portion of main memory containing the monitor These instructions cause the next job to be read in to another portion of main memory Monitor handles the scheduling problem How about the job setup time? The monitor handles this as well Job control language(jcl) Used to provide instructions to the monitor 8-14
15 Overall Format of Job Operation System Overview $JOB $FTN... $LOAD $RUN... $END Instructions Data 8-15
16 Hardware Features of Simple Batch Operation System Overview Memory protection While the user program is executing, it must not alter the memory area containing the monitor Timer Prevent a single job from monopolizing the system Privileged instructions Executed only by the monitor Interrupts Flexibility in relinquishing control to and regaining control from user programs 8-16
17 Multiprogrammed Batch System Operation System Overview Simple batch system The processor is often idle The problem is that I/O devices are slow Suppose that there is room for the operating system and two user programs When one job needs to wait for I/O, the processor can switch to the other job, which likely is not waiting for I/O Read one record Execute 100 instructions Write one record TOTAL seconds seconds seconds seconds Percent CPU util = / = = 3.2 % System Utilization Example 8-17
18 Multiprogramming Example Uniprogramming Operation System Overview 8-18
19 Multiprogramming Example Multiprogramming with two programs Operation System Overview 8-19
20 Multiprogramming Example Multiprogramming with three programs Operation System Overview 8-20
21 Program Execution Attributes Operation System Overview JOB1 JOB2 JOB3 Type of jog Heavy compute Heavy I/O Heavy I/O Duration 5 min 15 min 10 min Memory required 50K 100K 80K Need disk? No No Yes Need terminal? No Yes No Need printer? No No Yes 8-21
22 Effects of Multiprogramming Operation System Overview Uniprogramming Multiprogramming Processor use 17% 33% Memory use 30% 67% Disk use 33% 67% Printer use 33% 67% Elapsed time 30 min 15 min Throughput rate 6 jobs/h 12 jobs/h Mean response time 18 min 10 min 8-22
23 Utilization Histograms Operation System Overview 8-23
24 Time-Sharing Systems Operation System Overview User interface acts directly with the computer Such as transaction processing, an interactive mode is essential Multiprogramming can be used handle multiple interactive jobs Batch Multiprogramming Time Sharing Principal objective Maximize processor use Minimize response time Source of instructions to operating system Job control language instructions provided with the job Command entered at the terminal 8-24
25 Scheduling Scheduling Key to Multiprogramming Process A program in execution The animated spirit of a program That entity to which a processor is assigned Long-term scheduling Medium-term scheduling Short-term scheduling I/O scheduling 8-25 The decision to add to the pool of processes to be executed The decision to add to the number of processes that are partially or fully in main memory The decision as to which available process will be executed by the processor The decision as to which process s pending I/O request shall be handled by an available I/O device
26 Long Term Scheduling 8-26 Scheduling Determines which programs are admitted to the system for processing Controls the degree of multiprogramming Once admitted, a job or user program becomes a process and is added to the queue for the short-term scheduler Newly created process begins in a swappedout condition, in which case it is added to a queue for the medium-term scheduler Decides that the operating system can take on one or more additional processes Decides which job or jobs to accept and turn into processes
27 Medium-Term Scheduling Scheduling Part of the swapping function Swapping-in decision is based on the need to manage the degree of multiprogramming On a system that does not use virtual memory, memory management is also an issue 8-27
28 Short-Term Scheduling Scheduling Dispatcher Fine-grained decision of which job to execute next Which job actually gets to use the processor in the next time slot 8-28
29 Process States of Short Term Scheduler State Status at any point in time Used because it connotes that certain information exists that defines the status at that point New Program is admitted by the high-level scheduler but is not yet ready to execute Ready Process is ready to execute Running Process is being executed Waiting Process is suspended Halted 8-29
30 Five-State Process Model Scheduling 8-30
31 Process Control Block Identifier State Priority Program Counter Memory pointers Context data Present in registers in the processor I/O status information Accounting information identifier State Priority Program counter Memory Pointer Context Data I/O Status Information Accounting Information
32 Scheduling Techniques Scheduling Begin at a point in time process A is running The processor is executing instructions from the program contained in A s memory The processor ceases to execute instructions in A and begins executing instructions Three reasons Process A issues a service call to the OS Process A causes an interrupt Some event unrelated to process A that requires attention causes an interrupt 8-32
33 Scheduling Example Scheduling 8-33
34 OS Queue Scheduling Long-term Queue List of jobs waiting to use the system High-level scheduler will allocate memory and create a process for one of the waiting items Short-term Queue All processes in the ready state One of these process could use the processor next Priority levels may also be used I/O Queue I/O queue for each I/O device More than one process may request the use of the same I/O device 8-34
35 Key Elements for Multiprogramming Scheduling 8-35
36 Queuing Diagram Representation Scheduling 8-36
37 Memory Management Memory management In a uniprogramming system, Main memory is divided into two parts: The operating system(resident monitor) The program currently being executed In a multi programming system, The user part of memory is subdivided to accommodate multiple processes The task of subdivision is carried out dynamically by the OS and is known as memory management 8-37
38 Swapping Memory management Problem : I/O activities are much slower than computation and therefore the processor in a uniprogramming system is idle most of the time Solutions Main memory could be expanded and so be able to accommodate more processes 2 Flaws First, main memory is expensive Second, the appetite of programs for memory has grown as fast as the cost of memory has dropped Swapping 8-38
39 Swapping Memory management Long-term queue of process requests, typically stored on disk These are bought in, one at a time, as space becomes available Rather than remain idle, the processor swaps one of these processes back out to disk into an intermediate queue This is a queue of existing processes that have been temporarily kicked out of memory OS brings in another process form the interface another process form the intermediate queue 8-39
40 Swapping Memory management Swapping is an I/O operation, therefore there is the potential for making the problem worse, not better Because disk I/O is generally the fastest I/O on a system(compared with tape or printer I/O), swapping will usually enhance performance 8-40
41 What is Swapping? Memory management Long term queue of processes stored on disk Processes swapped in as space becomes available As a process completes it is moved out of main memory If none of the processes in memory are ready (i.e. all I/O blocked) Swap out a blocked process to intermediate queue Swap in a ready process or a new process But swapping is an I/O process
42 Use of Swapping (a)sample Job Scheduling Memory management 8-42
43 Use of Swapping (b)swapping Memory management 8-43
44 Partitioning Memory management Simplest scheme for partitioning available memory is to use fixed-size partitions Fixed size partitions Although the partitions are of fixed size, they need not be of equal size When a process is brought into memory, it is placed in the smallest available partition that will hold it Even with the use of unequal fixed-size partitions, there will be wasted memory Leads to variable sized partitions 8-44
45 Fixed Partitions Memory management 8-45
46 Variable Sized Partitions Memory management More efficient approach Allocate exactly the required memory to a process This leads to a hole at the end of memory, too small to use Only one small hole - less waste When all processes are blocked, swap out a process and bring in another New process may be smaller than swapped out process 8-46
47 Variable Sized Partitions Memory management Memory becomes more and more fragmented, and memory utilization declines Eventually have lots of holes : fragmentation Solutions: Coalesce - Join adjacent holes into one large hole Compaction From time to time go through memory and move all hole into one free block (c.f. disk de-fragmentation) Operating system shifts the processes in memory to place all the free memory together in one block This is a time-consuming procedure, wasteful of processor time 8-47
48 Effect of Dynamic Partitioning Memory management 8-48
49 Effect of Dynamic Partitioning Memory management 8-49
50 Relocation Memory management No guarantee that process will load into the same place in memory Instructions contain addresses Locations of data Addresses for instructions (branching) Logical address - relative to beginning of program Physical address - actual location in memory (this time) Automatic conversion using base address 8-50
51 Partitioning Memory management The process is not likely to be loaded into the same place in main memory each time it is swapped in If compaction is used, a process may be shifted while in main memory The process in memory consists of instruction plus data The instructions will contain addresses for memory locations of two types Addresses of data items Addresses of instructions used for branching instruction 8-51
52 Partitioning Memory management Addresses are not fixed They will change each time a process is swapped in To solve this problem, a distinction is made between logical addresses and physical addresses Logical address A location relative to the beginning of the program Physical address Actual location in memory Automatically converts from logical to physical address 8-52
53 Paging Memory management Memory is partitioned into equal fixed-size chunks Chunk of a program, known as pages, could be assigned to available chunks of memory, known as frames, or page frames Wasted space in memory for that process is a fraction of the last page The list of free frames is maintained by the operating system A process does not require contiguous page frames Use page table to keep track 8-53
54 Allocation of Free Frames Memory management 8-54
55 Paging Memory management The OS maintains a page table for each process The page table show the frame location for each page of the process Main memory is divided into many small equal-size frames Each process is divided into frame-size pages Smaller processes require fewer pages, larger processes require more 8-55
56 Logical and Physical Addresses Memory management 8-56
57 Virtual Memory Memory management Demand Paging Page Table Structure 8-57
58 Demand Paging Memory management Each page of a process is brought in only when it is needed(on demand) If the program branch to an instruction on a page not in main memory, if the program references data on a page not in memory, a page fault is triggered 8-58
59 Demand Paging Memory management Only a few pages of any given process are in memory When it brings one page in, it must throw another page out Page fault Required page is not in memory Operating System must swap in required page May need to swap out a page to make space Select page to throw out based on recent history 8-59
60 Demand Paging Memory management Thrashing Processor spends most of its time swapping pages rather than executing instructions Too many processes in too little memory Operating System spends all its time swapping Little or no real work is done Disk light is on all the time Solutions Good page replacement algorithms Reduce number of processes running Fit more memory 8-60
61 Demand Paging Memory management Operating system tries to guess, based on recent history, which pages are least likely to be used in the near future It is possible for a process to be larger than all of main memory We do not need all of a process in memory for it to run We can swap in pages as required Because a process executes only in main memory, that memory is referred to as real memory Programmer or user perceives a much larger memory that which is allocated on the disk Virtual Memory So we can now run processes that are bigger than total memory available! 8-61
62 Page Table Structure Memory management The basic mechanism for reading a word from memory involves the translation of a virtual, or logical, address, consisting of frame number and offset, into a physical address, consisting of frame number and offset, using a page table The page number of a virtual address is used to index that table and look up the corresponding frame number This is combined with the offset portion of the virtual address to produce the desired real address 8-62
63 Page Table Structure Memory management Most Virtual memory schemes store page tables in virtual memory Page tables are subject to paging When a process is running, at least a part of its page table must be in main memory, including the page table entry of the currently executing page Two level scheme Page directory Each entry points to a page table Inverted page table 8-63
64 Page Table Structure Memory management Inverted Page Table The page number portion is mapped into a hash table using a simple hashing function The hash table contains a pointer to inverted page table, which contains the page table entries There is one entry in the hash table and inverted page table for each real memory page A fixed portion of real memory is required for the tables regardless of the number of processes or virtual pages supported 8-64
65 Inverted Page Table Structure Memory management 8-65
66 Translation Lookaside Buffer Memory management Every virtual memory reference causes two physical memory accesses Fetch the appropriate page table entry Fetch the desired data The straightforward virtual memory scheme would have the effect of doubling the memory access time Cache functions as a memory cache and contain page table entries that have been most recently used Use special cache for page table : TLB 8-66
67 Translation Lookaside Buffer Memory management A virtual address is in the form of a page number, offset The memory system consults the TLB to see if the matching page table entry is present If it is, the real address is generated by combining the frame number with the offset If not, the entry is accessed from a page table 8-67
68 Operation of Paging and TLB Memory management 8-68
69 Lookaside Buffer and Cache Memory management 8-69
70 Segmentation Memory management Visible to the programmer Paging is invisible Provided as a convenience for organizing programs and data Associating privilege and protection attributes with instructions and data Usually different segments allocated to program and data 8-70
71 Advantages of Segmentation Memory management Simplify the handling of growing data structure Allow programs to be altered and recompiled independently Lend itself to sharing among processes Lend itself to protection Some systems combine segmentation with paging 8-71
72 Segmentation Memory management Simplifies handling of growing data structures Allows programs to be altered and recompiled independently, without relinking and re-loading Lends itself to sharing among processes Lends itself to protection Some systems combine segmentation with paging 8-72
73 Pentium II Memory Management PentiumII&PowerPC Memory Management Address Spaces Unsegmented unpaged memory Unsegmented paged memory Segmented unpaged memory Segmented paged memory Segmentation Table Indicator Segment number Request privilege level(rpl) Paging 8-73
74 Pentium II Memory Management PentiumII&PowerPC Memory Management 8-74
75 Pentium II Memory Management PentiumII&PowerPC Memory Management 8-75
76 Pentium II Memory Management PentiumII&PowerPC Memory Management 8-76
77 Pentium II Memory Management PentiumII&PowerPC Memory Management 8-77
78 Pentium II Memory Management PentiumII&PowerPC Memory Management 8-78
79 Pentium II Memory Parameter PentiumII&PowerPC Memory Management 8-79
80 Pentium II Memory Parameter PentiumII&PowerPC Memory Management 8-80
81 Memory Address Translation PentiumII&PowerPC Memory Management 8-81
82 Pentium II Segmentation PentiumII&PowerPC Memory Management Each virtual address is 16-bit segment and 32- bit offset 2 bits of segment are protection mechanism 14 bits specify segment Unsegmented virtual memory 2 32 = 4Gbytes Segmented 2 46 =64 terabytes Can be larger depends on which process is active Half (8K segments of 4Gbytes) is global Half is local and distinct for each process 8-82
83 Pentium II Protection PentiumII&PowerPC Memory Management Protection bits give 4 levels of privilege 0 most protected, 3 least Use of levels software dependent Usually level 3 for applications, level 1 for O/S and level 0 for kernel (level 2 not used) Level 2 may be used for apps that have internal se curity e.g. database Some instructions only work in level
84 Pentium II Paging PentiumII&PowerPC Memory Management Segmentation may be disabled In which case linear address space is used Two level page table lookup First, page directory 1024 entries max Splits 4G linear memory into 1024 page groups of 4Mb Each page table has 1024 entries corresponding to 4Kb pages Can use one page directory for all processes, one per process or mixture Page directory for current process always in memory Use TLB holding 32 page table entries Two page sizes available 4k or 4M 8-84
85 PowerPC Memory-Management Management PentiumII&PowerPC Memory Management Comprehensive set of addressing mechanism Block address translation Address one drawback of paging mechanism Block addressing enable the map four large blocks of instruction memory and four large block of data memory in a way that bypass the paging mechanism 8-85
86 PowerPC Memory Management PentiumII&PowerPC Memory Management 32 bit paging with simple segmentation 64 bit paging with more powerful segmentation Or, both do block address translation Map 4 large blocks of instructions & 4 of memory to bypass paging e.g. OS tables or graphics frame buffers 32 bit effective address 12 bit byte selector =4kbyte pages 16 bit page id 64k pages per segment 4 bits indicate one of 16 segment registers Segment registers under OS control 8-86
87 Memory Management(PPC32bit) PentiumII&PowerPC Memory Management 8-87
88 PowerPC Address Translation PentiumII&PowerPC Memory Management 8-88
89 PowerPC Memory Management PentiumII&PowerPC Memory Management 8-89
90 PowerPC Memory Management PentiumII&PowerPC Memory Management 8-90
Operating System Support
Operating System Support Objectives and Functions Convenience Making the computer easier to use Efficiency Allowing better use of computer resources Layers and Views of a Computer System Operating System
More informationObjectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency
William Stallings Computer Organization and Architecture 7 th Edition Chapter 8 Operating System Support Objectives and Functions Convenience Making the computer easier to use Efficiency Allowing better
More informationOperating System Support
William Stallings Computer Organization and Architecture 10 th Edition Edited by Dr. George Lazik + Chapter 8 Operating System Support Application programming interface Application binary interface Instruction
More informationComputer Organization and Architecture. OS Objectives and Functions Convenience Making the computer easier to use
Computer Organization and Architecture Chapter 8 Operating System Support 1. Processes and Scheduling 2. Memory Management OS Objectives and Functions Convenience Making the computer easier to use Efficiency
More informationCSCI 4717 Computer Architecture. Memory Management. What is Swapping? Swapping. Partitioning. Fixed-Sized Partitions (continued)
CSCI 4717/5717 Computer Architecture Topic: Memory Management Reading: Stallings, Sections 8.3 and 8.4 Memory Management Uni-program memory split into two parts One for Operating System (monitor) One for
More informationOPERATING SYSTEM SUPPORT (Part 1)
Eastern Mediterranean University School of Computing and Technology ITEC255 Computer Organization & Architecture OPERATING SYSTEM SUPPORT (Part 1) Introduction The operating system (OS) is the software
More informationWith regard to operating systems the kernel consists of the most frequently used functions in the operating system and it kept in main memory.
CS 320 Ch 8 Operating Systems An operating system controls execution of applications and acts as an interface between the user and the computer. A typical OS provides the following services: Program Creation
More informationMemory Management. Reading: Silberschatz chapter 9 Reading: Stallings. chapter 7 EEL 358
Memory Management Reading: Silberschatz chapter 9 Reading: Stallings chapter 7 1 Outline Background Issues in Memory Management Logical Vs Physical address, MMU Dynamic Loading Memory Partitioning Placement
More informationMEMORY MANAGEMENT/1 CS 409, FALL 2013
MEMORY MANAGEMENT Requirements: Relocation (to different memory areas) Protection (run time, usually implemented together with relocation) Sharing (and also protection) Logical organization Physical organization
More informationVirtual Memory. control structures and hardware support
Virtual Memory control structures and hardware support 1 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time A process may be swapped in and
More informationChapter 8 Virtual Memory
Operating Systems: Internals and Design Principles Chapter 8 Virtual Memory Seventh Edition William Stallings Operating Systems: Internals and Design Principles You re gonna need a bigger boat. Steven
More informationChapter 8 Virtual Memory
Operating Systems: Internals and Design Principles Chapter 8 Virtual Memory Seventh Edition William Stallings Modified by Rana Forsati for CSE 410 Outline Principle of locality Paging - Effect of page
More informationChapter 8 Virtual Memory
Chapter 8 Virtual Memory Contents Hardware and control structures Operating system software Unix and Solaris memory management Linux memory management Windows 2000 memory management Characteristics of
More informationVirtual Memory. Chapter 8
Virtual Memory 1 Chapter 8 Characteristics of Paging and Segmentation Memory references are dynamically translated into physical addresses at run time E.g., process may be swapped in and out of main memory
More informationOperating Systems: Internals and Design Principles. Chapter 7 Memory Management Seventh Edition William Stallings
Operating Systems: Internals and Design Principles Chapter 7 Memory Management Seventh Edition William Stallings Memory Management Requirements Memory management is intended to satisfy the following requirements:
More informationECE519 Advanced Operating Systems
IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (8 th Week) (Advanced) Operating Systems 8. Virtual Memory 8. Outline Hardware and Control Structures Operating
More informationa process may be swapped in and out of main memory such that it occupies different regions
Virtual Memory Characteristics of Paging and Segmentation A process may be broken up into pieces (pages or segments) that do not need to be located contiguously in main memory Memory references are dynamically
More informationAddresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.
1 Memory Management Address Binding The normal procedures is to select one of the processes in the input queue and to load that process into memory. As the process executed, it accesses instructions and
More informationCS399 New Beginnings. Jonathan Walpole
CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,
More informationChapter 8 & Chapter 9 Main Memory & Virtual Memory
Chapter 8 & Chapter 9 Main Memory & Virtual Memory 1. Various ways of organizing memory hardware. 2. Memory-management techniques: 1. Paging 2. Segmentation. Introduction Memory consists of a large array
More informationChapter 7 Memory Management
Operating Systems: Internals and Design Principles Chapter 7 Memory Management Ninth Edition William Stallings Frame Page Segment A fixed-length block of main memory. A fixed-length block of data that
More informationMemory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization
Requirements Relocation Memory management ability to change process image position Protection ability to avoid unwanted memory accesses Sharing ability to share memory portions among processes Logical
More informationCS6401- Operating System UNIT-III STORAGE MANAGEMENT
UNIT-III STORAGE MANAGEMENT Memory Management: Background In general, to rum a program, it must be brought into memory. Input queue collection of processes on the disk that are waiting to be brought into
More informationChapter 8: Main Memory
Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and 64-bit Architectures Example:
More informationMemory Management. Memory Management
Memory Management Chapter 7 1 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as many processes into memory as possible 2 1 Memory
More informationOperating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy
Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference
More informationOperating Systems CSE 410, Spring Virtual Memory. Stephen Wagner Michigan State University
Operating Systems CSE 410, Spring 2004 Virtual Memory Stephen Wagner Michigan State University Virtual Memory Provide User an address space that is larger than main memory Secondary storage is used to
More informationVirtual Memory Outline
Virtual Memory Outline Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations Operating-System Examples
More informationCHAPTER 8 - MEMORY MANAGEMENT STRATEGIES
CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES OBJECTIVES Detailed description of various ways of organizing memory hardware Various memory-management techniques, including paging and segmentation To provide
More informationChapter 8: Memory-Management Strategies
Chapter 8: Memory-Management Strategies Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and
More informationChapter 8: Main Memory. Operating System Concepts 9 th Edition
Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel
More informationMemory and multiprogramming
Memory and multiprogramming COMP342 27 Week 5 Dr Len Hamey Reading TW: Tanenbaum and Woodhull, Operating Systems, Third Edition, chapter 4. References (computer architecture): HP: Hennessy and Patterson
More informationMemory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts
Memory management Last modified: 26.04.2016 1 Contents Background Logical and physical address spaces; address binding Overlaying, swapping Contiguous Memory Allocation Segmentation Paging Structure of
More informationChapter 8: Main Memory
Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel
More informationMain Memory (Part I)
Main Memory (Part I) Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) Main Memory 1393/8/5 1 / 47 Motivation and Background Amir
More informationMemory Management. Dr. Yingwu Zhu
Memory Management Dr. Yingwu Zhu Big picture Main memory is a resource A process/thread is being executing, the instructions & data must be in memory Assumption: Main memory is infinite Allocation of memory
More informationChapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1
Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1 Chapter 9: Memory Management Background Swapping Contiguous Memory Allocation Segmentation
More informationOperating System. Operating Systems Structure Chapter 2. Services Provided by the OS. Evolution of an Operating System
Operating System Operating Systems Structure Chapter 2 1 Is a control program that controls the execution of application programs OS must relinquish control to user programs and regain it safely and efficiently
More informationOperating Systems. Memory Management. Lecture 9 Michael O Boyle
Operating Systems Memory Management Lecture 9 Michael O Boyle 1 Memory Management Background Logical/Virtual Address Space vs Physical Address Space Swapping Contiguous Memory Allocation Segmentation Goals
More informationCS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University
Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [MEMORY MANAGEMENT] Matrices in Banker s algorithm Max, need, allocated Shrideep Pallickara Computer Science Colorado
More informationOperating Systems Unit 6. Memory Management
Unit 6 Memory Management Structure 6.1 Introduction Objectives 6.2 Logical versus Physical Address Space 6.3 Swapping 6.4 Contiguous Allocation Single partition Allocation Multiple Partition Allocation
More informationChapter 3 - Memory Management
Chapter 3 - Memory Management Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 3 - Memory Management 1 / 222 1 A Memory Abstraction: Address Spaces The Notion of an Address Space Swapping
More informationChapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition
Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation
More informationCS450/550 Operating Systems
CS450/550 Operating Systems Lecture 4 memory Palden Lama Department of Computer Science CS450/550 Memory.1 Review: Summary of Chapter 3 Deadlocks and its modeling Deadlock detection Deadlock recovery Deadlock
More informationVirtual or Logical. Logical Addr. MMU (Memory Mgt. Unit) Physical. Addr. 1. (50 ns access)
Virtual Memory - programmer views memory as large address space without concerns about the amount of physical memory or memory management. (What do the terms 3-bit (or 6-bit) operating system or overlays
More informationCS307: Operating Systems
CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn
More informationChapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition
Chapter 7: Main Memory Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 7: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure
More informationProcess Description and Control. Chapter 3
Process Description and Control Chapter 3 Contents Process states Process description Process control Unix process management Process From processor s point of view execute instruction dictated by program
More informationChapter 8: Virtual Memory. Operating System Concepts
Chapter 8: Virtual Memory Silberschatz, Galvin and Gagne 2009 Chapter 8: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating
More informationUNIT III MEMORY MANAGEMENT
UNIT III MEMORY MANAGEMENT TOPICS TO BE COVERED 3.1 Memory management 3.2 Contiguous allocation i Partitioned memory allocation ii Fixed & variable partitioning iii Swapping iv Relocation v Protection
More informationOperating Systems Overview. Chapter 2
Operating Systems Overview Chapter 2 Operating System A program that controls the execution of application programs An interface between the user and hardware Masks the details of the hardware Layers and
More informationMemory Management. Chapter 4 Memory Management. Multiprogramming with Fixed Partitions. Ideally programmers want memory that is.
Chapter 4 Memory Management Ideally programmers want memory that is Memory Management large fast non volatile 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms
More informationPreview. Memory Management
Preview Memory Management With Mono-Process With Multi-Processes Multi-process with Fixed Partitions Modeling Multiprogramming Swapping Memory Management with Bitmaps Memory Management with Free-List Virtual
More information16 Sharing Main Memory Segmentation and Paging
Operating Systems 64 16 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per
More informationVirtual Memory. Reading: Silberschatz chapter 10 Reading: Stallings. chapter 8 EEL 358
Virtual Memory Reading: Silberschatz chapter 10 Reading: Stallings chapter 8 1 Outline Introduction Advantages Thrashing Principal of Locality VM based on Paging/Segmentation Combined Paging and Segmentation
More informationChapter 4 Memory Management
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms 4.6 Design issues for paging systems 4.7
More informationPROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18
PROCESS VIRTUAL MEMORY CS124 Operating Systems Winter 2015-2016, Lecture 18 2 Programs and Memory Programs perform many interactions with memory Accessing variables stored at specific memory locations
More informationFirst-In-First-Out (FIFO) Algorithm
First-In-First-Out (FIFO) Algorithm Reference string: 7,0,1,2,0,3,0,4,2,3,0,3,0,3,2,1,2,0,1,7,0,1 3 frames (3 pages can be in memory at a time per process) 15 page faults Can vary by reference string:
More information6. Which of the following operating systems was the predecessor of Microsoft MS-DOS? a. Dynix b. Minix c. CP/M
CSCI 4500 / 8506 Sample Questions for Quiz 5 Covers Module 9 1. Why might a system treat memory allocation requests from the operating system itself differently from those generated by an application?
More informationOperating Systems. 09. Memory Management Part 1. Paul Krzyzanowski. Rutgers University. Spring 2015
Operating Systems 09. Memory Management Part 1 Paul Krzyzanowski Rutgers University Spring 2015 March 9, 2015 2014-2015 Paul Krzyzanowski 1 CPU Access to Memory The CPU reads instructions and reads/write
More informationChapter 4: Memory Management. Part 1: Mechanisms for Managing Memory
Chapter 4: Memory Management Part 1: Mechanisms for Managing Memory Memory management Basic memory management Swapping Virtual memory Page replacement algorithms Modeling page replacement algorithms Design
More informationChapter 8 Memory Management
Chapter 8 Memory Management Da-Wei Chang CSIE.NCKU Source: Abraham Silberschatz, Peter B. Galvin, and Greg Gagne, "Operating System Concepts", 9th Edition, Wiley. 1 Outline Background Swapping Contiguous
More informationChapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition
Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation
More informationChapter 8: Memory- Management Strategies
Chapter 8: Memory Management Strategies Chapter 8: Memory- Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and
More informationChapter 8. Virtual Memory
Operating System Chapter 8. Virtual Memory Lynn Choi School of Electrical Engineering Motivated by Memory Hierarchy Principles of Locality Speed vs. size vs. cost tradeoff Locality principle Spatial Locality:
More informationChapter 8 Main Memory
COP 4610: Introduction to Operating Systems (Spring 2014) Chapter 8 Main Memory Zhi Wang Florida State University Contents Background Swapping Contiguous memory allocation Paging Segmentation OS examples
More informationBasic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1
Basic Memory Management Program must be brought into memory and placed within a process for it to be run Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester Mono-programming
More information20-EECE-4029 Operating Systems Spring, 2013 John Franco
20-EECE-4029 Operating Systems Spring, 2013 John Franco Second Exam name: Question 1: Translation Look-aside Buffer (a) Describe the TLB. Include its location, why it is located there, its contents, and
More informationChapter 4 Memory Management. Memory Management
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms 4.6 Design issues for paging systems 4.7
More informationMemory management: outline
Memory management: outline Concepts Swapping Paging o Multi-level paging o TLB & inverted page tables 1 Memory size/requirements are growing 1951: the UNIVAC computer: 1000 72-bit words! 1971: the Cray
More informationMemory management: outline
Memory management: outline Concepts Swapping Paging o Multi-level paging o TLB & inverted page tables 1 Memory size/requirements are growing 1951: the UNIVAC computer: 1000 72-bit words! 1971: the Cray
More informationOperating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System
Operating System Operating System Overview Chapter 2 A program that controls the execution of application programs An interface between applications and hardware 1 2 Operating System Objectives Layers
More informationOperating System Overview. Operating System
Operating System Overview Chapter 2 1 Operating System A program that controls the execution of application programs An interface between applications and hardware 2 1 Operating System Objectives Convenience
More informationPrinciples of Operating Systems CS 446/646
Principles of Operating Systems CS 446/646 1. Introduction to Operating Systems a. Role of an O/S b. O/S History and Features Serial processing Simple batch systems Multiprogrammed batch systems Time-sharing
More informationMemory Management. Memory Management Requirements
Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable supply of ready processes to consume available processor time 1 Memory Management
More informationThe memory of a program. Paging and Virtual Memory. Swapping. Paging. Physical to logical address mapping. Memory management: Review
The memory of a program Paging and Virtual Memory Operating Systems Spring 4 Source-code is compiled into linkable object modules Memory addresses given as relative offsets Libraries contain object modules
More informationAdministrivia. Deadlock Prevention Techniques. Handling Deadlock. Deadlock Avoidance
Administrivia Project discussion? Last time Wrapped up deadlock Today: Start memory management SUNY-BINGHAMTON CS35 SPRING 8 LEC. #13 1 Handling Deadlock Deadlock Prevention Techniques Prevent hold and
More information15 Sharing Main Memory Segmentation and Paging
Operating Systems 58 15 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per
More informationFile Systems. OS Overview I/O. Swap. Management. Operations CPU. Hard Drive. Management. Memory. Hard Drive. CSI3131 Topics. Structure.
File Systems I/O Management Hard Drive Management Virtual Memory Swap Memory Management Storage and I/O Introduction CSI3131 Topics Process Management Computing Systems Memory CPU Peripherals Processes
More informationMemory Management Prof. James L. Frankel Harvard University
Memory Management Prof. James L. Frankel Harvard University Version of 5:42 PM 25-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Memory Management Ideal memory Large Fast Non-volatile
More informationQ.1 Explain Computer s Basic Elements
Q.1 Explain Computer s Basic Elements Ans. At a top level, a computer consists of processor, memory, and I/O components, with one or more modules of each type. These components are interconnected in some
More informationOperating Systems, Fall
Operating Systems: Memory management Fall 2008 Basic Memory Management: One program Monoprogramming without Swapping or Paging Tiina Niklander No memory abstraction, no address space, just an operating
More informationOperating Systems, Fall
Operating Systems: Memory management Fall 2008 Tiina Niklander Memory Management Programmer wants memory to be Indefinitely large Indefinitely fast Non volatile Memory hierarchy Memory manager handles
More informationPerformance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit
Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is to be in memory Memory management activities Keeping
More informationMemory Management. Today. Next Time. Basic memory management Swapping Kernel memory allocation. Virtual memory
Memory Management Today Basic memory management Swapping Kernel memory allocation Next Time Virtual memory Midterm results Average 68.9705882 Median 70.5 Std dev 13.9576965 12 10 8 6 4 2 0 [0,10) [10,20)
More informationProcess. One or more threads of execution Resources required for execution. Memory (RAM) Others
Memory Management 1 Learning Outcomes Appreciate the need for memory management in operating systems, understand the limits of fixed memory allocation schemes. Understand fragmentation in dynamic memory
More informationMotivation. Memory Management. Memory Management. Computer Hardware Review
Memory Management Motivation Vera Goebel Department of Informatics, University of Oslo with slides from: C. Griwodz (Ifi/UiO), P. Halvorsen (Ifi/UiO), K. Li (Princeton), A. Tanenbaum (VU Amsterdam), and
More informationComputer System Overview
Computer System Overview Introduction A computer system consists of hardware system programs application programs 2 Operating System Provides a set of services to system users (collection of service programs)
More informationMemory Management william stallings, maurizio pizzonia - sistemi operativi
Memory Management 1 summary goals and requirements techniques that do not involve virtual memory 2 memory management tracking used and free memory primitives allocation of a certain amount of memory de-allocation
More informationProcess. One or more threads of execution Resources required for execution
Memory Management 1 Learning Outcomes Appreciate the need for memory management in operating systems, understand the limits of fixed memory allocation schemes. Understand fragmentation in dynamic memory
More informationCHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.
CHAPTER 8: MEMORY MANAGEMENT By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the
More informationProcess. Memory Management
Process Memory Management One or more threads of execution Resources required for execution Memory (RAM) Program code ( text ) Data (initialised, uninitialised, stack) Buffers held in the kernel on behalf
More informationProcess. One or more threads of execution Resources required for execution. Memory (RAM) Others
Memory Management 1 Process One or more threads of execution Resources required for execution Memory (RAM) Program code ( text ) Data (initialised, uninitialised, stack) Buffers held in the kernel on behalf
More informationMemory Management Virtual Memory
Memory Management Virtual Memory Part of A3 course (by Theo Schouten) Biniam Gebremichael http://www.cs.ru.nl/~biniam/ Office: A6004 April 4 2005 Content Virtual memory Definition Advantage and challenges
More informationOperating System Overview. Chapter 2
Programmed I/O I/O module performs the action, not the processor Sets appropriate bits in the I/ O status register No interrupts occur Processor checks status until operation is complete 1 Interrupt-Driven
More informationBackground. Contiguous Memory Allocation
Operating System Lecture 8 2017.5.9 Chapter 8 (Main Memory) Background Swapping Contiguous Memory Allocation Segmentation - Paging Memory Management Selection of a memory-management method for a specific
More informationstack Two-dimensional logical addresses Fixed Allocation Binary Page Table
Question # 1 of 10 ( Start time: 07:24:13 AM ) Total Marks: 1 LRU page replacement algorithm can be implemented by counter stack linked list all of the given options Question # 2 of 10 ( Start time: 07:25:28
More informationVirtual to physical address translation
Virtual to physical address translation Virtual memory with paging Page table per process Page table entry includes present bit frame number modify bit flags for protection and sharing. Page tables can
More informationChapter 9: Virtual Memory
Chapter 9: Virtual Memory Silberschatz, Galvin and Gagne 2013 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating
More informationOperating Systems and Computer Networks. Memory Management. Dr.-Ing. Pascal A. Klein
Operating Systems and Computer Networks Memory Management pascal.klein@uni-due.de Alexander Maxeiner, M.Sc. Faculty of Engineering Agenda 1 Swapping 2 Segmentation Algorithms 3 Memory Allocation 4 Virtual
More information