Operating Systems Introduction
|
|
- Chastity Payne
- 5 years ago
- Views:
Transcription
1 Scuola Superiore Sant Anna Operating Systems Introduction Giuseppe Lipari
2 Fundamentals Algorithm: It is the logical procedure to solve a certain problem Informally specified a a sequence of elementary steps that an execution machine must follow to solve the problem not necessarily expressed in a formal programming language! Program: It is the implementation of an algorithm in a programming language Can be executed several times with different inputs Process: An instance of a program OS Course that, - SSSAgiven a set of inputs values, produces a set of outputs 2
3 Operating System An operating system is a program that Provides an abstraction of the physical machine through a simple interface Each part of the interface is a service An OS is also a resource manager With the term resource we denote all physical entities of a computing machine The OS provides access to the physical resources The OS provides abstract resources (for example, a 3 file, a virtual page in memory, etc.)
4 Levels of abstraction User Level Kim Programmer Level Web Browser System Level Lisa Shell Bill Videogame Printer Daemon Interface (System API) Operating System Virtual Memory Scheduler Virtual File Sys. Device Device Device Device Device Device Driver Driver Driver Driver Driver Driver HW Level Main Board CPU Keyboard Network Card Printer Video Card Printer Hard disk 4
5 Abstraction mechanisms Why abstraction? Programming the HW directly has several drawbacks It is difficult and error prone It is not portable Suppose you want to write a program that reads a text file from disk and outputs it on the screen Without a proper interface it is virtually impossible! 5
6 Abstraction Mechanisms Application programming interface (API) Provides a convenient and uniform way to access to one service so that HW details are hidden to the high level programmer Applications do not depend on the specific HW The programmer can concentrate on higher level tasks Example For reading a file, linux and many other unix OS provide the open(), read() system calls that, given a file name allow to load the data from an external support 6
7 Historical Perspective In the beginning was the batch processor Huge machines, not very powerful Used mainly for scientific computation and military applications Program were executed one at time They were called jobs Program were simple sequential computations Read the input Compute Produce output 7
8 Batch processor jobs Program Punch Cards CPU Result Batch = non interactive The program could not be interrupted or suspended (non preemptive) Scheduling: Priority based (e.g. first the military...) FIFO Shortest job first (SJF) 8
9 Drawbacks CPU was inactive for long intervals of time While reading the punch cards, the CPU had to wait The punch card reader was very slow Solution: spooling Use a magnetic disk (a faster I/O device) Job were grouped into job pools While executing one job of a pool, read the next one into disk When a job finishes, load the next one from the disk 9 Spool = symultaneous peripheral operation on line
10 Interactivity The need for interaction For reading input from the keyboard during the computation For showing intermediate results For saving intermediate result on magnetic support Input/output It can be done with a technique called polling Wait until the device is ready and get/put the data Handshaking Again, the CPU was inactive during I/O operations 10
11 Multi programming The natural evolution was concurrency IDEA: while a job is reading/writing from/to a I/O device, schedule another job to execute (preemption) jobs CPU Result Preemption 11
12 Multi programming Multi programming is very common in real life Consider a lawyer that has many clients FIFO policy: serving one client at time, from the beginning until the court sentence In italy, a sentence can be given after more than 10 years. Imagine a poor lawyer trying to survive with one client for ten years! In reality, the lawyer adopts a TIME SHARING policy! All of us adopts a time sharing policy when doing many jobs at the same time! 12
13 The role of the Operating System Structure of a multi programmed system Who decides when a job is suspended? Who decided who is to be executed next? In the first computers, these tasks were carried out by the application itself Each job could suspend itself and pass the turn to the next job (co routines) However, this is not very general or portable! Today, the OS provide the multiprogramming services The scheduler module chooses which job executes next 13
14 Time sharing systems In time sharing systems The time line is divided into slots, or rounds, each one of maximum length equal to a fixed time quantum If the executing job blocks on a I/O operation, or if the jobs quantum finishes, it is suspended to be executed Process Switch later CPU 14
15 Time sharing systems In time sharing systems Each process executes approximately as it were alone on a slower processor The OS (thanks to the scheduler) virtualizes the processor One single processor is seen as many (slower) parallel processors (one for each process) We will see that an OS can virtualize many HW resources Memory, disk, network, etc Time sharing systems are not predicatable The amount of execution time received by one process depends on the number of processes in the system If we want predictable behavior, we must use a RTOS 15
16 Multi user systems The first computers were very powerful and very expensive An university could afford only one mainframe, but many people needed to access the same computer Therefore, the mainframe would give simultanous access to many users at the same time This is an obvious extension of the multi process system One or more processes for each user 16
17 Multi user systems Mainframe Dumb Terminal Dumb Terminal Dumb Terminal The terminals had no computing power A keyboard + a monitor + a serial line Every computation was carried out in the mainframe It is like having one computer with many keyboards and 17 videos
18 Multi user system Another dimension was necessary The concept of user and account was born The first privacy concerns were raised Access rules Passwords Criptography was applied for the first time in a non military environment! This makes the system more complex! 18
19 Distributed systems Finally, distribution was introduced Thanks to the DARPA, the TCP/IP protocol was developed and internet was born The major universities in the USA connected their mainframes Mail, telnet, ftp, etc The natural evolution was internet and the world wide web All of this was possible thanks to The freedom of circulation of ideas The liberal environment in universities The need for communication and sharing information 19
20 Distributed systems More flexibility Client/server architectures One server provides services to remote clients Example: web, ftp, databases, etc It is possible to distribute an application Different parts execute on different computers and then communicate each other to exchange information and synchronise Massively parallel programs can be easily implemented Migration Processes can move from one computer to another to OS Course - SSSA carry out a certain service
21 Classification of Operating Systems The OS provides an abstraction of a physical machine To allow portability To make programmer s life easier The level of abstraction depends on the application context the kind of services an OS provides depend on which kind of services the application requires General purpouses OS should provide a wide range of services to satisfy as many users as possible Specialised OS provide only a limited set of specialised services OS can be classified depending on the application context General purpouse (windows, linux, etc), servers, micro kernel, 21
22 Services Virtual processor An OS provides concurrency between processes Many processes are executed at the same time in the same system Each process executes for a fraction of the processor bandwidth (as it were on a dedicated slower processor) Provided by the scheduling sub system Provided by almost all OS, from nano kernels to general purpouse systems CPU CPU CPU CPU 22
23 Services Virtual memory Physical memory is limited; In old systems, the number of concurrent processes was limited by the amount of physical memory IDEA: extend the physical memory by using a fast mass storage system (disk) Some of the processes stay in memory, some are temporarily saved on the disk When a process must be executed, if on the disk, it is first loaded in memory and then executed This technique is called swapping 23
24 Virtual memory and physical memory Process A D A D B E B C E C A CPU Process B Process C Process E Process D Process B A B A Process E Process C D Virtual memory Physical memory Disk Virtual memory is very large (virtually infinite!) The program functionality does not depend on the size of the memory The program performance could be reduced by the swapping mechanism 24
25 Virtual Memory Advantages Virtual infinite memory The program is not limited by the size of the physical memory Disadvantages If we have too many programs, we spend most of the time swapping back and forth Performance degradation! Not suitable for real time systems It is not possible to guarantee a short response time 25
26 Virtual File System Basic concepts File: sequence of data bytes It can be on a mass storage (hard disk, cd rom, etc.) It can be on special virtual devices (i.e. RAM disks) It can be on a remote system! Directory: list of files Usually organised in a tree Represents how files are organised on the mass storage system Virtualisation In most OS, external serial devices (like the console or the video terminal) can be seen as files (i.e. stdin, stout, stderr) 26
27 Virtual file system A good virtual file system provides additional features: Buffering & caching For optimising I/O from block devices Transactions For example the Reiser FS Fault tolerance capabilities For example, the RAID system Virtual file system is not provided by all OS categories Micro and nano kernels do not even provide a file system! 27
28 Privacy and access rules When many users are supported We must avoid that non authorised users access restricted information Usually, there are two or more classes of users Supervisors Normal users Each resource in the system can be customised with proper access rules that prevent access from non authorised users For example, the password file should be visible only to the 28 system supervisor
29 Scuola Superiore Sant Anna Overview of hardware architectures
30 Basic blocks CPU Main Memory Other I/O devices BUS Disk keyboard Video 30
31 The processor Set of registers CPU R0 IP: instruction pointer R1 SP: stack pointer SP R2 A0 A3: general registers CR R3 CR: control register IP Execution Units Execution unit Arithmetic unit Fetching unit Branch prediction unit Other components OS Course - SSSA Pipeline 31
32 Processor registers User visible registers Used as temporary buffers for processor operations Can be in any number RISC architectures: array of registers CISC architectures: set of registers dedicated to specific operations Control and Status registers IP Instruction pointer SP Stack Pointer CR Control Register (or PSW Program Status Word) 32
33 Modes of operation Many processors have at least two modes of operation Supervisor mode All instructions are allowed Kernel routines execute in supervisor mode The OS must access all features of the system User mode Not all instructions are allowed User programs execute in user mode Some instruction (for example, disabling interrupts) cannot be invoked directly by user programs Switching OS Course It is possible to switch from- SSSA user mode to supervisor mode 33 with
34 Main Memory and bus The RAM Sequence of data locations Contains both instructions (TEXT) and data variables The bus A set of wires Address wires Data wires The number of data wires is the amount of bits that can be read with one memory access OS Course - SSSA Current PC buses: 32 bit 34
35 Instruction execution We distinguish at least two phases Fetching: the instruction is read from the memory Execute: the instruction is executed Data processing instr. the result is stored in registers Load instr. the data is loaded from main memory Store the data is stored in main memory Control the flow of execution may change (change IP) Some instruction may be the combination of different types Fetch next Execute Start Halt instruction instruction 35
36 Stack Frames The stack is used to Stack Frame Save local variables Implement function calling Every time a function is called The parameters are saved on the stack Call <address>: The current IP is saved on the stack The routine saves the registers that will be modified on the stack local variables are defined on the stack the stack is When the function is over cleaned and the RET instruction is called y x R2 R1 R0 BP IP Parameters Stack 36
37 External devices Memory I/O devices Set of data registers Set of control registers mapped on certain memory locations A3B0 A3B2 A3B4 A3B6 A3B8 A3BA A3BC BUS R0 FF08 CPU IP FF0A SP R2 CR I/O device interface R3 FF00 D0 CR0 FF06 FF02 D1 CR1 FF04 D2 CR2 R1 37
38 I/O operations Structure of an I/O operation Phase 1: prepare the device for the operation In case of output, data is transferred to the data buffer registers The operation parameters are set with the control registers The operation is triggered Phase 2: wait for the operation to be performed Devices are much slower than the processor It may take a while to get/put the data on the device Phase 3: complete the operation Usually, cleaning up the control registers 38
39 Example of input operation Phase 1: nothing Phase 2: wait until bit 0 of CR0 becomes 1 Phase 3: read data from D0 and reset bit 0 of CR0 BUS R0 FF08 CPU IP FF0A SP R2 CR R3 FF00 D0 CR0 FF06 FF02 D1 CR1 FF04 D2 CR2 I/O device interface R1 39
40 Example of output operation Phase 1: write data to D1 and set bit 0 of CR1 Phase 2: wait for bit 1 of CR1 to become 1 Phase 3: clean CR1 BUS R0 FF08 CPU IP FF0A SP R2 CR R3 FF00 D0 CR0 FF06 FF02 D1 CR1 FF04 D2 CR2 I/O device interface R1 40
41 Temporal diagram Polling This technique is called polling because the processor polls the device until the operation is completed In general, it can be a waste of time The processor can executed something useful while the device is working How the processor can know when the device has completed the I/O operation? 41
42 Interrupts Every processor supports an interrupt mechanism The processor has a special pin, called interrupt request (IRQ) Upon reception of a signal on the IRQ pin, If interrupts are enabled, the processor suspends execution and invokes an interrupt handler routine If interrupts are disabled, the request is pending and will be served as soon as the interrupts are enabled Interrupts? Start Fetch next instruction Execute instruction Serve Interrupt Halt 42
43 Interrupt handling Every interrupt is associated one handler When the interrupt arrives The processor suspend what is doing Pushes CR on the stack Calls the handler (pushes the IP on the stack) The handler saves the registers that will be modified on the stack Executes the interrupt handling code Restores the registers Executes IRET (restores IP and CR) R1 R0 IP CR Stack 43
44 Input with interrupts Phase 1: do nothing Phase 2: execute other code Phase 3: upon reception of the interrupt, read data from D0, clean CR0 and return to the interrupted code BUS R0 FF08 CPU IP FF0A SP R2 CR R3 FF00 D0 CR0 FF06 FF02 D1 CR1 FF04 D2 CR2 I/O device interface IRQ R1 44
45 Interrupts Let s compare polling and interrupt Polling code Interrupt handler Phase 1 Phase 2 Normal code Phase 3 45
46 The meaning of phase 3 Phase 3 is used to signal the device that the interrupt has been served It is an handshake protocol The device signal the interrupt The processor serves the interrupt and exchange the data The processor signal the device that it has finished serving the interrupt Now a new interrupt from the same device can be raised 46
47 Interrupt disabling Two special instructions STI: enables interrupts CLI: disables interrupts These instructions are privileged Can be done only in supervisor mode When an interrupt arrives the processor goes Pending automatically in supervisor mode Interrupt Interrupt handler Normal code CLI STI 47
48 Many sources of interrupts Usually, processor have one single IRQ pin However, there are several different I/O devices Intel processors use an external Interrupt Controller 8 IRQ input lines, one output line CPU IRQ Interrupt Controller BUS IRQ0 IRQ1 IRQ2 IRQ3 IRQ4 IRQ5 IRQ6 IRQ7 I/O Device I/O Device 48
49 Nesting interrupts Interrupt disabling With CLI, all interrupts are disabled When an interrupt is raised, before calling the interrupt handler, interrupts are automatically disabled However, it is possible to explicitely call STI to re enable interrupts even during an interrupt handler In this way, we can nest interrupts One interrupt handler can itself be interrupted by another 49 interrupt
50 Interrupt controller Interrupts have priority IRQ0 has the highest priority, IRQ7 the lowest When an interrupt from a I/O device is raised If there are other interrupts pending If it is the highest priority interrupt, it is forwarded to the processor (raising the IRQ line) Otherwise, it remains pending, and it will be served when the processor finishes serving the current interrupt 50
51 Nesting interrupts Why nesting interrupts? If interrupts are not nested, important services many be delayed too much For example, IRQ0 is the timer interrupt The timer interrupt is used to set the time reference of the system If the timer interrupt is delayed too much, it can get lost (i.e. another interrupt from the timer could arrive before the previous one is served) Losing a timer interrupt can cause losing the correct time reference in the OS Therefore, the timer interrupt has the highest priority and 51 can interrupt everything, even another slower interrupt
52 Nested interrupts High priority Interrupt handler Slow Interrupt handler Normal code 52
53 Atomicity An hardware instruction is atomic if it cannot be interleaved with other instructions Atomic operations are always sequentialized Atomic operations cannot be interrupted They are safe operations For example, transferring one word from memory to register or viceversa Non atomic operations can be interrupted They are not safe operations Non elementary operations are not atomic 53
54 Non atomic operations Consider a simple operation like x = x+1; In assembler LD R0, x INC R0 ST x,ro A simple operation like incrementing a memory variable, may consist of three machine instructions If the same operation is done inside an interrupt handler, an inconsistency can arise! 54
55 Interrupt on non atomic operations Handler code Normal code int x=0;... x = x + 1; LD R0, x INC R0 ST x, RO... void handler(void) {... x = x + 1;... } Save registers... LD R0, x INC R0 ST x, RO... Restore registers CPU R0 1? 0 x 0 1 Saved registers 0 memory 55
56 Solving the problem in single processor One possibility is to disable interrupts in critical sections... CLI LD R0, x INC R0 ST x, RO STI... Save registers... LD R0, x INC R0 ST x, RO... Restore registers 56
57 Multi processor systems Symmetric multi processors (SMP) Identical processors One shared memory CPU 0 CPU 1 CPU 2 CPU 3 Memory 57
58 Multi processor systems Two typical organisations Master / Slave The OS runs on one processor only (master), CPU0 When a process requires a OS service, sends a message to CPU0 Symmetric One copy of the OS runs indipendentely on each processor They must synchronise on common data structures We will analyse this configuration later in the course 58
59 Low level synchronisation in SMP The atomicity problem cannot be solved by disabling the interrupts! If we disable the interrupts, we protect the code from interrupts. It is not...easy to protect from other processors CPU 0 LD R0, x INC R0 ST x, RO... CPU 1... LD R0, x INC R0 ST x, RO LD LD INC INC ST ST... R0, x R0, x R0 R0 x, R0 x, R0 (CPU (CPU (CPU (CPU (CPU (CPU 0) 1) 0) 1) 0) 1) 59
60 Low level synchronisation in SMP Most processors support some special instruction XCH Exchange register with memory location TST If memory location = 0, set location to 1 and void xch(register memory x) int tst(int return true (1), R,else return false (0) x) { } int tmp; tmp = R; R = x; x=tmp; XCH and TST are atomic! { } if (x == 1) return 0; else { x=1; return 1; } 60
61 Locking in multi processors We define one variable s If s == 0, then we can perform the critical operation If s == 1, the must wait before performing the critical operation Using XCH or TST we can implement two functions: and unlock() lock() void lock(int s) { } int a = 1; while (a==1) XCH (s,a); void unlock(int s) { s = 0; } void lock(int x) { while (TST (s) == 0); } 61
62 Locking in multi processors CPU 0 CPU 1 L0: TST JZ LD INC ST LD ST... s L0 R0, x R0 x, R0 R1, 0 s, R1 L0: TST JZ LD INC ST LD ST... s L0 R0, x R0 x, RO R1, 0 s, R1 Lock(s) x=x+1 Unlock(s) Lock(s) x=x+1 Unlock(s) TST TST JZ JZ LD TST INC JZ ST TST LD JZ ST TST... JZ... LD s s L0 L0 R0, x s R0 L0 x, R0 s R1, 0 L0 s, R1 s L0 R0, x (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU (CPU 0) 1) 0) 1) 0) 1) 0) 1) 0) 1) 0) 1) 0) 1) 0) 1) 0) 1) 62
63 Locking The lock / unlock operations are safe No matter how you interleave the operations, there is no possibility that the critical parts interleave However, lock() is an active wait and a possible wast of time The problem of locking is very general Solutions will be presented and analysed in greater details later in the course 63
Concurrent programming: Introduction I
Computer Architecture course Real-Time Operating Systems Concurrent programming: Introduction I Anna Lina Ruscelli - Scuola Superiore Sant Anna Contact info Email a.ruscelli@sssup.it Computer Architecture
More informationSistemi in Tempo Reale
Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Giuseppe Lipari Introduzione alla concorrenza Fundamentals Algorithm: It is the logical procedure to solve a certain problem It
More informationSistemi in Tempo Reale
Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Giuseppe Lipari Introduzione alla concorrenza Fundamentals Algorithm: It is the logical procedure to solve a certain problem It
More informationScuola Superiore Sant Anna. I/O subsystem. Giuseppe Lipari
Scuola Superiore Sant Anna I/O subsystem Giuseppe Lipari Input Output and Device Drivers ERI Gennaio 2008 2 Objectives of the I/O subsystem To hide the complexity From the variability of the devices Provide
More informationLast class: Today: Course administration OS definition, some history. Background on Computer Architecture
1 Last class: Course administration OS definition, some history Today: Background on Computer Architecture 2 Canonical System Hardware CPU: Processor to perform computations Memory: Programs and data I/O
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 informationI/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13
I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of
More informationUNIT I OPERATING SYSTEMS OVERVIEW
UNIT I OPERATING SYSTEMS OVERVIEW Computer System Overview-Basic Elements, Instruction Execution, Interrupts, Memory Hierarchy, Cache Memory, Direct Memory Access, Multiprocessor and Multicore Organization.
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 informationUnit 2 : Computer and Operating System Structure
Unit 2 : Computer and Operating System Structure Lesson 1 : Interrupts and I/O Structure 1.1. Learning Objectives On completion of this lesson you will know : what interrupt is the causes of occurring
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 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 informationToday: Computer System Overview (Stallings, chapter ) Next: Operating System Overview (Stallings, chapter ,
Lecture Topics Today: Computer System Overview (Stallings, chapter 1.1-1.8) Next: Operating System Overview (Stallings, chapter 2.1-2.4, 2.8-2.10) 1 Announcements Syllabus and calendar available Consulting
More informationChapter 1 Computer System Overview
Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Seventh Edition By William Stallings Objectives of Chapter To provide a grand tour of the major computer system components:
More informationGUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATION SEMESTER: III
GUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATION SEMESTER: III Subject Name: Operating System (OS) Subject Code: 630004 Unit-1: Computer System Overview, Operating System Overview, Processes
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 informationIntroduction to Computer Systems and Operating Systems
Introduction to Computer Systems and Operating Systems Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered 1. Computer History 2. Computer System
More informationChapter 1 Computer System Overview
Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Ninth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides
More informationOPERATING SYSTEMS UNIT - 1
OPERATING SYSTEMS UNIT - 1 Syllabus UNIT I FUNDAMENTALS Introduction: Mainframe systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered Systems Real Time Systems Handheld Systems -
More informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013
CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 TOPICS TODAY I/O Architectures Interrupts Exceptions FETCH EXECUTE CYCLE 1.7 The von Neumann Model This is a general
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 informationChapter 1: Introduction
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 informationB.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION
Introduction :- An exploits the hardware resources of one or more processors to provide a set of services to system users. The OS also manages secondary memory and I/O devices on behalf of its users. So
More informationIntroduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?
Introduction CSCI 315 Operating Systems Design Department of Computer Science What is an Operating System? A Modern Computer System Computer System Components Disks... Mouse Keyboard Printer 1. Hardware
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 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 informationPC Interrupt Structure and 8259 DMA Controllers
ELEC 379 : DESIGN OF DIGITAL AND MICROCOMPUTER SYSTEMS 1998/99 WINTER SESSION, TERM 2 PC Interrupt Structure and 8259 DMA Controllers This lecture covers the use of interrupts and the vectored interrupt
More informationCSC 553 Operating Systems
CSC 553 Operating Systems Lecture 1- Computer System Overview Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users Manages secondary memory
More informationOperating System: an Overview. Lucia Dwi Krisnawati, MA
Operating System: an Overview Lucia Dwi Krisnawati, MA What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals:
More informationModule 1: Introduction
Module 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 Systems
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 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 Organization ECE514. Chapter 5 Input/Output (9hrs)
Computer Organization ECE514 Chapter 5 Input/Output (9hrs) Learning Outcomes Course Outcome (CO) - CO2 Describe the architecture and organization of computer systems Program Outcome (PO) PO1 Apply knowledge
More informationMain Points of the Computer Organization and System Software Module
Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a
More informationConcurrent programming: Introduction II. Anna Lina Ruscelli Scuola Superiore Sant Anna
Concurrent programming: Introduction II Anna Lina Ruscelli Scuola Superiore Sant Anna Outline Concepts of Process Thread Mode switch Process switch Introduction to competition and collaboration 2 Computer
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 informationModule 1: Introduction. What is an Operating System?
Module 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 Systems
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 informationUC 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/ Input and Output Input/Output Devices The OS is responsible for managing I/O devices Issue requests Manage
More informationAdvanced Parallel Architecture Lesson 3. Annalisa Massini /2015
Advanced Parallel Architecture Lesson 3 Annalisa Massini - 2014/2015 Von Neumann Architecture 2 Summary of the traditional computer architecture: Von Neumann architecture http://williamstallings.com/coa/coa7e.html
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 informationModule 1: Introduction
Module 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 informationOperating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst
Operating Systems CMPSCI 377 Spring 2017 Mark Corner University of Massachusetts Amherst Last Class: Intro to OS An operating system is the interface between the user and the architecture. User-level Applications
More informationAnnouncement. Exercise #2 will be out today. Due date is next Monday
Announcement Exercise #2 will be out today Due date is next Monday Major OS Developments 2 Evolution of Operating Systems Generations include: Serial Processing Simple Batch Systems Multiprogrammed Batch
More informationMisc. Third Generation Batch Multiprogramming. Fourth Generation Time Sharing. Last Time Evolution of OSs
Third Generation Batch Multiprogramming Misc. Problem: but I/O still expensive; can happen in middle of job Idea: have a pool of ready jobs in memory, switch to one when another needs I/O When one job
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 information19: I/O. Mark Handley. Direct Memory Access (DMA)
19: I/O Mark Handley Direct Memory Access (DMA) 1 Interrupts Revisited Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires. Interrupts
More informationOperating Systems. V. Input / Output
Operating Systems V. Input / Output Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Devices of a Computer System Applications OS CPU 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 Systems: Internals and Design Principles, 7/E William Stallings. Chapter 1 Computer System Overview
Operating Systems: Internals and Design Principles, 7/E William Stallings Chapter 1 Computer System Overview What is an Operating System? Operating system goals: Use the computer hardware in an efficient
More informationIntroduction. CS3026 Operating Systems Lecture 01
Introduction CS3026 Operating Systems Lecture 01 One or more CPUs Device controllers (I/O modules) Memory Bus Operating system? Computer System What is an Operating System An Operating System is a program
More informationInput/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture
168 420 Computer Architecture Chapter 6 Input/Output Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In different formats All slower than CPU
More informationCHAPTER-1: INTRODUCTION TO OPERATING SYSTEM:
CHAPTER-1: INTRODUCTION TO OPERATING SYSTEM: TOPICS TO BE COVERED 1.1 Need of Operating System 1.2 Evolution of os 1.3 operating system i. Batch ii. iii. iv. Multiprogramming Time sharing Real time v.
More informationOperating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester
Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System
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 informationOperating Systems Fundamentals. What is an Operating System? Focus. Computer System Components. Chapter 1: Introduction
Operating Systems Fundamentals Overview of Operating Systems Ahmed Tawfik Modern Operating Systems are increasingly complex Operating System Millions of Lines of Code DOS 0.015 Windows 95 11 Windows 98
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 informationChapter 1: Introduction
Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real -Time Systems Handheld Systems Computing Environments
More informationChapter 1: Introduction. Operating System Concepts 8th Edition,
Chapter 1: Introduction, Administrivia Reading: Chapter 1. Next time: Continued Grand Tour. 1.2 Outline Common computer system devices. Parallelism within an operating system. Interrupts. Storage operation,
More informationCSC 2405: Computer Systems II
CSC 2405: Computer Systems II Dr. Mirela Damian http://www.csc.villanova.edu/~mdamian/csc2405/ Spring 2016 Course Goals: Look under the hood Help you learn what happens under the hood of computer systems
More informationOPERATING SYSTEMS. Goals of the Course. This lecture will cover: This Lecture will also cover:
OPERATING SYSTEMS This lecture will cover: Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S services This Lecture will
More informationOperating System Review
COP 4225 Advanced Unix Programming Operating System Review Chi Zhang czhang@cs.fiu.edu 1 About the Course Prerequisite: COP 4610 Concepts and Principles Programming System Calls Advanced Topics Internals,
More informationIntroduction to Operating Systems. Chapter Chapter
Introduction to Operating Systems Chapter 1 1.3 Chapter 1.5 1.9 Learning Outcomes High-level understand what is an operating system and the role it plays A high-level understanding of the structure of
More informationOPERATING SYSTEMS. COMS W1001 Introduction to Information Science. Boyi Xie
1 OPERATING SYSTEMS COMS W1001 Introduction to Information Science Boyi Xie 2 Announcement Homework 1 is available Grace days A total of 5 days for 5 HWs If all grace days have been used, 50% of the points
More informationPart I Overview Chapter 1: Introduction
Part I Overview Chapter 1: Introduction Fall 2010 1 What is an Operating System? A computer system can be roughly divided into the hardware, the operating system, the application i programs, and dthe users.
More informationOPERATING SYSTEMS CS136
OPERATING SYSTEMS CS136 Jialiang LU Jialiang.lu@sjtu.edu.cn Based on Lecture Notes of Tanenbaum, Modern Operating Systems 3 e, 1 Chapter 5 INPUT/OUTPUT 2 Overview o OS controls I/O devices => o Issue commands,
More informationComputer System Overview
Computer System Overview Introduction A computer system consists of hardware system programs application programs 2 Operating System Provides a set of services to system users (collection of service programs)
More informationCS 326: Operating Systems. CPU Scheduling. Lecture 6
CS 326: Operating Systems CPU Scheduling Lecture 6 Today s Schedule Agenda? Context Switches and Interrupts Basic Scheduling Algorithms Scheduling with I/O Symmetric multiprocessing 2/7/18 CS 326: Operating
More informationProcesses. CS 475, Spring 2018 Concurrent & Distributed Systems
Processes CS 475, Spring 2018 Concurrent & Distributed Systems Review: Abstractions 2 Review: Concurrency & Parallelism 4 different things: T1 T2 T3 T4 Concurrency: (1 processor) Time T1 T2 T3 T4 T1 T1
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 informationIntroduction to Operating Systems. Chapter Chapter
Introduction to Operating Systems Chapter 1 1.3 Chapter 1.5 1.9 Learning Outcomes High-level understand what is an operating system and the role it plays A high-level understanding of the structure of
More informationAdvanced Parallel Architecture Lesson 3. Annalisa Massini /2015
Advanced Parallel Architecture Lesson 3 Annalisa Massini - Von Neumann Architecture 2 Two lessons Summary of the traditional computer architecture Von Neumann architecture http://williamstallings.com/coa/coa7e.html
More informationGeneric Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals
William Stallings Computer Organization and Architecture 7 th Edition Chapter 7 Input/Output Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In
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 informationChapter 1: Introduction. Operating System Concepts 9 th Edit9on
Chapter 1: Introduction Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Objectives To describe the basic organization of computer systems To provide a grand tour of the major
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 informationPrinciples of Operating Systems CS 446/646
Principles of Operating Systems CS 446/646 1. Introduction to Operating Systems a. Role of an O/S b. O/S History and Features Serial processing Simple batch systems Multiprogrammed batch systems Time-sharing
More informationHardware OS & OS- Application interface
CS 4410 Operating Systems Hardware OS & OS- Application interface Summer 2013 Cornell University 1 Today How my device becomes useful for the user? HW-OS interface Device controller Device driver Interrupts
More informationI/O Management and Disk Scheduling. Chapter 11
I/O Management and Disk Scheduling Chapter 11 Categories of I/O Devices Human readable used to communicate with the user video display terminals keyboard mouse printer Categories of I/O Devices Machine
More informationWeek 11 Programmable Interrupt Controller
Week 11 Programmable Interrupt Controller 8259 Programmable Interrupt Controller The 8259 programmable interrupt controller (PIC) adds eight vectored priority encoded interrupts to the microprocessor.
More informationReal-Time Programming
Real-Time Programming Week 7: Real-Time Operating Systems Instructors Tony Montiel & Ken Arnold rtp@hte.com 4/1/2003 Co Montiel 1 Objectives o Introduction to RTOS o Event Driven Systems o Synchronization
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 informationProcess- Concept &Process Scheduling OPERATING SYSTEMS
OPERATING SYSTEMS Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne PROCESS MANAGEMENT Current day computer systems allow multiple
More informationQUESTION BANK UNIT I
QUESTION BANK Subject Name: Operating Systems UNIT I 1) Differentiate between tightly coupled systems and loosely coupled systems. 2) Define OS 3) What are the differences between Batch OS and Multiprogramming?
More informationOperating system Dr. Shroouq J.
2.2.2 DMA Structure In a simple terminal-input driver, when a line is to be read from the terminal, the first character typed is sent to the computer. When that character is received, the asynchronous-communication
More informationIntroduction to Operating. Chapter Chapter
Introduction to Operating Systems Chapter 1 1.3 Chapter 1.5 1.9 Learning Outcomes High-level understand what is an operating system and the role it plays A high-level understanding of the structure of
More informationCS330: Operating System and Lab. (Spring 2006) I/O Systems
CS330: Operating System and Lab. (Spring 2006) I/O Systems Today s Topics Block device vs. Character device Direct I/O vs. Memory-mapped I/O Polling vs. Interrupts Programmed I/O vs. DMA Blocking vs. Non-blocking
More informationOperating Systems. Operating System Structure. Lecture 2 Michael O Boyle
Operating Systems Operating System Structure Lecture 2 Michael O Boyle 1 Overview Architecture impact User operating interaction User vs kernel Syscall Operating System structure Layers Examples 2 Lower-level
More informationTypes and Functions of Win Operating Systems
LEC. 2 College of Information Technology / Software Department.. Computer Skills I / First Class / First Semester 2017-2018 Types and Functions of Win Operating Systems What is an Operating System (O.S.)?
More informationDepartment of Computer applications. [Part I: Medium Answer Type Questions]
Department of Computer applications BBDNITM, Lucknow MCA 311: OPERATING SYSTEM [Part I: Medium Answer Type Questions] UNIT 1 Q1. What do you mean by an Operating System? What are the main functions of
More information8086 Interrupts and Interrupt Responses:
UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller
More informationIntroduction CHAPTER. Practice Exercises. 1.1 What are the three main purposes of an operating system? Answer: The three main puropses are:
1 CHAPTER Introduction Practice Exercises 1.1 What are the three main purposes of an operating system? Answer: The three main puropses are: To provide an environment for a computer user to execute programs
More informationProcess Scheduling Queues
Process Control Process Scheduling Queues Job queue set of all processes in the system. Ready queue set of all processes residing in main memory, ready and waiting to execute. Device queues set of processes
More information1. Operating System Concepts
1. Operating System Concepts 1.1 What is an operating system? Operating systems are an essential part of any computer system. An operating system (OS) is software, which acts as an intermediary between
More informationReal-Time Operating Systems Design and Implementation. LS 12, TU Dortmund
Real-Time Operating Systems Design and Implementation (slides are based on Prof. Dr. Jian-Jia Chen) Anas Toma, Jian-Jia Chen LS 12, TU Dortmund October 19, 2017 Anas Toma, Jian-Jia Chen (LS 12, TU Dortmund)
More informationChapter 3 Process Description and Control
Operating Systems: Internals and Design Principles Chapter 3 Process Description and Control Seventh Edition By William Stallings Operating Systems: Internals and Design Principles The concept of process
More informationCSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.
CSC 4103 - Operating Systems Spring 2008 Lecture - XII Midterm Review Tevfik Ko!ar Louisiana State University March 4 th, 2008 1 I/O Structure After I/O starts, control returns to user program only upon
More informationProcess Description and Control. Chapter 3
Process Description and Control 1 Chapter 3 2 Processes Working definition: An instance of a program Processes are among the most important abstractions in an OS all the running software on a computer,
More information(MCQZ-CS604 Operating Systems)
command to resume the execution of a suspended job in the foreground fg (Page 68) bg jobs kill commands in Linux is used to copy file is cp (Page 30) mv mkdir The process id returned to the child process
More informationEastern Mediterranean University School of Computing and Technology INPUT / OUTPUT
Eastern Mediterranean University School of Computing and Technology ITEC255 Computer Organization & Architecture INPUT / OUTPUT Introduction Computer system s I/O architecture is its interface to outside
More information