Chapter 6, The Operating System Machine Level

Size: px
Start display at page:

Download "Chapter 6, The Operating System Machine Level"

Transcription

1 Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General Types: Paged Virtual Memory A program is treated as a sequential set of code addressed from 0 to N-1. Memory is defined as fixed length pages for mappings. Typical page sizes are from 512 Bytes to 64 kbytes, with 2 or 4 kbytes popular. The last page is not full. 1 of 30 ECE 3570

2 Segmented Virtual Memory A program is treated as multiple code segments (objects), each addressed from 0 to N. Code segments may be any size. Code segments are loaded into main memory when needed. Reorganizing memory allocation in the main memory may be required occasionally. 2 of 30 ECE 3570

3 Segmented-Paged Virtual Memory Memory Hierarchy Access Summary 3 of 30 ECE 3570

4 Virtual I/O Instructions For high-level, OS based computing (non-microcontroller) all I/O can be virtualized and treated as reading or writing a file. This can simplify the organization of I/O. The virtual I/O systems reads and writes logical records to and from a file.. Directory Management Instructions A directory is a file describing other files. Provide a means of organizing storage, providing metadata (data about the file/data), and provide file protection/security. 4 of 30 ECE 3570

5 Virtual Instructions for Parallel Processing Provide for the virtual or actual parallel execution of multiple processes or program threads. Process Creation Each process requires: state information to be maintained PC, PSW, stack pointer, registers, etc. an address space defined for program instructions and variables Processes must be created, monitored and terminated dynamically by the OS. Virtual instructions to control process execution may include: stop, restart, examine, and terminate. a child process spawned by a parent may use all instructions, otherwise only the OS can perform these operations 5 of 30 ECE 3570

6 Race Conditions A danger of parallel processing! The producer-consumer problem. (one of many defined and named problems) Insuring that the producer and consumer processing threads do not both suspend. When the buffer is empty, consumer must suspend When the buffer is full, the producer must suspend If producer = consumer +1, resume consumer If consumer = producer +1, resume producer 6 of 30 ECE 3570

7 A fatal flaw due to parallel, asynchronous operation In is owned/updated by the producer Out is owned/updated by the consumer If consumer completes current task, Out+1 makes In=Out while consumer completes work If producer completes task, In+1 making In=Out+1 time to wake up active consumer But if there was a race condition to read In and Out, the consumer could have read In=Out, skipped wake-up as it was awake and proceed to go to sleep forever! A problem of maintaining a consistent view of concurrent processes. To reduce the possibility of race conditions provide for strict memory consistency requirements use synchronization variables or processes (Semaphores) 7 of 30 ECE 3570

8 Process Synchronization Using Semaphores Storage variables that are centrally accessible allow multiple simultaneous reads provide for atomic writes (only accessible by one process during a read/modify/write) (suspend/sleep/halt causes the variable to be released) JAVA code examples provided for up and down and the elimination of the previous race condition. Another method that you may discover is called two-phase locking. Locks or access-rights may be granted or acquired in an acquisition phase. Once all required locks have been received, execution can be performed. After completion all locks are released before new locks are requested. If lacks are acquired canonically race conditions can be avoided Note: there are special restrictions to avoid a deadlock! 8 of 30 ECE 3570

9 Example OS UNIX/Linux All UNIX systems support POSIX based international standard most have additions! 9 of 30 ECE 3570

10 10 of 30 ECE 3570

11 11 of 30 ECE 3570

12 12 of 30 ECE 3570

13 The text uses SUN based Solaris as a reference The general structure of a typical UNIX system 13 of 30 ECE 3570

14 14 of 30 ECE 3570

15 Windows XP A 32-bit multiprogramming operating system. Supports multiple user processes, each with a full 32-bit demand-paged virtual address space. Modular kernel architecture with interactions based on a client-server model. A client sends a request to a server process The server does the work and returns a response to the client The hardware abstraction layer Simplify interfacing to hardware devices Abstract models may be used instead of the actual detail Kernel (resident in main memory, non-preemptive) Provides access to all hardware as required for operation Support interrupts, traps and exceptions Process scheduling, synchronization, multiprocessor synchronization and time management Make the rest of the OS hardware independent, 15 of 30 ECE 3570

16 The System Services/System Interface Provide an interface to the executive kernel. Accepts system calls for execution from the user. User programming environments reside above this level. Environmental subsystems layer to provide a system calling interface Keep the programmer s away from Microsoft s domain. -: Microsoft maintains system calls as proprietary and they are not standardized Application Programming Interface (API), what Microsoft allows you to know 16 of 30 ECE 3570

17 Examples of Virtual Memory Unix The address space for a single UNIX process. Data and stack are allowed to grow in opposite directions Files may be mapped into the address space for access. Multiple processes can map to the same file. If one of multiple processes attempts to write the file, a copy-on-write generates a private copy in which writing may be performed. 17 of 30 ECE 3570

18 Windows XP Virtual Memory Every process has its own virtual address space (32-bits 4 GB) that is demand-paged with a fixed 4 kb page size. Virtual pages are in one of three states: Free (cause page faults and page loading) Reserved (not available for mapping until reservation removed) Committed (once code is mapped to a page whether resident or not in Main memory) a shadow page is kept on the disk for every committed page Also access restrictions per page Read Write Executable Memory-mapped files are allowed versions are brought up-to-date when unmapped or explicitly flushed APIs for managing virtual memory 18 of 30 ECE 3570

19 Examples of Virtual I/O Unix Simple organization of the file system. everything is a file ordinary files special files - for accessing actual I/O devices file descriptor standard input, standard output, and standard error opened file identification directory root directory directories are also files (files of files) path absolute path relative path link 19 of 30 ECE 3570

20 Typical Unix Directory Structure 20 of 30 ECE 3570

21 Typical Unix Directory Management Calls Finding file information File names i-node 64byte block describes information about the file file type, file protection RWX RWX RWX (user-group-world access) number of directory entries (links to the file) owner s id owner s group file length in bytes 13 disk addresses (10) direct, (1) indirect block, (1) double and (1) triple indirect blocks time last read time last written time the I-node was last changed 21 of 30 ECE 3570

22 Windows XP Virtual File I/O File Allocation Table (FAT) - old MS-DOS (Win 95&98 and by initial install selection) NT File System (NTFS) - described in the text File is a linear sequence of bits accessed using APIs (nearest Unix equivalent shown) Principal Win32 API Funcrtions for File I/O Directory APIs Principal Win32 API Funcrtions for Directory Management Security Descriptor Access Control List (ACL) 22 of 30 ECE 3570

23 Finding file information Storage defined in Volumes. Each volume contains contains information for managing the information contained. Volume organized as a linear sequence of clusters. Main data structure in each volumes is the Master File Table (MFT) Standard information time stamps hard link count read-only and archive bits File Name Variable length up to 255 Unicode characters MS-DOS name 8.3 backward compatibility name Security Information security descriptor pointing to relevant part of centralized security information file Data small files have all data incorporated in data field larger files have pointers to clusters containing the data larger files additional entries can be chained to the available entries maximum file size 2 64 bytes 23 of 30 ECE 3570

24 Process management: This section is best dealt with in your Computer Sciences classes. The terminology has evolved but the concepts remain, so here is overview material used in my other classes to described process management and software structures that are managed. This is more of a Unix/Linux terminology discussion. Processes, Tasks and Threads A process is a program in execution. The abstract view of a process is a dynamic entity that requires four components; The program code (or an image of the executable code) The control state (part of process/program state or context) The data state (part of process/program state or context), and Process Status. Program Code Programmer s code, runtime support, library routines, and system functions that are or will execute. Control and Data States (the components of the process/program state or process context) The data state contains the set of all data variables and data values. Data variables are variable declared by the programmer to hold data values. The control state contains the set of all control variables and control values. Control variables hold control flow information that may or may not be explicitly declared. The simplest control variable for a process with a single thread of control is the program counter. Program variables define the set containing both control and data variables. The program state at time t is the sum of the data state at time t and the control state at time t. The process context is used to refer to all state and variables resident in the machine when the process is executing (context switching to move this information in and out of memory is regularly performed). 24 of 30 ECE 3570

25 Process Status/State The process status describes the current operational state of the process. A state transition diagram may be used to track a processes operating state, with the operating state defining the current process status. For example, where three simple states are used (running, blocked, and ready) the following state transition diagram could be used by the operating system. Process state transition diagram Andrew S. Tanenbaum, Modern Operating Systems, 2nd edition, Prentice Hall, ISBN: Another description of states is 25 of 30 ECE 3570

26 A 6-state process state transition diagram is shown in the text. Figure 2.4 The process state transition diagram Zombie: A completed or terminated process that has not been removed from memory. 26 of 30 ECE 3570

27 Process Descriptor and Process State Table The process descriptor is a data structure that resides in the kernel space and contains information required for the kernel to manage the process. This structure is also referred to as the process control block (http://en.wikipedia.org/wiki/process_control_block ). Required information includes: Process credentials: process identifier (PID), parent process identifier, user identifier, group identifier, etc. Process Status: current state of the process Context: the area holding the context of the process (where to save suspended program state information when suspended) Memory Map: size and access rights, memory pointers Per-Process information: as required for proper execution Global Data Structures: pointers to queues and tables managed by the kernel Process control information: Implementation and management of a process must consider the following aspects: execution mode/state, address space, context, process descriptor, and process control. The process state information may be contained in a process table. An example process table may contain of the following elements. Example Process Table Andrew S. Tanenbaum, Modern Operating Systems, 2nd edition, Prentice Hall, ISBN: of 30 ECE 3570

28 Execution Mode The operating system normally includes the following components: The kernel: the operating system program component that manages system resources, handles exceptions, and controls processes. A shell: a user interface to the operating system and/or the space in which a user program is allowed to execute a user process. Utilities: operating system software required or frequently used, such as compilers, editors, debuggers Process switching between two resident processes: process A execution, mode switching to kernel, process context switching, mode switching to process B execution. Process switching (with context switching) may be invoked by the user process (exceptions or system calls) or by asynchronous operations (timer interrupts, disk interrupts, OS etc.). Process context switching in this fashion may be a very slow operation (moving a lot of data). This is an example of a heavy-weight process (with process control block and context ). Light-Weight Processes and Threads A more efficient methodology is to allow a heavy-weight process to exist, but allow one or more light-weight process to execute within the process. The light-weight processes share the process context, can have its own context (but less required), and can execute threads without calling for a kernel context switch or other kernel support. Note: this is not exactly how the text defines it. 28 of 30 ECE 3570

29 Threads Each process may execute a single thread of control at one time. Multiple threads may exist within a process. Threads may share the resources of the process in which they run. Threads must have descriptor or state information (thread context): thread ID, thread specific stack, thread priority and status, and thread storage area (shared or unique). Thread management may be performed by the process and need not require kernel management. Solaris Thread Model Process P1 Process P2 Process P3 User Kernel Hardware = Process = Thread = Light Weight Process = Processor Figure 7.1 Sun Solaris Thread Figure User level threads executes within a process. Each process may execute one or more lightweight processes (LWP). The Kernel based LWP may also be referred to as Kernel level threads (old terminology). (New terminology would describe a kernel level thread as executing a kernel level interrupt or function). 29 of 30 ECE 3570

30 Each LWP may be responsible for multiple threads. The LWP execute as a virtual processor. They may have their own stack and context. The number of LWP allocated to a process is called the concurrency level of the process. It refers to how many threads may execute simultaneously. Each LWP can handle scheduling of threads at the User level The Kernel or OS schedules Processes or Multiple LWP to execute on a single or a pool of processors. Before LWP, a thread would be bound to and execute in a process. When the thread could not proceed, the thread would become blocked and the process would be suspended until the thread became unblocked. When multiple processes were available, the system could do something else (context switch to another process), but it takes kernel level operations to change processes. Still necessary when blocking calls by LWP to the Kernel are expected and processors are available for scheduling. With LWP, a process could more easily switch LWP context to allow the processor to continue operation. In addition, LWP could perform thread scheduling at the user level instead of performing the task at the kernel process level. As an added bonus, Thread and LWP require less storage and less time for creation, switching, and closing. Threads share the address space of a process: this includes code, data as required, and most of the process descriptor information. Terminology: Bound Threads: a thread that is bound to a particular LWP Unbounded Thread: a thread that resides in a thread pool that can be scheduled to execute on multiple LWPs. An access thread table would provide shared resources for execution. 30 of 30 ECE 3570

OPERATING SYSTEMS (OPS)

OPERATING SYSTEMS (OPS) Computing Curricula - Computer Engineering Body of Knowledge 1 OPERATING SYSTEMS (OPS) OPS0. History and overview of operating systems [core] OPS1. Operating system function and design [core] OPS2. Operating

More information

Weighted Total Mark. Weighted Exam Mark

Weighted Total Mark. Weighted Exam Mark CMP2204 Operating System Technologies Period per Week Contact Hour per Semester Total Mark Exam Mark Continuous Assessment Mark Credit Units LH PH TH CH WTM WEM WCM CU 45 30 00 60 100 40 100 4 Rationale

More information

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 3, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts

More information

Last Class: Introduction to Operating Systems. Today: OS and Computer Architecture

Last Class: Introduction to Operating Systems. Today: OS and Computer Architecture Last Class: Introduction to Operating Systems User apps OS Virtual machine interface hardware physical machine interface An operating system is the interface between the user and the architecture. History

More information

Chapter 2 Operating System Overview

Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Roadmap Operating System Objectives/Functions

More information

The Operating System Level

The Operating System Level The Operating System Level Virtual Memory File systems Parallel processing Case studies Due 6/3: 2, 3, 18, 23 Like other levels we have studied, the OS level is built on top of the next lower layer. Like

More information

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest 1. Introduction Few years ago, parallel computers could

More information

From last time. What is the maximum size of a file in bytes? What is the maximum total size of directories and files in a single disk partition?

From last time. What is the maximum size of a file in bytes? What is the maximum total size of directories and files in a single disk partition? COMP25111 Lecture 17 1/27 From last time A file system uses inodes which contain 8 block-numbers. These are for the first 7 blocks of the file and an indirect block, which just contains block-numbers for

More information

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines Operating System Concepts 3.1 Common System Components

More information

Memory Management. Today. Next Time. ! Basic memory management! Swapping! Kernel memory allocation. ! Virtual memory

Memory 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 Memory management! Ideal memory for a programmer Large Fast Non volatile Cheap! Nothing like

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ 2008, Prentice Hall I/O Devices Roadmap Organization

More information

Chapter 6 Concurrency: Deadlock and Starvation

Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 6 Concurrency: Deadlock and Starvation Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Roadmap Principals of Deadlock

More information

(Advanced Topics in) Operating Systems Winter Term 2009 / 2010. Jun.-Prof. Dr.-Ing. André Brinkmann brinkman@upb.de Universität Paderborn PC

(Advanced Topics in) Operating Systems Winter Term 2009 / 2010. Jun.-Prof. Dr.-Ing. André Brinkmann brinkman@upb.de Universität Paderborn PC (Advanced Topics in) Operating Systems Winter Term 2009 / 2010 Jun.-Prof. Dr.-Ing. André Brinkmann brinkman@upb.de Universität Paderborn PC 1 Overview Overview of chapter 3: Case Studies 3.1 Windows Architecture.....3

More information

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture Review from last time CS 537 Lecture 3 OS Structure What HW structures are used by the OS? What is a system call? Michael Swift Remzi Arpaci-Dussea, Michael Swift 1 Remzi Arpaci-Dussea, Michael Swift 2

More information

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6 Kernel comparison of OpenSolaris, Windows Vista and Linux 2.6 The idea of writing this paper is evoked by Max Bruning's view on Solaris, BSD and Linux. The comparison of advantages and disadvantages among

More information

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study CS 377: Operating Systems Lecture 25 - Linux Case Study Guest Lecturer: Tim Wood Outline Linux History Design Principles System Overview Process Scheduling Memory Management File Systems A review of what

More information

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont. Objectives To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system Chapter 2: Operating-System Structures

More information

Chapter 3 Operating-System Structures

Chapter 3 Operating-System Structures Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Processes and Non-Preemptive Scheduling. Otto J. Anshus Processes and Non-Preemptive Scheduling Otto J. Anshus 1 Concurrency and Process Challenge: Physical reality is Concurrent Smart to do concurrent software instead of sequential? At least we want to have

More information

File System Implementation II

File System Implementation II Introduction to Operating Systems File System Implementation II Performance, Recovery, Network File System John Franco Electrical Engineering and Computing Systems University of Cincinnati Review Block

More information

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System

More information

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 3, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts

More information

Operating System Components

Operating System Components Lecture Overview Operating system software introduction OS components OS services OS structure Operating Systems - April 24, 2001 Operating System Components Process management Memory management Secondary

More information

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023 Operating Systems Autumn 2013 Outline 1 2 Types of 2.4, SGG The OS Kernel The kernel is the central component of an OS It has complete control over everything that occurs in the system Kernel overview

More information

Windows OS File Systems

Windows OS File Systems Windows OS File Systems MS-DOS and Windows 95/98/NT/2000/XP allow use of FAT-16 or FAT-32. Windows NT/2000/XP uses NTFS (NT File System) File Allocation Table (FAT) Not used so much, but look at as a contrast

More information

Chapter 11 Case Study 2: Windows 2000

Chapter 11 Case Study 2: Windows 2000 Chapter 11 Case Study 2: Windows 2000 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in windows 2000 11.5 Memory management 11.6 Input/output

More information

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure CSE 120 Principles of Operating Systems Fall 2000 Lecture 3: Operating System Modules, Interfaces, and Structure Geoffrey M. Voelker Modules, Interfaces, Structure We roughly defined an OS as the layer

More information

Chapter 9: Virtual-Memory Management

Chapter 9: Virtual-Memory Management Chapter 9: Virtual-Memory Management Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocation Kernel Memory Other

More information

III. Process Scheduling

III. Process Scheduling Intended Schedule III. Process Scheduling Date Lecture Hand out Submission 0 20.04. Introduction to Operating Systems Course registration 1 27.04. Systems Programming using C (File Subsystem) 1. Assignment

More information

III. Process Scheduling

III. Process Scheduling III. Process Scheduling 1 Intended Schedule Date Lecture Hand out Submission 0 20.04. Introduction to Operating Systems Course registration 1 27.04. Systems Programming using C (File Subsystem) 1. Assignment

More information

The Operating System Machine Level

The Operating System Machine Level The Operating System Machine Level Wolfgang Schreiner Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria Wolfgang.Schreiner@risc.uni-linz.ac.at http://www.risc.uni-linz.ac.at/people/schreine

More information

Chapter 2: OS Overview

Chapter 2: OS Overview Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system:

More information

Operating Systems 4 th Class

Operating Systems 4 th Class Operating Systems 4 th Class Lecture 1 Operating Systems Operating systems are essential part of any computer system. Therefore, a course in operating systems is an essential part of any computer science

More information

What is a Thread? Similar to a process Separate thread of execution Each thread has a separate stack, program counter, and run state

What is a Thread? Similar to a process Separate thread of execution Each thread has a separate stack, program counter, and run state What is a Thread? Similar to a process Separate thread of execution Each thread has a separate stack, program counter, and run state Steven M. Bellovin February 1, 2006 1 Differences Between Processes

More information

Introduction. What is an Operating System?

Introduction. What is an Operating System? Introduction What is an Operating System? 1 What is an Operating System? 2 Why is an Operating System Needed? 3 How Did They Develop? Historical Approach Affect of Architecture 4 Efficient Utilization

More information

Objectives and Functions

Objectives and Functions Objectives and Functions William Stallings Computer Organization and Architecture 6 th Edition Week 10 Operating System Support Convenience Making the computer easier to use Efficiency Allowing better

More information

Chapter 10 Case Study 1: LINUX

Chapter 10 Case Study 1: LINUX MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 10 Case Study 1: LINUX History of UNIX and Linux UNICS PDP-11 UNIX Portable UNIX Berkeley UNIX Standard UNIX MINIX Linux UNIX/Linux Goals

More information

Introduction to Java A First Look

Introduction to Java A First Look Introduction to Java A First Look Java is a second or third generation object language Integrates many of best features Smalltalk C++ Like Smalltalk Everything is an object Interpreted or just in time

More information

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself How do Users and Processes interact with the Operating System? Users interact indirectly through a collection of system programs that make up the operating system interface. The interface could be: A GUI,

More information

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University Operating Systems CSE 410, Spring 2004 File Management Stephen Wagner Michigan State University File Management File management system has traditionally been considered part of the operating system. Applications

More information

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note: Chapter 7 OBJECTIVES Operating Systems Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the concept of virtual memory. Understand the

More information

Operating System Structures

Operating System Structures Operating System Structures Meelis ROOS mroos@ut.ee Institute of Computer Science Tartu University fall 2009 Literature A. S. Tanenbaum. Modern Operating Systems. 2nd ed. Prentice Hall. 2001. G. Nutt.

More information

File Management. Chapter 12

File Management. Chapter 12 Chapter 12 File Management File is the basic element of most of the applications, since the input to an application, as well as its output, is usually a file. They also typically outlive the execution

More information

Real Operating Systems

Real Operating Systems Lecture #12 Department of Computer Science and Technology University of Bedfordshire Written by David Goodwin, based on the lecture series of Dayou Li and the book Understanding Operating 4 th ed. by I.M.Flynn

More information

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation

More information

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation

More information

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization Lesson Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization AE3B33OSD Lesson 1 / Page 2 What is an Operating System? A

More information

Operating Systems (OS)

Operating Systems (OS) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Operating Systems (OS) An operating system defines an abstraction of hardware and manages resource sharing among the computer s users. The topics in this area explain the

More information

4. provide(s) an interface to the services provided by an operating system. A) Shared memory B) System calls C) Simulators D) Communication Ans: B

4. provide(s) an interface to the services provided by an operating system. A) Shared memory B) System calls C) Simulators D) Communication Ans: B 1. A(n) is the unit of work in a system. A) process B) operating system C) timer D) mode bit 2. A message-passing model is. A) easier to implement than a shared memory model for intercomputer communication

More information

Real Time Programming: Concepts

Real Time Programming: Concepts Real Time Programming: Concepts Radek Pelánek Plan at first we will study basic concepts related to real time programming then we will have a look at specific programming languages and study how they realize

More information

Process Management. Processes. CS 502 Spring 99 WPI MetroWest/Southboro Campus

Process Management. Processes. CS 502 Spring 99 WPI MetroWest/Southboro Campus Process Management CS 502 Spring 99 WPI MetroWest/Southboro Campus Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Threads Interprocess Communication 1 1 Process

More information

Lecture 25 Symbian OS

Lecture 25 Symbian OS CS 423 Operating Systems Design Lecture 25 Symbian OS Klara Nahrstedt Fall 2011 Based on slides from Andrew S. Tanenbaum textbook and other web-material (see acknowledgements) cs423 Fall 2011 1 Overview

More information

COS 318: Operating Systems. Virtual Machine Monitors

COS 318: Operating Systems. Virtual Machine Monitors COS 318: Operating Systems Virtual Machine Monitors Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall10/cos318/ Introduction Have been around

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 2: Operating System Structures Prof. Alan Mislove (amislove@ccs.neu.edu) Operating System Services Operating systems provide an environment for

More information

Chapter 2 System Structures

Chapter 2 System Structures Chapter 2 System Structures Operating-System Structures Goals: Provide a way to understand an operating systems Services Interface System Components The type of system desired is the basis for choices

More information

Operating Systems and Networks

Operating Systems and Networks recap Operating Systems and Networks How OS manages multiple tasks Virtual memory Brief Linux demo Lecture 04: Introduction to OS-part 3 Behzad Bordbar 47 48 Contents Dual mode API to wrap system calls

More information

CSC 4304: Systems Programming

CSC 4304: Systems Programming Course Outcomes CSC 4304 Credit Hours: 3 hours Prerequisites: CSC 4103 CSC 4304: Systems Programming Prerequisites By Topic: Basic programming knowledge in C/C++. Basic constructs of programming: e.g.

More information

Operating System Tutorial

Operating System Tutorial Operating System Tutorial OPERATING SYSTEM TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Operating System Tutorial An operating system (OS) is a collection

More information

Multi-core Programming System Overview

Multi-core Programming System Overview Multi-core Programming System Overview Based on slides from Intel Software College and Multi-Core Programming increasing performance through software multi-threading by Shameem Akhter and Jason Roberts,

More information

Process Description and Control. 2004-2008 william stallings, maurizio pizzonia - sistemi operativi

Process Description and Control. 2004-2008 william stallings, maurizio pizzonia - sistemi operativi Process Description and Control 1 Process A program in execution (running) on a computer The entity that can be assigned to and executed on a processor A unit of activity characterized by a at least one

More information

Operating Systems. Lecture2: System Calls, OS Structure

Operating Systems. Lecture2: System Calls, OS Structure Operating Systems Lecture2: System Calls, OS Structure System Calls Interface between the OS and user programs is defined by the set of system calls provided by OS Request to kernel Is like making a function

More information

Operating System Overview. Otto J. Anshus

Operating System Overview. Otto J. Anshus Operating System Overview Otto J. Anshus A Typical Computer CPU... CPU Memory Chipset I/O bus ROM Keyboard Network A Typical Computer System CPU. CPU Memory Application(s) Operating System ROM OS Apps

More information

OPERATING SYSTEM SERVICES

OPERATING SYSTEM SERVICES OPERATING SYSTEM SERVICES USER INTERFACE Command line interface(cli):uses text commands and a method for entering them Batch interface(bi):commands and directives to control those commands are entered

More information

Operating Systems Part of E1.9 - Principles of Computers and Software Engineering. Lecture 3: Introduction to process management

Operating Systems Part of E1.9 - Principles of Computers and Software Engineering. Lecture 3: Introduction to process management Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Lecture 3: Introduction to process management Objectives To introduce the concepts of: Process state and process control

More information

COS 318: Operating Systems. Snapshot and NFS

COS 318: Operating Systems. Snapshot and NFS COS 318: Operating Systems Snapshot and NFS Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall10/cos318/ Topics Revisit Transactions and Logging

More information

Operating Systems: Internals and Design Principles. Chapter 12 File Management Seventh Edition By William Stallings

Operating Systems: Internals and Design Principles. Chapter 12 File Management Seventh Edition By William Stallings Operating Systems: Internals and Design Principles Chapter 12 File Management Seventh Edition By William Stallings Operating Systems: Internals and Design Principles If there is one singular characteristic

More information

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available: Tools Page 1 of 13 ON PROGRAM TRANSLATION A priori, we have two translation mechanisms available: Interpretation Compilation On interpretation: Statements are translated one at a time and executed immediately.

More information

5) One class of services provided by an operating system is to provide new functionality that is not supported directly by the underlying hardware.

5) One class of services provided by an operating system is to provide new functionality that is not supported directly by the underlying hardware. Benha University 2 nd Term (May 2014) Final Exam Class: 3 rd Year Students Subject: Operating Systems Faculty of Computers & Informatics Date: 17/5/2014 Time: 3 hours Answer the following questions:- Question

More information

WINDOWS INS AND OUTS MICHELE SENSALARI MCT, MCSE, MCSA,

WINDOWS INS AND OUTS MICHELE SENSALARI MCT, MCSE, MCSA, WINDOWS INS AND OUTS MICHELE SENSALARI MCT, MCSE, MCSA, MCITP MICHELE@SENSALARI.COM, @ILSENSA7 DA WINDOWS 1 A WINDOWS 10 SO MajorNumber MinorNumber Note Windows Vista 6 0 6=6+0 Windows 7 6 1 7=6+1 Windows

More information

Virtual Memory. Virtual Memory

Virtual Memory. Virtual Memory Virtual Memory Gordon College Stephen Brinton Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Demand Segmentation Operating System Examples Background

More information

Chapter 1: Introduction. What is an Operating System?

Chapter 1: Introduction. What is an Operating System? Chapter 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming Batched Systems Time-Sharing Systems Personal-Computer Systems Parallel Systems Distributed Systems Real -Time

More information

AC : TEACHING AN OPERATING SYSTEM COURSE TO CET/EET STUDENTS

AC : TEACHING AN OPERATING SYSTEM COURSE TO CET/EET STUDENTS AC 2009-854: TEACHING AN OPERATING SYSTEM COURSE TO CET/EET STUDENTS Xuefu Zhou, University of Cincinnati American Society for Engineering Education, 2009 Page 14.1124.1 Teaching an Operating System Course

More information

CHAPTER 9 Exercises 9.1 Answer: 9.2 Ready Running Blocked Answer: 9.3

CHAPTER 9 Exercises 9.1 Answer: 9.2 Ready Running Blocked Answer: 9.3 CHAPTER 9 Virtual memory can be a very interesting subject since it has so many different aspects: page faults, managing the backing store, page replacement, frame allocation, thrashing, page size. The

More information

Operating Systems. Operating Systems. Operating Systems. Operating Systems. If OS s Were Airlines. If OS s Were Airlines.

Operating Systems. Operating Systems. Operating Systems. Operating Systems. If OS s Were Airlines. If OS s Were Airlines. Operating Systems Dickinson College Computer Science 354 Spring 2010 Operating Systems Professor Braught Email: braught@dickinson.edu Web: www.dickinson.edu/~braught Office:Tome 234 Office Hours: Monday

More information

Example of Standard API

Example of Standard API 16 Example of Standard API System Call Implementation Typically, a number associated with each system call System call interface maintains a table indexed according to these numbers The system call interface

More information

Windows NT. Chapter 11 Case Study 2: Windows 2000. Windows 2000 (2) Windows 2000 (1) Different versions of Windows 2000

Windows NT. Chapter 11 Case Study 2: Windows 2000. Windows 2000 (2) Windows 2000 (1) Different versions of Windows 2000 Chapter 11 Case Study 2: Windows 2000 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in windows 2000 11.5 Memory management 11.6 Input/output

More information

2. An Operating System, What For?

2. An Operating System, What For? 2. An Operating System, What For? 2. An Operating System, What For? Operating System Tasks Survey of Operating System Principles 14 / 352 2. An Operating System, What For? Batch Processing Punched Cards

More information

Class 305 Focus On Threads: An Introduction Michel de Champlain ABSTRACT

Class 305 Focus On Threads: An Introduction Michel de Champlain ABSTRACT Class 305 Focus On Threads: An Introduction Michel de Champlain ABSTRACT Threads are now supported by many new object-oriented languages. Java provides language-level support for multi-threading, resulting

More information

Chapter 10: Virtual Memory. Virtual memory. Background Demand Paging Page Replacement Allocation of Frames Thrashing Operating System Example

Chapter 10: Virtual Memory. Virtual memory. Background Demand Paging Page Replacement Allocation of Frames Thrashing Operating System Example Chapter 0: Virtual Memory Background Demand Paging Page Replacement Allocation of Frames Thrashing Operating System Example 0. Virtual memory separation of logical memory from physical memory only part

More information

Boxing them in. The Kernel. The Process. The Process. wants to be your friend. Operating System. Buggy apps can crash other apps

Boxing them in. The Kernel. The Process. The Process. wants to be your friend. Operating System. Buggy apps can crash other apps Boxing them in The wants to be your friend App 1 App 2 App 3 Operating System Reading and writing memory, managing resources, accessing I/O would you trust it all to him? Buggy apps can crash other apps

More information

Chapter 12 File Management

Chapter 12 File Management Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Roadmap Overview File organisation and Access

More information

Chapter 12 File Management. Roadmap

Chapter 12 File Management. Roadmap Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Overview Roadmap File organisation and Access

More information

COSC Operating Systems Design, Fall 2001, Byunggu Yu. Chapter 3 Operating System Structures. 1. OS Components

COSC Operating Systems Design, Fall 2001, Byunggu Yu. Chapter 3 Operating System Structures. 1. OS Components COSC4740-01 Operating Systems Design, Fall 2001, Byunggu Yu Chapter 3 Operating System Structures Process management I/O management Main Memory management File & Storage Management Protection Networking

More information

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ CS 170 Info Web page: http://www.cs.ucsb.edu/~chris/cs170/index.html Mailing lists (one for class, one

More information

This tutorial will take you through step by step approach while learning Operating System concepts.

This tutorial will take you through step by step approach while learning Operating System concepts. About the Tutorial An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. The operating system is a vital component

More information

CHAPTER 17: File Management

CHAPTER 17: File Management CHAPTER 17: File Management The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides

More information

Outline: Operating Systems

Outline: Operating Systems Outline: Operating Systems What is an OS OS Functions Multitasking Virtual Memory File Systems Window systems PC Operating System Wars: Windows vs. Linux 1 Operating System provides a way to boot (start)

More information

J.B. INSTITUTE OF TECHNOLOGY,DEHRAUDN

J.B. INSTITUTE OF TECHNOLOGY,DEHRAUDN J.B. INSTITUTE OF TECHNOLOGY,DEHRAUDN Question Bank Subject Name: Operating system Subject Code: (TCS 601) Department: CS/IT Faculty Name: Kapil Joshi Year/Sem: 3 rd /6 th Designation: A.P Answer the following

More information

History of Operating Systems. 1950s. COMPSCI s style. Total Control

History of Operating Systems. 1950s. COMPSCI s style. Total Control History of Operating Systems 1950s Why review the history of OSs? Seeing how OSs developed shows the link between the capabilities of hardware and the design of OSs. It explains why OSs are as they are

More information

COSC243 Part 2: Operating Systems

COSC243 Part 2: Operating Systems COSC243 Part 2: Operating Systems Lecture 25: Revision Zhiyi Huang Dept. of Computer Science, University of Otago Zhiyi Huang (Otago) COSC243 Lecture 25 1 / 11 Overview What s going to be in the exam?

More information

Chapter 13 UNIX Operating System

Chapter 13 UNIX Operating System Understanding Operating Systems, Fifth Edition 13-1 Chapter 13 UNIX Operating System At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion Topics Additional

More information

Operating system Dr. Shroouq J.

Operating system Dr. Shroouq J. 3 OPERATING SYSTEM STRUCTURES An operating system provides the environment within which programs are executed. The design of a new operating system is a major task. The goals of the system must be well

More information

System Structures. Services Interface Structure

System Structures. Services Interface Structure System Structures Services Interface Structure Operating system services (1) Operating system services (2) Functions that are helpful to the user User interface Command line interpreter Batch interface

More information

ICS Principles of Operating Systems

ICS Principles of Operating Systems ICS 143 - Principles of Operating Systems Lectures 17-20 - FileSystem Interface and Implementation Prof. Ardalan Amiri Sani Prof. Nalini Venkatasubramanian ardalan@ics.uci.edu nalini@ics.uci.edu Outline

More information

Chapter 9: Virtual-Memory Management

Chapter 9: Virtual-Memory Management Chapter 9: Virtual-Memory Management Chapter 9: Virtual-Memory Management Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory

More information

Embedded Systems. Chapter 6. Real-Time Operating System

Embedded Systems. Chapter 6. Real-Time Operating System Embedded Systems Chapter 6 Real-Time Operating System 6. Real-Time Operating System [8 Hrs.] 6.1 Operating System Basics 6.2 Task, Process, and Threads 6.3 Multiprocessing and Multitasking 6.4 Task Scheduling

More information

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson CS 3530 Operating Systems L02 OS Intro Part 1 Dr. Ken Hoganson Chapter 1 Basic Concepts of Operating Systems Computer Systems A computer system consists of two basic types of components: Hardware components,

More information

10.04.2008. Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

10.04.2008. Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details Thomas Fahrig Senior Developer Hypervisor Team Hypervisor Architecture Terminology Goals Basics Details Scheduling Interval External Interrupt Handling Reserves, Weights and Caps Context Switch Waiting

More information

Operating Systems: Basic Concepts and History

Operating Systems: Basic Concepts and History Introduction to Operating Systems Operating Systems: Basic Concepts and History An operating system is the interface between the user and the architecture. User Applications Operating System Hardware Virtual

More information

Operating System Structures

Operating System Structures COP 4610: Introduction to Operating Systems (Spring 2015) Operating System Structures Zhi Wang Florida State University Content Operating system services User interface System calls System programs Operating

More information