Mid-Term Review Good Results Always Answer Questions

Slides:



Advertisements
Similar presentations
Chapter 10 Operating Systems.
Advertisements

Allocating Memory.
Chapter 10 Operating Systems. 2 Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain.
Understanding Operating Systems1 Operating Systems Virtual Memory Thrashing Single-User Contiguous Scheme Fixed Partitions Dynamic Partitions.
Chapter 10 Operating Systems. 2 Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
Computer Organization and Architecture
Memory Management Five Requirements for Memory Management to satisfy: –Relocation Users generally don’t know where they will be placed in main memory May.
Chapter 10 Operating Systems. 2 Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain.
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
Layers and Views of a Computer System Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System.
Chapter 10 Operating Systems. 2 Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain.
Chapter 10 Operating Systems.
Chapter 3 Memory Management: Virtual Memory
Chapter 10 Operating Systems Nell Dale • John Lewis.
CS 346 – Chapter 8 Main memory –Addressing –Swapping –Allocation and fragmentation –Paging –Segmentation Commitment –Please finish chapter 8.
Chapter 10 Operating Systems *. 2 Chapter Goals Describe the main responsibilities of an operating system Define memory and process management Explain.
CPS120: Introduction to Computer Science Operating Systems Nell Dale John Lewis.
Operating System 7 MEMORY MANAGEMENT. MEMORY MANAGEMENT REQUIREMENTS.
MEMORY MANAGEMENT Presented By:- Lect. Puneet Gupta G.P.C.G. Patiala.
Chapter 7 Memory Management Seventh Edition William Stallings Operating Systems: Internals and Design Principles.
Chapter 10 Operating Systems.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
VIRTUAL MEMORY By Thi Nguyen. Motivation  In early time, the main memory was not large enough to store and execute complex program as higher level languages.
10-1 Software Categories Application software Software written to address specific needs—to solve problems in the real world Word processing programs,
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Basic Memory Management 1. Readings r Silbershatz et al: chapters
Chapter 10 Operating Systems. 2 Chapter Goals Describe the responsibilities of an operating system Define memory and process management Explain how timesharing.
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 4.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
Chapter 10 Operating Systems.
Chapter 7 Memory Management
Memory Management Chapter 7.
Computer Organization
Chapter 2: The Linux System Part 4
Memory Management By: Piyush Agarwal ( ) Akashdeep ( )
Memory Management.
ITEC 202 Operating Systems
Chapter 2 Memory and process management
Understanding Operating Systems Seventh Edition
Chapter 8: Main Memory.
CSE 120 Principles of Operating
Chapter 9 – Real Memory Organization and Management
William Stallings Computer Organization and Architecture
Chapter 10 Operating Systems.
Main Memory Management
Chapter 8: Main Memory.
Economics, Administration & Information system
So far… Text RO …. printf() RW link printf Linking, loading
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 32 Syed Mansoor Sarwar
Operating Systems.
Lecture 3: Main Memory.
Chapter 10 Operating Systems.
CSE 451: Operating Systems Autumn 2005 Memory Management
High Level Programming Languages
Operating System Chapter 7. Memory Management
Chapter 8: Memory Management strategies
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
COMP755 Advanced Operating Systems
Page Main Memory.
Presentation transcript:

Mid-Term Review Good Results Always Answer Questions Review Of The Trouble Spots Hofstra University - CSC005

High Level Programming Languages Chapter 8 Assignment 2 High Level Programming Languages Hofstra University - CSC005

Assignment Two Using the two programs below that we discussed in class... ...create a program that uses the <form> structure to say, “good morning,” or “good day,” or “good evening” Hofstra University - CSC005

Selection <html> <body> <script type="text/javascript"> var d = new Date() var time = d.getHours() if (time < 10) { document.write("<b>Good morning!</b>") } else if (time>10 && time<16) document.write("<b>Good day!</b>") else document.write("<b>Good evening!</b>") </script> </body> </html> Hofstra University, CSC005

Functions <html> <head> <script type="text/javascript"> function displaymessage() { alert("Hello World!") } </script> </head> <body> <form> <input type="button" value="Click me!" onclick="displaymessage()" > </form> </body> </html> Hofstra University - CSC005

Hints Start with Hello World program Get the next example programs to work Break things into steps and test Distinguish between <head> and <body> placement Instead of document.write (...) you will use alert (...) “play” with JavaScript http://www.w3schools.com/js/js_howto.asp Hofstra University - CSC005

Hello World <html> <body> <script type="text/javascript"> document.write("Hello World!") </script> </body> </html> Hofstra University - CSC005

Chapter 10 Operating Systems Hofstra University - CSC005

Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain how timesharing creates the virtual machine illusion Explain the relationship between logical and physical addresses Compare and contrast memory management techniques Hofstra University - CSC005

Software Categories Application software Software written to address specific needs—to solve problems in the real world Word processing programs, games, inventory control systems, automobile diagnostic programs, and missile guidance programs are all application software System software Software that manages a computer system at a fundamental level It provides the tools and an environment in which application software can be created and run Hofstra University - CSC005

Operating System An operating system manages computer resources, such as memory and input/output devices provides an interface through which a human can interact with the computer allows an application program to interact with these other system resources Hofstra University - CSC005

Operating System Figure 10.1 An operating system interacts with many aspects of a computer system. Hofstra University - CSC005

Operating System The various roles of an operating system generally revolve around the idea of “sharing nicely” An operating system manages resources, and these resources are often shared in one way or another among programs that want to use them Hofstra University - CSC005

Resource Management Multiprogramming The technique of keeping multiple programs in main memory at the same time that compete for access to the CPU so that they can execute Memory management The process of keeping track of what programs are in memory and where in memory they reside Hofstra University - CSC005

Resource Management Process A program in execution The operating system performs process management to carefully track the progress of a process and all of its intermediate states CPU scheduling determines which process in memory is executed by the CPU at any given point Hofstra University - CSC005

Batch Processing A typical computer in the 1960s and ‘70s was a large machine Its processing was managed by a human operator The operator would organize various jobs from multiple users into batches Hofstra University - CSC005

Batch Processing Figure 10.2 In early systems, human operators would organize jobs into batches Hofstra University - CSC005

Timesharing Timesharing system A system that allows multiple users to interact with a computer at the same time Multiprogramming A technique that allows multiple processes to be active at once, allowing programmers to interact with the computer system directly, while still sharing its resources In a timesharing system, each user has his or her own virtual machine, in which all system resources are (in effect) available for use Hofstra University - CSC005

Other Factors Real-time System A system in which response time is crucial given the nature of the application Response time The time delay between receiving a stimulus and producing a response Device driver A small program that “knows” the way a particular device expects to receive and deliver information. Hofstra University - CSC005

Memory Management Operating systems must employ techniques to Track where and how a program resides in memory Convert logical addresses into actual addresses Logical address (sometimes called a virtual or relative address) A value that specifies a generic location, relative to the program but not to the reality of main memory Physical address An actual address in the main memory device Hofstra University - CSC005

Memory Management Figure 10.3 Memory is a continuous set of bits referenced by specific addresses Hofstra University - CSC005

Single Contiguous Memory Management There are only two programs in memory The operating system The application program This approach is called single contiguous memory management Figure 10.4 Main memory divided into two sections Hofstra University - CSC005

Single Contiguous Memory Management A logical address is simply an integer value relative to the starting point of the program To produce a physical address, we add a logical address to the starting address of the program in physical main memory Hofstra University - CSC005

Single Contiguous Memory Management Figure 10.5 binding a logical address to a physical one Hofstra University - CSC005

Partition Memory Management Fixed partitions Main memory is divided into a particular number of partitions Dynamic partitions Partitions are created to fit the needs of the programs Hofstra University - CSC005

Partition Memory Management At any point in time memory is divided into a set of partitions, some empty and some allocated to programs Base register A register that holds the beginning address of the current partition Bounds register A register that holds the length of the current partition Figure 10.6 Address resolution in partition memory management Hofstra University - CSC005

Partition Selection Algorithms Which partition should we allocate to a new program? First fit Allocate program to the first partition big enough to hold it Best fit Allocated program to the smallest partition big enough to hold it Worst fit Allocate program to the largest partition big enough to hold it Hofstra University - CSC005

Paged Memory Management Paged memory technique A memory management technique in which processes are divided into fixed-size pages and stored in memory frames when loaded into memory Frame A fixed-size portion of main memory that holds a process page Page A fixed-size portion of a process that is stored into a memory frame Page-map table (PMT) A table used by the operating system to keep track of page/frame relationships Hofstra University - CSC005

Paged Memory Management To produce a physical address, you first look up the page in the PMT to find the frame number in which it is stored Then multiply the frame number by the frame size and add the offset to get the physical address Figure 10.7 A paged memory management approach Hofstra University - CSC005

Paged Memory Management Demand paging An important extension of paged memory management Not all parts of a program actually have to be in memory at the same time In demand paging, the pages are brought into memory on demand Page swap The act of bringing in a page from secondary memory, which often causes another page to be written back to secondary memory Hofstra University - CSC005

Paged Memory Management The demand paging approach gives rise to the idea of virtual memory, the illusion that there are no restrictions on the size of a program Too much page swapping, however, is called thrashing and can seriously degrade system performance. Hofstra University - CSC005

Homework Begin Reading Chapter Ten, Sections 10.1 – 10.2 Begin Assignment #2 – don't wait 'til the last minute!!! Hofstra University - CSC005

Have A Good Night Autumn Moon by Ansel Adams Nasa Encore Hofstra University - CSC005