Migration Process Chan Seok Kang. 2Computer Systems and Platforms Lab Reference code Based on Version_MPB/Ver1 j-halt.S driver/net/rckmb.c prepMig.c writeIRQ.c.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Computer Architecture
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
EZ-COURSEWARE State-of-the-Art Teaching Tools From AMS Teaching Tomorrow’s Technology Today.
Exceptional Control Flow Processes Today. Control Flow Processors do only one thing: From startup to shutdown, a CPU simply reads and executes (interprets)
A look at interrupts What are interrupts and why are they needed.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Input-output and Communication Prof. Sin-Min Lee Department of Computer Science.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
1 Operating Systems and Protection Professor Jennifer Rexford CS 217.
Computer System Overview
1 Computer System Overview OS-1 Course AA
1 CSIT431 Introduction to Operating Systems Welcome to CSIT431 Introduction to Operating Systems In this course we learn about the design and structure.
OS Spring’03 Introduction Operating Systems Spring 2003.
Pipeline Exceptions & ControlCSCE430/830 Pipeline: Exceptions & Control CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng.
A look at interrupts What are interrupts and why are they needed.
Hardware/software Interfacing. Page 2 Interrupt handling and using internal timer Two way for processor to accept external input: Waiting for input: Processor.
1 Lecture 21: Virtual Memory, I/O Basics Today’s topics:  Virtual memory  I/O overview Reminder:  Assignment 8 due Tue 11/21.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
CPS110: Implementing threads/locks on a uni-processor Landon Cox.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Process Description and Control A process is sometimes called a task, it is a program in execution.
Dr. Kimberly E. Newman Hybrid Embedded wk3 Fall 2009.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Lect 13-1 Lect 13: and Pentium. Lect Microprocessor Family  Microprocessor  Introduced in 1989  High Integration  On-chip 8K.
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
Interrupts. 2 Definition: An electrical signal sent to the CPU (at any time) to alert it to the occurrence of some event that needs its attention Purpose:
Exception and Interrupt Handling
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
hardware and operating systems basics.
CHAPTER 5 I/O PRINCIPLE Understand the principles of System Bus
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
CORTEX-M0 Structure Discussion 2 – Core Peripherals
Computer Systems Overview. Page 2 W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware resources of one.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Chapter 1 Computer System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Input and Output Computer Organization and Assembly Language: Module 9.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Overview of Hardware.
Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
CPS110: Implementing threads Landon Cox. Recap and looking ahead Hardware OS Applications Where we’ve been Where we’re going.
Operating System Isfahan University of Technology Note: most of the slides used in this course are derived from those of the textbook (see slide 4)
4P13 Week 2 & 3 Talking Points 1. Kernel Processes 2.
Core Migration On SCC [keyword : Lookup Table, MPB] Chan Seok Kang 2013/06/19.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Device Driver Concepts Digital UNIX Internals II Device Driver Concepts Chapter 13.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
CPS110: Implementing threads on a uni-processor Landon Cox January 29, 2008.
Computer Systems Overview. Lecture 1/Page 2AE4B33OSS W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Interrupts and exceptions
Chapter 1 Computer System Overview
Exceptional Control Flow
Today How was the midterm review? Lab4 due today.
Computer Architecture
Input/Output.
Unix Process Management
CS 286 Computer Organization and Architecture
Computer System Overview
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Chapter 1 Computer System Overview
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Interrupts & Syscalls.
Presentation transcript:

Migration Process Chan Seok Kang

2Computer Systems and Platforms Lab Reference code Based on Version_MPB/Ver1 j-halt.S driver/net/rckmb.c prepMig.c writeIRQ.c halt.c swapLUT.c / swapMGB.c resumefromHalt.c

3Computer Systems and Platforms Lab Process 1-1. prepare to set Migration Flag (prepMig.c) set src & dst pid Create PrivMGB & InfoMGB

4Computer Systems and Platforms Lab Process 1-2. write pid into InfoMGB (prepMig.c) Mapping Memory Address & Write processor id in info_buf

5Computer Systems and Platforms Lab Process 1-3. Set Flag Mapping Memory Address & Write Migration Flag in priv_buf

6Computer Systems and Platforms Lab Process 2-1. Send Interrupt Request (writeIRQ.c) Define Config Register

7Computer Systems and Platforms Lab Process Interrupt request Portion of CRB

8Computer Systems and Platforms Lab Process 2-2. Mapping Memory Address

9Computer Systems and Platforms Lab Process 2-3. Set Interrupt Flag on Mapped Address

10Computer Systems and Platforms Lab Process 3-1. Interrupt Handler operates in the driver(rckmb.c) Read migration Flag

11Computer Systems and Platforms Lab Process 3-1. Interrupt Handler operates in the driver Check the flag  If flag sets PAUSE or RESUME, return 1  else return 0

12Computer Systems and Platforms Lab Process 3-2. Migration Process does not happened

13Computer Systems and Platforms Lab Process 4-1. Halt operation (halt.c) Define the configure register address

14Computer Systems and Platforms Lab Process How to calculate the Config Register Address. BASE_ADDR = 0xE Reference for Config Register

15Computer Systems and Platforms Lab Process How to Calculate the Config Register Address SubAddress of Core configuration register So we can get address from core number!

16Computer Systems and Platforms Lab Process 4-2. Halt Operation Set the Clock Mask (~0x40) Map Memory Address Set the clock mask to stop

17Computer Systems and Platforms Lab Process 5-1. In network driver(rckmb.c) Read migration Flag

18Computer Systems and Platforms Lab Process 5-2. In network driver Check the flag  Return 1 ( ∵ set the halt flag)

19Computer Systems and Platforms Lab Process 5-3. Migration Process happened

20Computer Systems and Platforms Lab Process 5-4. Map the memory address Status : halt Status : resume

21Computer Systems and Platforms Lab Process 5-5. Write Halt signal in the memory Write Signal Save esp Flush L1 & L2 Cache Save the register (external)

22Computer Systems and Platforms Lab Process 6-1. Register Saving Process ( j-halt.S) Save the register into the argument address Start this point Save the register (external)

23Computer Systems and Platforms Lab Process 6-1. Register Saving Registers

24Computer Systems and Platforms Lab Process 6-2. Check the condition If flag == RUN, pass this process else check again. So SRC / DST core halts during this session

25Computer Systems and Platforms Lab Process 7-1. Swap LookupTable (SwapLUT.c)

26Computer Systems and Platforms Lab Process 7-1. Swap LookupTable (SwapLUT.c) Almost same process to gather config register addr  Except for RCK_LUT

27Computer Systems and Platforms Lab Process How to get LUT register address BASE_ADDR = 0xE So we can get address from core number!

28Computer Systems and Platforms Lab Process 7-1. Swap LookupTable (SwapLUT.c) Get SRC/DST aligned address

29Computer Systems and Platforms Lab Process 7-1. Swap LookupTable (SwapLUT.c)

30Computer Systems and Platforms Lab Process Private LUT Entries of System Memory

31Computer Systems and Platforms Lab Process 7-2. Swap Migration Buffer (swapMGB.c)

32Computer Systems and Platforms Lab Process 7-2. Swap Migration Buffer (swapMGB.c) Idea : Utilize the unused shared Memory

33Computer Systems and Platforms Lab Process 7-2. Swap Migration Buffer (swapMGB.c)

34Computer Systems and Platforms Lab Process 8-1. Resume Process (resumeFromHalt.c)

35Computer Systems and Platforms Lab Process 8-1.Resume Process

36Computer Systems and Platforms Lab Process 8-1. Resume Process

37Computer Systems and Platforms Lab Process 8-1. resume Process

38Computer Systems and Platforms Lab Process 9. Pass through the halt process

39Computer Systems and Platforms Lab Process 10. and also pass through the migration process in network driver.

40Computer Systems and Platforms Lab Process 10. and also pass through the migration process in network driver.

41Computer Systems and Platforms Lab Process 10. and also pass through the migration process in network driver.

42Computer Systems and Platforms Lab Process 10. and also pass through the migration process in network driver.

43Computer Systems and Platforms Lab Process 10. and also pass through the migration process in network driver.

44Computer Systems and Platforms Lab Interest thing. Difference Between Direct write in memory and using systemcall(writel()) Writel() -> asm instruction (“movnti”) movnti instruction minimize the impact of processor`s data cache(cache pollution) Direct write ex) **address = result  Just write the data whichever mov instruction like (just move)