We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byKaia Swinford
Modified over 7 years ago
Operating Systems (CSCI2413) Lecture 2 Overview phones off (please)
© De Montfort University, 2004CSCI2413 - L22 Operating-System Roles Resource management Operating System Services System Calls Kernel Virtual Memory
© De Montfort University, 2004CSCI2413 - L23 Resource Management Process Management Memory Management File Management I/O Management Secondary Management Protection Command-Interpreter
© De Montfort University, 2004CSCI2413 - L24 Hardware Resources CPUMain Memory File Store I/O Devices O.S. User Interface Process Management Memory Management File Management I/O Management Application Program User
© De Montfort University, 2004CSCI2413 - L25 Process Management A process is a program in execution. A process requires the CPU time, memory, files, and I/O devices, to accomplish its task. OS is responsible for: –Process creation and deletion. –process suspension and resumption. –Provision of mechanisms for: process synchronization process communication
© De Montfort University, 2004CSCI2413 - L26 Memory Management Memory is a repository of quickly accessible data shared by the CPU and I/O devices. OS is responsible for: –Keeping track of which parts of memory are currently being used and by whom. –Deciding which processes to load when memory space becomes available. –Allocating and de-allocating memory space as needed.
© De Montfort University, 2004CSCI2413 - L27 File Management A files represent programs (both source and object codes) and data. OS is responsible for: –File creation and deletion. –Directory creation and deletion. –Manipulating files and directories. –Mapping files onto secondary storage. –File backup on stable (nonvolatile) storage media.
© De Montfort University, 2004CSCI2413 - L28 I/O Management The I/O system consists of: –A buffer-caching system –A general device-driver interface –Drivers for specific hardware devices
© De Montfort University, 2004CSCI2413 - L29 Secondary-Storage Management Generally, disks are used for both programs and data. OS is responsible for: –Free space management –Storage allocation –Disk scheduling
© De Montfort University, 2004CSCI2413 - L210 Protection A mechanism for controlling access by programs, processes, or users to both system and user resources. Protection must: –Distinguish between authorised and unauthorised usage –Specify the controls to be imposed. –Provide a means of enforcing the control.
© De Montfort University, 2004CSCI2413 - L211 Command Interpreter Commands are given to the OS by control statements which mainly deal with: –Resource management, as explained above The program that reads and interprets control statements is variously called: –Command-line-interpreter –Shell (in UNIX). Its function is to get and execute the next command.
© De Montfort University, 2004CSCI2413 - L212 Services Program Execution – load a program into memory and run it I/O operations – OS is responsible for performing I/O operations. File Manipulation – capability to create, read, write, and delete files. Communications – Exchange of information between processes executing either on the same computer or on a distant computer connected via network.
© De Montfort University, 2004CSCI2413 - L213 Services (cont..) Error detection – detecting errors in the CPU and memory, in I/O devices, or in user program
© De Montfort University, 2004CSCI2413 - L214 System Calls An interface between a running program and the operating system. In another word, the means by which a process requests a specific kernel service.
© De Montfort University, 2004CSCI2413 - L215 Hardware Resources CPUMain Memory Disk, terminal Network interface Response to many system calls from processes Kernel Traps and faults Virtual memory InterruptsNetwork Processes User
© De Montfort University, 2004CSCI2413 - L216 Virtual Memory Virtual memory enables a computer to appear to have more memory than its real physical memory –the technique is employed by all modern OS’s All computers have more hard disk space than real physical memory (RAM) –hard disk space is used as ‘imaginary’ RAM When a process starts, rather than loading the whole program into memory, the supervisor loads instructions and data into RAM in small blocks –these memory blocks are called pages modern page sizes are typically 2K or 4K bytes
© De Montfort University, 2004CSCI2413 - L217 Virtual Memory I llustration main memory supervisor task process 3 (page 1) process 2 process 1 hard disk program 1 program 2 program 3 main memory supervisor task process 3 (page 1) process 1 process 3 (page 2) there is not enough free space in memory for all of program 3 so, initially, only page 1 is loaded in (note process 1 is still writing to hard disk in the background) process 3, page 2 is now required, so process 2 has been swapped out to hard disk and the required page has been loaded into memory
© De Montfort University, 2004CSCI2413 - L218 Swapping When physical memory (RAM) becomes full the supervisor searches for unused pages –the unused page(s) (instructions or data pages from an inactive process) are copied out to hard disk –the required page is then loaded into RAM this is called swapping If a swapped-out page is required again another page is copied out and the needed one copied in –sometimes the OS can spend so much time swapping pages that little or no useful processing is done this is called disk thrashing
© De Montfort University, 2004CSCI2413 - L219 Virtual Machines The virtual machine concept takes virtual memory one stage further –a real machine simulates a number of virtual machines –each virtual machine has its own operating system (supervisor task) in its own block of virtual memory –all machine interaction (input / output) takes place via an underlying virtual machine controller task Intel processors have provided hardware support for virtual machines since 486’s –VMWare is a virtual machine program for PC’s –allows e.g. Win 95, Win NT and Linux to run at once
© De Montfort University, 2004CSCI2413 - L220 main memory Virtual Machine I llustration user process 1 virtual machine task supervisor task 1 (e.g. Win 95) user process 2 supervisor task 2 (e.g. Win NT) user process 3 supervisor task 3 (e.g. Linux)
Operating Systems Components of OS
Interactive lesson about operating system
Operating System Structures
Chap 2 System Structures.
SLC/Ver1.0/OS CONCEPTS/Oct'991INTRODUCTION What is an Operating System? Operating Structure -System Components -OS Services -System Calls & Programs -System.
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.
COMP5102/5122 Lecture 1 Operating Systems (OS) Introduction phones off (please)
Silberschatz, Galvin and Gagne Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
1/26/2004CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Common System Components
Os31 Chapter 3 Operating-System Structures. os32 Outlines System Components Operating System Services System Calls System Programs System Structure Virtual.
Silberschatz, Galvin and Gagne Operating System Concepts Common OS Components Process Management Memory Management File Management I/O System.
Lecture 1: Introduction CS170 Spring 2015 Chapter 1, the text book. T. Yang.
Silberschatz, Galvin and Gagne Operating System Concepts Common System Components Process Management Main Memory Management File Management.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Abhinav Kamra Computer Science, Columbia University 3.1 Operating System Concepts Silberschatz, Galvin and Gagne 2002 Chapter 3: Operating-System Structures.
© 2021 SlidePlayer.com Inc. All rights reserved.