CPS120: Introduction to Computer Science Operating Systems Nell Dale John Lewis.

Slides:



Advertisements
Similar presentations
Chapter 10 Operating Systems.
Advertisements

Chapter 10 Operating Systems. 2 Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain.
Exploring the UNIX File System and File Security
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Chapter 10 Operating Systems. 2 Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain.
Linux+ Guide to Linux Certification, Second Edition
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.
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
Computer Organization and Architecture
Lecture 9: SHELL PROGRAMMING (continued) Creating shell scripts!
Guide To UNIX Using Linux Third Edition
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
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 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Chapter 10 Operating Systems.
Chapter 3 Memory Management: Virtual Memory
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Unix Command Project Justin Rogers for LS 560 Spring 2015.
Chapter 10 Operating Systems Nell Dale • John Lewis.
Chapter 10 Operating Systems *. 2 Chapter Goals Describe the main responsibilities of an operating system Define memory and process management Explain.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 8: Main Memory.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 10 Operating Systems.
Chapter Two Exploring the UNIX File System and File Security.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
6 Memory Management and Processor Management Management of Resources Measure of Effectiveness – On most modern computers, the operating system serves.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Chapter Two Exploring the UNIX File System and File Security.
1 Sec (3.2) Operating System Architecture OS. 2 Software dividing into two categories: 1. Application software 2. System Software  Operating System 
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.
Operating Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 3: Operating Systems
Operating System Principles And Multitasking
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Main Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
Distributed System Services Fall 2008 Siva Josyula
Chapter 3.7 Segmentation. Memory allocation as a concept ● This presentation is about memory management specifically about memory segmentation and paging.
Learning basic Unix command It 325 operating system.
Chapter 10 Operating Systems. 2 Chapter Goals Describe the responsibilities of an operating system Define memory and process management Explain how timesharing.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
CT101: Computing Systems Introduction to Operating Systems.
Chapter 10 Operating Systems.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Introduction to Operating System (OS)
Chapter 10 Operating Systems.
Chapter 8: Main Memory.
Exploring the UNIX File System and File Security
Shell & Kernel Concepts in Operating System
Operating Systems.
Operating Systems Lecture 5.
So far… Text RO …. printf() RW link printf Linking, loading
Operating Systems.
Lecture 3: Main Memory.
Chapter 10 Operating Systems.
Mid-Term Review Good Results Always Answer Questions
Presentation transcript:

CPS120: Introduction to Computer Science Operating Systems Nell Dale John Lewis

Operating System An operating system manages resources, and these resources are often shared in one way or another among programs that want to use them

Resource Management Multiprogramming is the technique of keeping multiple programs in main memory at the same time; these programs compete for access to the CPU so that they can execute Memory management: keeps track of what programs are in memory and where in memory they reside

Batch Processing In early systems, human operators would organize jobs into batches

Timesharing A timesharing system allows multiple users to interact with a computer at the same time Multiprogramming allowed multiple processes to be active at once, which gave rise to the ability for 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

Memory Management Operating systems must employ techniques to: –Track where and how a program resides in memory –Convert logical program addresses into actual memory addresses

Partition Memory Management When using fixed partitions, main memory is divided into a particular number of partitions When using dynamic partitions, the partitions are created to fit the need of the programs

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 Address resolution in partition memory management

Paged Memory Management Paged memory technique: main memory is divided into small fixed-size blocks of storage called frames. –A process is divided into pages that we assume are the same size as a frame The operating system maintains a separate page-map table (PMT) for each process in memory

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 A paged memory management approach

Process Management The Process States The process life cycle

The Process Control Block The operating system must manage a large amount of data for each active process Usually that data is stored in a data structure called a process control block (PCB) –Each state is represented by a list of PCBs, one for each process in that state

CPU Scheduling The act of determining which process in the ready state should be moved to the running state That is, decide which process should be given over to the CPU

CPU Scheduling Nonpreemptive scheduling: occurs when the currently executing process gives up the CPU voluntarily Preemptive scheduling: occurs when the operating system decides to favor another process, preempting the currently executing process Turnaround time for a process: amount of time between the time a process arrives in the ready state to the time it exits the running state for the last time

Unix The operating system is the piece of software that controls the computer and its resources. An operating system keeps track of users, filenames and their location, and manages the computer's memory. Other operating system functions include the allocation and monitoring of all devices and scheduling users' programs and tasks. Also, the operating system provides an interface to the user so that the user can write programs, run programs and access various computer resources.

Shell Part of the unix operating system, the shell program, performs the user interface; it takes your typed request (command) and decides what operation to perform. The commands are short, but powerful.

Search for Telnet At RUN in the START box, type telnet cidermill.wccnet.org

open cidermill.wccnet.org Type this at the prompt >

Logon Login Password Change password –passwd

date Type this command at the bash prompt > to find out the system time and date

pwd Finds current directory

echo $PATH Finds the current path that the computer uses to search for files

ls -la Lists the files that you have in your current directory with details of their creation and details on the associated permissions.

ls *.cpp Lists all files with a suffix of cpp –I.e. those that contain C++ code

cp myprog.cpp newprog.cpp Copies and existing file to a new file name in the existing directory

ls myprog*.* Lists all files that start with myprog and have a period in their name –This eliminates any directories

pwd Relists the contents of the working directory

mkdir programs Creates a new DIRECTORY within the current working directory

cd /home/faculty/pmillis/programs Changes the current directory to the directory we created in the previous command

pwd Lists the name of the current directory. We will now be in the directory created ls Lists the name of the current directory. We will now be in the directory created – Will be empty

lpstat Shows the status of the system printer

rm myprog.cpp Removes the program we created (delete)

rmdir programs Removes (deletes) the directory we created

ls -la Lists the contents of the working directory to ensure that we have properly deleted our library and file

exit Gets us out of UNIX