Project 4 Kristoffer Robin Stokke. Direct Memory Access New hardware device to toy with! Hardware controller with direct access to physical devices as.

Slides:



Advertisements
Similar presentations
Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
Advertisements

Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
Project 5: Virtual Memory
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
1 CS 333 Introduction to Operating Systems Class 2 – OS-Related Hardware & Software The Process Concept Jonathan Walpole Computer Science Portland State.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
Chapter 5 Input/Output I/O Hardware I/O Software Software Layers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights.
COS Operating System Assignment 4 Inter-Process Communication and Process management Fall 2004.
Software Development and Software Loading in Embedded Systems.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Process. Process Concept Process – a program in execution Textbook uses the terms job and process almost interchangeably A process includes: – program.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Protection and the Kernel: Mode, Space, and Context.
VxWorks & Memory Management
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Input/ Output By Mohit Sehgal. What is Input/Output of a Computer? Connection with Machine Every machine has I/O (Like a function) In computing, input/output,
I/O Systems I/O Hardware Application I/O Interface
Chapter 4 Storage Management (Memory Management).
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 9: Virtual Memory.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
1.4 Hardware Review. CPU  Fetch-decode-execute cycle 1. Fetch 2. Bump PC 3. Decode 4. Determine operand addr (if necessary) 5. Fetch operand from memory.
Operating Systems Engineering Based on MIT (2012, lec3) Recitation 2: OS Organization.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Pintos project 3: Virtual Memory Management
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Linux Boot Process on the Raspberry Pi 2 1 David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis,
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
CSC 482/582: Computer Security
Module 12: I/O Systems I/O hardware Application I/O Interface
Resource Management IB Computer Science.
143A: Principles of Operating Systems Lecture 6: Address translation (Paging) Anton Burtsev October, 2017.
CIT 480: Securing Computer Systems
Main Memory Management
Chapter 8: Main Memory.
CSCI 315 Operating Systems Design
O.S Lecture 13 Virtual Memory.
Page Replacement.
Multistep Processing of a User Program
Module IV Memory Organization.
Main Memory Background Swapping Contiguous Allocation Paging
I/O Systems I/O Hardware Application I/O Interface
Operating Systems Chapter 5: Input/Output Management
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Chapter 8: Memory management
Chapter 5: I/O Systems.
CSCE 313 – Introduction to UNIx process
Operating Systems Lecture 3.
Lecture 3 - Instruction Set - Al
Lecture 3: Main Memory.
Computer System Structures
Chapter 1: Introduction CSS503 Systems Programming
OPERATING SYSTEMS MEMORY MANAGEMENT BY DR.V.R.ELANGOVAN.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Page Main Memory.
Presentation transcript:

Project 4 Kristoffer Robin Stokke

Direct Memory Access New hardware device to toy with! Hardware controller with direct access to physical devices as well as RAM Used to transfer data from floppy to (physical) memory in our project! See the code in floppy.c

Direct Memory Access Limitations – Transfers to memory must be within the first 16 MBs! – Transfers must not cross a 64kB boundary! – All addresses are physical! – See the P4 FAQ!

Processes in P4 User mode Virtual address space –?–?

Virtual Address Space Each process «believes» to run in a separate address space entirely dedicated to itself Shell Virtual RAM 0x0 0xFFFFFFFF

Virtual Address Space Behind the scenes, the MMU maps virtual addresses to physical addresses using paging mechanisms Shell Virtual RAM 0x0 0xFFFFFFFF Physical RAM 0x0 0xFFFFFFFF

Virtual Address Space Code to set up processes with paging enabled have been given see kernel.c and paging.c Kernel Process Kernel Process data, code, stack Kernel ProcessesThreadsPhysical memory 0x – to - 1 0x0

Process Management Dynamic loading – how? – Simple filesystem on floppy containing process directory – Implement readdir() – Implement loadproc() – Who calls these functions?

readdir(uint32_t* buf) Systemcall called from shell Copies data from floppy to memory (buf) using DMA – From where? Is there a problem with that? – Explain in design!

loadproc() Systemcall by shell to load a process Allocate space for data (see memory.c) – Enough for code / data + 8kB stack! Load data into memory from floppy Use create_process() to setup the process

Keyboard Keyboard is connected to the CPU like the interrupt controller – IRQ1 signals keypress – Key can be read from port 0x60 Code set up for you in entry.S – Calls keyboard_interrupt(), which calls appropriate handler, which might call putchar() Design getchar(), putchar() and init()

Remember.. Lots of small things that can go wrong! – Attempt to identify such sections and design correctly to avoid them Use the makefile to test the different implementations as stated in the project description

Snake x

A Word of Warning Only one delivery; goes for printed documents as well as deliveries by mail. Correctors now take the first of the delivered items to avoid duplicate work. Is this OK?

Good luck!