Operating Systems and Databases AE3B33OSD. RNDr. Petr Štěpán, Ph.D 13:30 15:45. Introduction
|
|
- Noah Cox
- 6 years ago
- Views:
Transcription
1 Operating Systems and Databases AE3B33OSD RNDr. Petr Štěpán, Ph.D 13:30 15:45 Introduction
2 Operating System and Databases Goal of course: To learn what is OS and how OS works To learn principles of OS design To learn algorithms and known solution for complicated problems Introduction to Databases How to use Databases Material: Book: Silberschatz A., Galvin P.B., Gange G.: Operating Systems Concepts book/os7/os7c/index.html CS 162 University of Berkeley, Youtube Lecture 1/Page 2
3 Operating Systems and Networks Examination: Lab exercise 10 points Test quiz select correct answer Test 2 more general question 8 points 12 points Topics for test will be listed on web. Result: A >=27, B >=24, C>=21, D>=18, E>=15 Lecture 1/Page 3
4 Why Operating System? OS is a program that acts as an intermediary between a user of a computer and a computer hardware. You cannot use PC without OS Operating system goals: Execute user programs and make solving user problems easier. Make the computer system convenient to use. Use the computer hardware in an efficient manner. Exploits the hardware resources of one or more processors Provides a set of services to system users Manages memory storage and I/O devices Lecture 1/Page 4
5 Where is Operating System? Operating system runs on a computer Operating system strongly depends on computer architecture On CPU type, number, instruction set On bus connection of components On devices drivers (programs that control the device) In this course we will suppose general operating system on general computer Some approaches will be documented on OS Linux, Windows, MacOS for PC like computer Lecture 1/Page 5
6 Elements of General Computer Processor (one or more) Main Memory Volatile, real memory or primary memory System bus Communication among processors, memory, and I/O modules Lecture 1/Page 6 I/O modules Secondary memory Communications devices Terminals Printers
7 CPU Top Level Components Lecture 1/Page 7
8 Control and Status Registers Instruction pointer Contains the address of an instruction to be fetched Instruction Register Contains the instruction most recently fetched Program Status Word Flags Condition codes Interrupt enable/disable Supervisor/user mode Used by privileged operating system routines to control the execution of programs Lecture 1/Page 8
9 User Visible Registers May be referenced by machine language RISC Reduced Instruction Set Computing (ARM, Power) vs. CISC Complex Instruction Set Computers (Intel) Available to all programs application programs and system programs Types of registers Data Address Index Stack pointer Lecture 1/Page 9
10 Processor x86/amd64 All registers are 64/32/16/8 bits with respect to back compatibility 64 bit registr rax 32-bit part eax 16 bit ax ah al Control and status registers EIP/RIP instruction pointer EFLAGS/RFLAGS processor state interrupt enable, system/user mode, result of operation carry, zero, overflow, sign etc. Lecture 1/Page 10
11 Processor x86/amd64 User registers Standard program values eax, ebx, ecx, edx Values and pointers esi, edi, ebp esp stack pointer used for function calling, instructions push, pop, call, ret AMD64/X86 64 new 8 user registers r8 r15, r8b lowest byte, r8w lowest word (16 bits), r8d lowest 32 bits, r8 64 bits register Lecture 1/Page 11
12 Processor x86/amd64 Processor instructions Save value AT&T movq from 64b, to movl from 32b, to movw from 16b, to movb from 8b, to registers are %ax values $, hex 0x movl $0xff, %ebx Intel mov to, from only ax number, hex postfix h mov ebx, 0ffh Lecture 1/Page 12
13 Processor x86/amd64 Processor instructions Save value pointer to memory pointer has 4 parts base+index*size+shift array of structures with fixed size, started at base address index define which item and shift inside of structure. Need not to use all 4 parts AT&T Intel movl (%ecx),%eax mov eax, [ecx] from ecx movl 3(%ebx), %eax mov eax, [ebx+3] from ebx+3 movl (%ebx, %ecx, 0x2), %eax mov eax, [ebx+ecx*2h] movl 0x20(%ebx, %ecx, 0x4), %eax mov eax, [ebx+ecx*4h 20h] Lecture 1/Page 13
14 Procesor x86/amd64 Processor instructions Arithmetic AT&T syntax operation what, with addq $0x05,%eax eax = eax + 5 subl 4(%ebp), %eax eax = eax mem(ebp 4) subl %eax, 4(%ebp) mem(ebp 4) = mem(ebp 4) eax andx bit and type of argument defined by x andb, andw, andl, andq orx bit or xorx bit xor (fastest set register to 0 ) mulx multiplication of numbers without sign divx division of numbers without sign imulx multiplication of numbers with sign idivx division of numbers with sign Lecture 1/Page 14
15 Procesor x86/amd64 Processor instructions Arithmetic with one operand AT&T syntax operation what incl %eax decw (%ebx) shlb $3, %al eax = eax + 1 mem(ebx) = mem(ebx) 1 al = al<<3 shrb $1, %bl bl= , po bl= sarb $1, %bl bl= , po bl= rorx, rolx, rcrx, rcl bit rotation, c using carry Work with stack pushl %eax popw %ebx pushf/popf pusha/popa store on stack eax 32 bit take from stack 2 bytes into ebx store/take register EFLAGS store/take all users registers Lecture 1/Page 15
16 Procesor x86/amd64 Processor instructions Conditional jumps test a1, a2tmp = a1 AND a2, cmp a1, a2 tmp = a1 a2, Z tmp=0, C tmp<0 Z tmp=0, C tmp<0 than can be used je where jump equal jne where jump not equal jg/ja where jump greater, a1 > a2 (sign/unsig) jge/jae where jump greater equal, a1 >= a2 (sign/unsig) jl/jb where jump less, a1 < a2 (sign/unsig) jle/jbe where jump less equal, a1 <= a2 (sign/unsig) jz/jnz where jump if Z=1/0 jo/jno where jump if O (overflow) = 1/0 Lecture 1/Page 16
17 Procesor x86/amd64 Processor instructions Functions call adr it is equal push %eip, jmp adr ret it is equal pop %eip Local variables in function example of implementation pushl %ebp ; Store value EBP on stack movl %esp, %ebp ; copy ESP to EBP sub $12, %esp ; decrease stack by 3x4 bajty ; first local variable address 4(%ebp), second 8(%ebp) ; function parameters 8(%ebp), next 12(%ebp), mov %ebp, %esp ; restore ESP to original value ; local variables are removed by this step pop ret %ebp ; restore value EBP ; return from function Lecture 1/Page 17
18 Procesor x86/amd64 Assembler complexity Algorithms can be translated into assembly by different ways Different approaches has different length and speed xor %ebx, %ebx mov $0, %ebx lea adresa, registr load effective address lea 12(%esp), %esp sub $12, %esp lea is faster, because it doesn t use ALU (but some processor Atom has pointer computation slower than ALU). Lecture 1/Page 18
19 Interrupt Cycle Lecture 1/Page 19
20 Interrupts Interrupt the normal sequencing of the processor Most I/O devices are slower than the processor Processor must pause to wait for device Lecture 1/Page 20
21 Program Flow of Control With Interrupts, Short I/O Wait Lecture 1/Page 21
22 Interrupts Interrupt handler: Program to service a particular I/O device Generally part of the operating system Suspends the normal sequence of execution Lecture 1/Page 22
23 Simple Interrupt Processing Lecture 1/Page 23
24 Changes in Memory and Registers for an Interrupt Lecture 1/Page 24
25 Multiple Interrupts Disable interrupts while an interrupt is being processed Lecture 1/Page 25
26 Multiple Interrupts Define priorities for interrupts Lecture 1/Page 26
27 Memory Hierarchy Faster access time, greater cost per bit Cache memory is fast but it is small because it is expensive Greater capacity, smaller cost per bit & slower access speed DVD memory is cheap but the CPU need first to read data into main memory it is slow Lecture 1/Page 27
28 Memory Hierarchy Lecture 1/Page 28
29 Going Down the Hierarchy Decreasing cost per bit Increasing capacity Increasing access time Decreasing frequency of access of the memory by the processor Locality of reference Lecture 1/Page 29
30 Cache Memory Invisible to operating system Increase the speed of memory Processor speed is faster than memory speed Exploit the principle of locality Lecture 1/Page 30
31 Cache Memory Contains a copy of a portion of main memory Processor first checks cache If not found in cache, the block of memory containing the needed information is moved to the cache and delivered to the processor Lecture 1/Page 31
32 Programmed I/O I/O module performs the action, not the processor Sets appropriate bits in the I/O status register No interrupts occur Processor checks status until operation is complete Lecture 1/Page 32
33 Interrupt Driven I/O Processor is interrupted when I/O module ready to exchange data Processor saves context of program executing and begins executing interrupt handler No needless waiting Consumes a lot of processor time because every word read or written passes through the processor Lecture 1/Page 33
34 Direct Memory Access Transfers a block of data directly to or from memory An interrupt is sent when the transfer is complete Processor continues with other work Lecture 1/Page 34
35 Direct Memory Access (DMA) I/O exchanges occur directly with memory Processor grants I/O module authority to read from or write to memory Relieves the processor responsibility for the exchange Lecture 1/Page 35
36 What OS do? Lecture 1/Page 36
37 Structure of computer Application developer User OS developer Applications System programs (utility) Operating system kernel Hardware Lecture 1/Page 37
38 Operating System structure Graphical user interface (GUI) Networking File system mng. Storage mng. I/O mng. Memory mng. Process mng. OS kernel Lecture 1/Page 38 met s y S noit cet or p Command-line interface (CLI)
39 Process Management A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. Process needs resources to accomplish its task CPU, memory, I/O, files Initialization data Process termination requires reclaim of any reusable resources Single threaded process has one program counter specifying location of next instruction to execute Process executes instructions sequentially, one at a time, until completion Multi threaded process has one program counter per thread Typically system has many processes, some user, some operating system running concurrently on one or more CPUs Concurrency by multiplexing the CPUs among the processes / threads Lecture 1/Page 39
40 Process Management Activities The operating system is responsible for the following activities in connection with process management: Creating and deleting both user and system processes Suspending and resuming processes Providing mechanisms for process synchronization Providing mechanisms for process communication Providing mechanisms for deadlock handling Lecture 1/Page 40
41 Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is in memory when Optimizing CPU utilization and computer response to users Memory management activities Keeping track of which parts of memory are currently being used and by whom Deciding which processes (or parts thereof) and data to move into and out of memory Allocating and deallocating memory space as needed Lecture 1/Page 41
42 Storage Management OS provides uniform, logical view of information storage Abstracts physical properties to logical storage unit file Each medium is controlled by device (i.e., disk drive, tape drive) Varying properties include access speed, capacity, data transfer rate, access method (sequential or random) File System management Files usually organized into directories Access control on most systems to determine who can access what OS activities include Creating and deleting files and directories Primitives to manipulate files and dirs Mapping files onto secondary storage Backup files onto stable (non volatile) storage media Lecture 1/Page 42
43 I/O Subsystem One purpose of OS is to hide specialities of hardware devices from the user I/O subsystem responsible for Memory management of I/O including buffering (storing data temporarily while it is being transferred), caching (storing parts of data in faster storage for performance), spooling (the overlapping of output of one job with input of other jobs) General device driver interface Drivers for specific hardware devices Lecture 1/Page 43
44 Device Status Table Lecture 1/Page 44
45 User Operating System Interface CLI allows direct command entry Sometimes implemented in kernel, mostly by system programs Sometimes multiple flavors implemented shells Primarily fetches a command from user and executes it Some commands are built in, sometimes just names of programs If the latter, adding new features doesn t require shell modification Lecture 1/Page 45
46 User Operating System Interface GUI a user friendly desktop metaphor interface Usually mouse, keyboard, and monitor Icons represent files, programs, actions, etc. Various mouse buttons over objects in the interface cause various actions (provide information, options, execute function, open directory (known as a folder) Invented at Xerox PARC 1981, followed by Apple 1983, X windows (client server)1984 and MS Windows Many systems include both CLI and GUI interfaces Microsoft Windows is GUI with CLI command shell Apple Mac OS X as Aqua GUI interface with UNIX kernel underneath and shells available Solaris is CLI with optional GUI interfaces (Java Desktop, KDE) Lecture 1/Page 46
47 How Operating System works? Graphical user interface (GUI) Command-line interface (CLI) How can OS kernel safety communicate with user? OS kernel Lecture 1/Page 47 Solution: System services using system calls! oit cet or p met s y S Networking File system mng. Storage mng. I/O mng. Memory mng. Process mng.
48 Operating System Services Operating System Services are all function that OS kernel offers for user programs. There are several sets of OS Services One set of operating system services provides functions that are helpful to the user: User interface Almost all operating systems have a user interface (UI) Varies between Command Line (CLI), Graphics User Interface (GUI), Batch Program execution The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error) I/O operations A running program may require I/O, which may involve a file or an I/O device. File system manipulation The file system is of particular interest. Obviously, programs need to read and write files and directories, create and delete them, search them, list file Information, permission management. Lecture 1/Page 48
49 Operating System Services Communications Processes may exchange information, on the same computer or between computers over a network Communications may be via shared memory or through message passing (packets moved by the OS) Error detection OS needs to be constantly aware of possible errors May occur in the CPU and memory hardware, in I/O devices, in user program For each type of error, OS should take the appropriate action to ensure correct and consistent computing Debugging facilities can greatly enhance the user s and programmer s abilities to efficiently use the system Lecture 1/Page 49
50 OS protection by System services Transition from User to Kernel Mode and back User processes are running in protected mode Kernel is running in supervisor mode Lecture 1/Page 50
51 System Calls Programming interface to the services provided by the OS Typically written in a high level language (C or C++) Mostly accessed by programs via a high level Application Program Interface (API) rather than direct system call use Three most common APIs are Win32 API for Windows, POSIX API for POSIX based systems (including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM) Why to use APIs rather than system calls? (Note that the system call names used throughout this text are generic) Lecture 1/Page 51
Operating System Services
CSE325 Principles of Operating Systems Operating System Services David Duggan dduggan@sandia.gov January 22, 2013 Reading Assignment 3 Chapter 3, due 01/29 1/23/13 CSE325 - OS Services 2 What Categories
More informationCS420: Operating Systems. OS Services & System Calls
OS Services & System Calls James Moscola Department of Engineering & Computer Science York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Operating
More informationChapter 2: Operating-System Structures. Operating System Concepts 8 th Edition
Chapter 2: Operating-System Structures Operating System Concepts 8 th Edition Silberschatz, Galvin and Gagne 2009 Chapter 2: Operating-System Structures Different Services of Operating System. System Calls-
More informationChapter 2: Operating-System Structures
Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls (important!) Types of System Calls (important!) System
More informationObjectives. Chapter 2: Operating-System Structures. 2.1 Operating System Services
Objectives Chapter 2: Operating-System Structures To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system
More informationChapter 2: Operating-System Structures. Chapter 2: Operating-System Structures. Objectives. Operating System Services
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 informationChapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on
Chapter 2: Operating-System Structures Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Objectives To describe the services an operating system provides to users, processes, and
More informationChapter 2: Operating-System Structures
Chapter 2: Operating-System Structures Silberschatz, Galvin and Gagne 2009 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System
More informationChapter 2: Operating-System Structures
Chapter 2: Operating-System Structures 2.1 Silberschatz, Galvin and Gagne 2009 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System
More informationChapter 1: Introduction. Operating System Concepts 9 th Edit9on
Chapter 1: Introduction Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Chapter 1: Introduction 1. What Operating Systems Do 2. Computer-System Organization 3. Computer-System
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 2 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 2 System I/O System I/O (Chap 13) Central
More informationChapter 2: Operating-System Structures. Operating System Concepts Essentials 8 th Edition
Chapter 2: Operating-System Structures Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 2: Operating-System Structures Operating System Services User Operating
More informationChapter 2: System Structures
Chapter 2: System Structures Chapter 2: System Structures 2.1 Operating-System Services 2.2 User and Operating-System Interface 2.3 System Calls 2.4 Types of System Calls 2.5 System Programs 2.6 Operating-System
More informationChapter 2: Operating-System
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
More informationChap2: Operating-System Structures
Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they
More informationChapter 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 informationChapter 2: System Structures. Operating System Concepts 9 th Edition
Chapter 2: System Structures Silberschatz, Galvin and Gagne 2013 Chapter 2: System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs
More informationLecture 2 Operating System Structures (chapter 2)
Bilkent University Department of Computer Engineering CS342 Operating Systems Lecture 2 Operating System Structures (chapter 2) Dr. İbrahim Körpeoğlu http://www.cs.bilkent.edu.tr/~korpe 1 References The
More informationIntroduction to Operating Systems (Part II)
Introduction to Operating Systems (Part II) Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) Introduction 1393/6/24 1 / 45 Computer
More informationChapter 2. Operating-System Structures
Chapter 2 Operating-System Structures 2.1 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System
More informationChapter 1: Introduction. Operating System Concepts 8 th Edition,
Chapter 1: Introduction Operating System Concepts 8 th Edition, Silberschatz, Galvin and Gagne 2009 Operating-System Operations Interrupt driven by hardware Software error or system request creates exception
More informationChapter 1: Introduction
Chapter 1: Introduction Chapter 1: Introduction What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System Operations Process Management
More information7/20/2008. What Operating Systems Do Computer-System Organization
Introduction to Operating Systems Introduction What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System Operations Process Management
More informationPractical Malware Analysis
Practical Malware Analysis Ch 4: A Crash Course in x86 Disassembly Revised 1-16-7 Basic Techniques Basic static analysis Looks at malware from the outside Basic dynamic analysis Only shows you how the
More informationTo provide a grand tour of the major operating systems components To provide coverage of basic computer system organization
Introduction What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System Operations Process Management Memory Management Storage Management
More informationChapter 2: Operating-System Structures. Operating System Concepts 9 th Edition
Chapter 2: Operating-System Structures Silberschatz, Galvin and Gagne 2013 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System
More informationChapter 1: Introduction. Operating System Concepts 8th Edition,
Chapter 1: Introduction, Administrivia Project 0 due Monday. Reading: 2.1 2.7. Next Time: Operating system structure. 1.2 Outline Process management. Storage management and characteristics. Miscellaneous
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI
More informationChapter 1: Introduction. Chapter 1: Introduction
Chapter 1: Introduction Chapter 1: Introduction What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System Operations Process Management
More informationChapter 1: Introduction
Chapter 1: Introduction Silberschatz, Galvin and Gagne 2009 Chapter 1: Introduction What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System
More informationComputer System Overview. Chapter 1
Computer System Overview Chapter 1 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users Manages secondary memory and I/O devices Basic Elements
More informationTDDI04, K. Arvidsson, IDA, Linköpings universitet Operating System Structures. Operating System Structures Overview. Operating System Services
TDDI04 Concurrent Programming, Operating Systems, and Real-time Operating Systems Operating System Structures [SGG7] Chapter 2 Copyright Notice: The lecture notes are mainly based on Silberschatz s, Galvin
More informationCS420: Operating Systems
OS Overview James Moscola Department of Engineering & Computer Science York College of Pennsylvania Contents of Introduction slides are courtesy of Silberschatz, Galvin, Gagne Operating System Structure
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 2 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 2 What is an Operating System? What is
More informationLast 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 4, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts
More informationOperating Systems. Lecture Course in Autumn Term 2015 University of Birmingham. Eike Ritter. September 22, 2015
Lecture Course in Autumn Term 2015 University of Birmingham September 22, 2015 Course Details Overview Course Details What is an Operating System? OS Definition and Structure Lecture notes and resources:
More informationCS420: Operating Systems
OS Overview James Moscola Department of Engineering & Computer Science York College of Pennsylvania Contents of Introduction slides are courtesy of Silberschatz, Galvin, Gagne Operating System Structure
More informationChapter 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 informationCourse Details. Operating Systems with C/C++ Course Details. What is an Operating System?
Lecture Course in Autumn Term 2013 University of Birmingham Lecture notes and resources: http://www.cs.bham.ac.uk/ exr/teaching/lectures/opsys/13_14 closed facebook group: UoBOperatingSystems anyone registered
More informationCS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 21: Generating Pentium Code 10 March 08
CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 21: Generating Pentium Code 10 March 08 CS 412/413 Spring 2008 Introduction to Compilers 1 Simple Code Generation Three-address code makes it
More informationOPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems
OPERATING SYSTEMS: Lesson 1: Introduction to Jesús Carretero Pérez David Expósito Singh José Daniel García Sánchez Francisco Javier García Blas Florin Isaila 1 Why study? a) OS, and its internals, largely
More informationComputer System Overview
Computer System Overview Operating Systems 2005/S2 1 What are the objectives of an Operating System? 2 What are the objectives of an Operating System? convenience & abstraction the OS should facilitate
More informationComputer System Overview
Computer System Overview Chapter 1 Muhammad Adri, MT 1 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users Manages secondary memory and
More informationCS307: Operating Systems
CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn
More informationCS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017
CS 471 Operating Systems Yue Cheng George Mason University Fall 2017 Introduction o Instructor of Section 002 Dr. Yue Cheng (web: cs.gmu.edu/~yuecheng) Email: yuecheng@gmu.edu Office: 5324 Engineering
More informationLow-Level Essentials for Understanding Security Problems Aurélien Francillon
Low-Level Essentials for Understanding Security Problems Aurélien Francillon francill@eurecom.fr Computer Architecture The modern computer architecture is based on Von Neumann Two main parts: CPU (Central
More informationComputer Systems Overview
Computer Systems Overview Maurizio Pizzonia slides adattate da W. Stalling Operating Systems: Internals and Design Principles http://williamstallings.com/os/os5e.html 1 Basic Elements Processor Main Memory
More informationEuropean University of Lefke. Instructor: Dr. Arif SARI
European University of Lefke CIS 105 Operating Systems Instructor: Dr. Arif SARI Email: asari@eul.edu.tr Introduction 1.1 Silberschatz, Galvin and Gagne 2009 Chapter 1: Introduction, Silberschatz, Galvin
More informationOPERATING SYSTEM OVERVIEW
OPERATING SYSTEM OVERVIEW Contents Basic hardware elements Interrupts Most I/O devices are much slower than the processor Active waiting cycle (polling) Interrupt request signal Interrupt mechanism An
More informationCompiler Construction D7011E
Compiler Construction D7011E Lecture 8: Introduction to code generation Viktor Leijon Slides largely by Johan Nordlander with material generously provided by Mark P. Jones. 1 What is a Compiler? Compilers
More informationComputer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.
BASIC ELEMENTS Simplified view: Processor Slide 1 Computer System Overview Operating Systems Slide 3 Main Memory referred to as real memory or primary memory volatile modules 2004/S2 secondary memory devices
More informationRicardo Rocha. Department of Computer Science Faculty of Sciences University of Porto
Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,
More informationOperating-System Structures
Recap Chapter 2: Operating-System Structures Presented By: Dr. El-Sayed M. El-Alfy Note: Most of the slides are compiled from the textbook and its complementary resources From: OS by Tanenbaum, 2008 March
More informationAssembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam
Assembly Language Lecture 2 - x86 Processor Architecture Ahmed Sallam Introduction to the course Outcomes of Lecture 1 Always check the course website Don t forget the deadline rule!! Motivations for studying
More informationChapter 1: Introduction
Chapter 1: Introduction Chapter 1: Introduction What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System Operations Process Management
More informationCS241 Computer Organization Spring 2015 IA
CS241 Computer Organization Spring 2015 IA-32 2-10 2015 Outline! Review HW#3 and Quiz#1! More on Assembly (IA32) move instruction (mov) memory address computation arithmetic & logic instructions (add,
More informationChapter 2 Operating-System Structures
This chapter will discuss the following concepts: 2.1 Operating System Services 2.2 User Operating System Interface 2.3 System Calls 2.4 System Programs 2.5 Operating System Design and Implementation 2.6
More informationThe Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.
The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. Operating System Services User Operating System Interface
More informationCS30002: Operating Systems. Arobinda Gupta Spring 2017
CS30002: Operating Systems Arobinda Gupta Spring 2017 General Information Textbook: Operating System Concepts, 8 th or 9 th Ed, by Silberschatz, Galvin, and Gagne I will use materials from other books
More informationAssembly Language. Lecture 2 x86 Processor Architecture
Assembly Language Lecture 2 x86 Processor Architecture Ahmed Sallam Slides based on original lecture slides by Dr. Mahmoud Elgayyar Introduction to the course Outcomes of Lecture 1 Always check the course
More informationx86 assembly CS449 Fall 2017
x86 assembly CS449 Fall 2017 x86 is a CISC CISC (Complex Instruction Set Computer) e.g. x86 Hundreds of (complex) instructions Only a handful of registers RISC (Reduced Instruction Set Computer) e.g. MIPS
More informationChapter 2: System Structures. Operating System Concepts 9 th Edition
Chapter 2: System Structures Silberschatz, Galvin and Gagne 2013 Chapter 2: System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs
More informationSecond Part of the Course
CSC 2400: Computer Systems Towards the Hardware 1 Second Part of the Course Toward the hardware High-level language (C) assembly language machine language (IA-32) 2 High-Level Language g Make programming
More informationHow Software Executes
How Software Executes CS-576 Systems Security Instructor: Georgios Portokalidis Overview Introduction Anatomy of a program Basic assembly Anatomy of function calls (and returns) Memory Safety Programming
More informationx86 architecture et similia
x86 architecture et similia 1 FREELY INSPIRED FROM CLASS 6.828, MIT A full PC has: PC architecture 2 an x86 CPU with registers, execution unit, and memory management CPU chip pins include address and data
More informationLecture 2 - Fundamental Concepts
Lecture 2 - Fundamental Concepts Instructor : Bibhas Ghoshal (bibhas.ghoshal@iiita.ac.in) Autumn Semester, 2015 Bibhas Ghoshal IOSY 332C & IOPS 332C: OS Autumn Semester, 2015 1 / 43 Lecture Outline Operating
More informationCSC 2400: Computer Systems. Towards the Hardware: Machine-Level Representation of Programs
CSC 2400: Computer Systems Towards the Hardware: Machine-Level Representation of Programs Towards the Hardware High-level language (Java) High-level language (C) assembly language machine language (IA-32)
More informationDM510 Operating Systems. Jacob Aae Mikkelsen
DM510 Operating Systems Jacob Aae Mikkelsen DM510 2014 DM510 Course Introduction Teacher: Jacob Aae Mikkelsen ( jamik@imada.sdu.dk ) Teaching Assistant: Daniel Fentz Johansen ( dfjohansen@gmail.com ) Course
More informationCHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.
CHAPTER 2: SYSTEM STRUCTURES By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 2: System Structures Operating System Services User Operating System Interface System Calls Types of System
More informationOperating Systems. Overview. Dr Alun Moon. Computing, Engineering and Information Sciences. 27th September 2011
Operating Systems Overview Dr Alun Moon Computing, Engineering and Information Sciences 27th September 2011 Dr Alun Moon (ceis:nu) Operating Systems 27th September 2011 1 / 16 Chapters 1 & 2 Galvin Silberschatz.
More informationCSC 8400: Computer Systems. Machine-Level Representation of Programs
CSC 8400: Computer Systems Machine-Level Representation of Programs Towards the Hardware High-level language (Java) High-level language (C) assembly language machine language (IA-32) 1 Compilation Stages
More informationProcess Layout and Function Calls
Process Layout and Function Calls CS 6 Spring 07 / 8 Process Layout in Memory Stack grows towards decreasing addresses. is initialized at run-time. Heap grow towards increasing addresses. is initialized
More informationLecture 1 Introduction (Chapter 1 of Textbook)
Bilkent University Department of Computer Engineering CS342 Operating Systems Lecture 1 Introduction (Chapter 1 of Textbook) Dr. İbrahim Körpeoğlu http://www.cs.bilkent.edu.tr/~korpe 1 References The slides
More informationWhat is a Compiler? Compiler Construction SMD163. Why Translation is Needed: Know your Target: Lecture 8: Introduction to code generation
Compiler Construction SMD163 Lecture 8: Introduction to code generation Viktor Leijon & Peter Jonsson with slides by Johan Nordlander Contains material generously provided by Mark P. Jones What is a Compiler?
More informationOPERATING SYSTEMS Lecture Notes. Prepared by K.Rohini, Assistant Professor, CSE Department, GVPCEW.
OPERATING SYSTEMS Lecture Notes Prepared by K.Rohini, Assistant Professor, CSE Department, GVPCEW. UNIT-I Computer System and Operating System Overview: Overview of computer operating systems, operating
More informationProgram Exploitation Intro
Program Exploitation Intro x86 Assembly 04//2018 Security 1 Univeristà Ca Foscari, Venezia What is Program Exploitation "Making a program do something unexpected and not planned" The right bugs can be
More informationCPS104 Recitation: Assembly Programming
CPS104 Recitation: Assembly Programming Alexandru Duțu 1 Facts OS kernel and embedded software engineers use assembly for some parts of their code some OSes had their entire GUIs written in assembly in
More informationSRIMAAN COACHING CENTRE-TRB-COMPUTER INSTRUCTORS STUDY MATERIAL CONTACT: III
COACHING CENTRE-TRICHY- TRB-COMPUTER INSTRUCTOR-COMPUTER SCIENCE STUDY MATERIAL-CONTACT: 87226 217 TRB-COMPUTER INSTRUCTOR COMPUTER SCIENCE UNIT III OPERATING SYSTEM 1% DISCOUNT FOR ALL PGTRB MATERIALS
More informationSystem Call System Program Linker/Loader with Examples Types of computing Environment
CS341: Operating System Lect06 : 13 th Aug 2014 System Program Linker/Loader with Examples Types of computing Environment Dr A Sahu Dept of Comp Sc & Engg Indian Institute of Technology Guwahati 1 2 OS
More informationLast 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture
Last 2 Classes: Introduction to Operating Systems & C++ tutorial User apps OS Virtual machine interface hardware physical machine interface An operating system is the interface between the user and the
More informationCS 31: Intro to Systems ISAs and Assembly. Martin Gagné Swarthmore College February 7, 2017
CS 31: Intro to Systems ISAs and Assembly Martin Gagné Swarthmore College February 7, 2017 ANNOUNCEMENT All labs will meet in SCI 252 (the robot lab) tomorrow. Overview How to directly interact with hardware
More informationMemory Models. Registers
Memory Models Most machines have a single linear address space at the ISA level, extending from address 0 up to some maximum, often 2 32 1 bytes or 2 64 1 bytes. Some machines have separate address spaces
More informationW4118: PC Hardware and x86. Junfeng Yang
W4118: PC Hardware and x86 Junfeng Yang A PC How to make it do something useful? 2 Outline PC organization x86 instruction set gcc calling conventions PC emulation 3 PC board 4 PC organization One or more
More informationChapter 2: System Structures
Chapter 2: Operating System Structures Operating System Services System Calls Chapter 2: System Structures System Programs Operating System Design and Implementation Operating System Structure Virtual
More informationFunction Calls COS 217. Reading: Chapter 4 of Programming From the Ground Up (available online from the course Web site)
Function Calls COS 217 Reading: Chapter 4 of Programming From the Ground Up (available online from the course Web site) 1 Goals of Today s Lecture Finishing introduction to assembly language o EFLAGS register
More informationCS 537 Lecture 2 Computer Architecture and Operating Systems. OS Tasks
CS 537 Lecture 2 Computer Architecture and Operating Systems Michael Swift OS Tasks What is the role of the OS regarding hardware? What does the OS need from hardware to perform this role? 1 Computer Hardware
More informationModule 1 Introduction/OS Overview
Module 1 Introduction/OS Overview Reading: Chapter 1 and 2 (Silberchatz) Objective: Quick overview of computer system organization the processor (CPU), memory, and input/output, architecture and general
More informationOperating-System Structures
Operating-System Structures System Components Operating System Services System Calls System Programs System Structure System Design and Implementation System Generation 1 Common System Components Process
More informationEECS 3221 Operating System Fundamentals
EECS 3221 Operating System Fundamentals Instructor: Prof. Hui Jiang Email: hj@cse.yorku.ca Web: http://www.eecs.yorku.ca/course/3221 General Info 3 lecture hours each week 2 assignments (2*5%=10%) 1 project
More informationEECS 3221 Operating System Fundamentals
General Info EECS 3221 Operating System Fundamentals Instructor: Prof. Hui Jiang Email: hj@cse.yorku.ca Web: http://www.eecs.yorku.ca/course/3221 3 lecture hours each week 2 assignments (2*5%=10%) 1 project
More informationQ.1 Explain Computer s Basic Elements
Q.1 Explain Computer s Basic Elements Ans. At a top level, a computer consists of processor, memory, and I/O components, with one or more modules of each type. These components are interconnected in some
More informationMajor Requirements of an OS
Process CSCE 351: Operating System Kernels Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization while providing reasonable response time Allocate
More informationX86 Addressing Modes Chapter 3" Review: Instructions to Recognize"
X86 Addressing Modes Chapter 3" Review: Instructions to Recognize" 1 Arithmetic Instructions (1)! Two Operand Instructions" ADD Dest, Src Dest = Dest + Src SUB Dest, Src Dest = Dest - Src MUL Dest, Src
More informationIA32 Intel 32-bit Architecture
1 2 IA32 Intel 32-bit Architecture Intel 32-bit Architecture (IA32) 32-bit machine CISC: 32-bit internal and external data bus 32-bit external address bus 8086 general registers extended to 32 bit width
More informationFour Components of a Computer System
Four Components of a Computer System Operating System Concepts Essentials 2nd Edition 1.1 Silberschatz, Galvin and Gagne 2013 Operating System Definition OS is a resource allocator Manages all resources
More informationModule 3: Operating-System Structures
Module 3: Operating-System Structures System Components Operating-System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation Operating
More informationUNIT 2. OPERATING SYSTEM STRUCTURES
This document can be downloaded from www.chetanahegde.in with most recent updates. 1 UNIT 2. OPERATING SYSTEM STRUCTURES 2.1 INTRODUCTION An OS provides the environment within which the programs are executed.
More informationSOEN228, Winter Revision 1.2 Date: October 25,
SOEN228, Winter 2003 Revision 1.2 Date: October 25, 2003 1 Contents Flags Mnemonics Basic I/O Exercises Overview of sample programs 2 Flag Register The flag register stores the condition flags that retain
More informationCPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu
CPSC 341 OS & Networks Introduction Dr. Yingwu Zhu What to learn? Concepts Processes, threads, multi-processing, multithreading, synchronization, deadlocks, CPU scheduling, networks, security Practice:
More informationx86 assembly CS449 Spring 2016
x86 assembly CS449 Spring 2016 CISC vs. RISC CISC [Complex instruction set Computing] - larger, more feature-rich instruction set (more operations, addressing modes, etc.). slower clock speeds. fewer general
More information