Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Operating-System Structures
Operating System Structures
Chap 2 System Structures.
Operating-System Structures
Chapter 2: Operating-System Structures
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
OPERATING SYSTEMS Introduction
Os31 Chapter 3 Operating-System Structures. os32 Outlines System Components Operating System Services System Calls System Programs System Structure Virtual.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Chapter 2: Operating-System Structures
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
2.1 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Overview of topics covered Operating System Services.
INVITATION TO COMPUTER SCIENCE, JAVA VERSION, THIRD EDITION Chapter 6: An Introduction to System Software and Virtual Machines.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Operating-System Structures. Operating System Services Operating systems provide an environment for execution of programs and services to programs and.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Silberschatz, Galvin and Gagne  Operating System Concepts UNIT II Operating System Services.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Operating System Overview Tarek Abdelzaher Lawrence Angrave Vikram Adve.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
System Components Operating System Services System Calls.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
Chapter 3: Operating-System Structures
Topic 2 (Textbook - Chapter 2) Operating-System Structures
Introduction to threads
Operating Systems {week 01.b}
Chapter 2:Operating System Structures
Module 3: Operating-System Structures
2. OPERATING SYSTEM 2.1 Operating System Function
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: System Structures
Introduction to Operating System (OS)
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Ch 2 - Overview Interacting with services provided by the OS
Chapter 2: System Structures
Chapter 3: Operating-System Structures
Outline (Chapters 1 and 2)
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 2: Operating-System Structures
Operating Systems Lecture 3.
Introduction to Operating Systems
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
OPERATING SYSTEMS STRUCTURES
System calls….. C-program->POSIX call
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Presentation transcript:

Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.

 An operating system provides services:  Program execution ▪ Load programs into memory, run/suspend/halt programs, handle/display errors  I/O operations ▪ Seamlessly interact with I/O devices, including disks, networks connection, etc.  Filesystem manipulation ▪ Read/write/traverse filesystem directories, read/write files, enforce permissions, search for files

 Other operating system services:  Inter-Process Communications (IPC) ▪ Processes exchange information via shared memory, message passing, sockets, pipes, files, etc. ▪ Often spans multiple computers and networks  Error detection and recovery ▪ Detect errors in CPU, memory, I/O devices, processes, network connections, etc. ▪ Recover from errors gracefully, ensuring correct and consistent operations

 Using a layered approach, the operating system is divided into N levels or layers  Layer 0 is the hardware  Layer 1 is often the kernel  Layer N is the top-level user interface (GUI)  Each layer uses functions and services of the layer (or layers) beneath it

 Also view as a stack of services

 The core program running in an operating system is called the kernel  When a computer is switched on, a bootstrap program executes from ROM  The bootstrap program initializes the system, then loads the operating system kernel and starts its execution

 Program instructions run either in user mode or in kernel mode  Kernel mode allows the operating system to protect itself and its system components switch modes via system calls

 Kernel gives control to a user process, but may set a timer to ensure a process does not run beyond its allotted time  To avoid infinite loops, memory leaks, memory hogs, etc.  Not always effective in practice... ▪ Can you stop a runaway process before your computer crashes? Aaaaaaaugghhhh! I’m going to take this computer and...

 OS services are available via system calls  System calls are made via an interface called an Application Program Interface (API)  Common operating system APIs: ▪ Win32 API for Windows ▪ POSIX API for POSIX-based systems, including UNIX, Linux, Mac OS X ▪ Java API for Java Virtual Machine ▪ C/C++ Standard Library

 Types of system calls include:  Process control (e.g. start/suspend/stop a process) ▪ Debugging information, too  File management  Device management  Information retrieval and maintenance ▪ Current date/time, number of current users, OS version, amount of free memory, process information, etc.  Communications (e.g. IPC, network)

 An API hides the implementation details of the underlying operating system  Programmers just need to abide by the API specifications  How do we change the API or the operating system services that it offers? the dude abides...

 Example using the printf() function from C  One API may call another, which may in turn call another, and so on...

 Use registers to pass parameters:  Store memory location X that references a block of data somewhere in memory

 Implement a program to simulate caching:  Write a function called calculateAnswer() that takes integer n as input and calculates (and returns) the sum ( … + n) ▪ Pretend this method is computationally costly!  Initially, the cache (holds only 11 elements) is empty ▪ Ask the user to input a number in range ▪ If the answer is not in the cache, call calculateAnswer() and display the resulting sum; store the result in the cache ▪ If the answer is in the cache, simply display the answer This better work in C