Lect 10: DEVS Modeling Process and Implementation in DEVSim++

Size: px
Start display at page:

Download "Lect 10: DEVS Modeling Process and Implementation in DEVSim++"

Transcription

1 Lect 10: DEVS Modeling Process and Implementation in DEVSim++

2 OO Modeling vs DEVS Modeling Process 2 of 32 OO Modeling by Observation of real world Step 1:Identify objects and associated attributes Step 2: Identify operations of each objects Step 3: Establish visibility of each objects to other objects Step 4: Establish interface for each object Step 5: Implement each object DEVS Modeling by Identification of a real system Step 1: Identity atomic and coupled models Step 2: For each atomic model Identify input, output and state (X, Y, S) Identify four characteristic functions (ta, d int d ext l) Step 3: For each coupled model Identity input, output and components (X, Y, Mi) Identity three coupling relations (EIC, EOC, IC) Identify priority of components (sel) Step 4: Implement each atomic model Step 5: Implement each coupled model Step 6: Testing / Debugging

3 DEVS Development Methodology Step 1 3 of 32 Step 1: Identity atomic and coupled models Coupled Model Specifies the structure of the system Atomic Model Specifies the behavior of the system GEN+BUF+PROC BUF+PROC out in out in done GEN BUF PROC out S : G Root C : G+B+P S : B C : B+P S : P SELECT G B P G B B P G P GEN ta(buf) : ta(proc) :

4 DEVS Development Methodology Step 2 4 of 32 Step 2: For each atomic model Identify input, output and state (X, Y, S) Identify four characteristic functions (ta, d int d ext l) Atomic Model class CAtomic (C++ class interface of Atomic Model) X bool AddInPorts(int num,...); Y bool AddOutPorts(int num,...); S Member Variable d ext bool ExtTransFn(const CMessage &) d int bool IntTransFn() l bool OutputFn(CMessage &) ta TimeType TimeAdvanceFn()

5 Interrupt Event(1/2) 5 of 32? in A 5!out B!out 0 5? in!out ? in *? in!out A 5!out B Interrupt Event: Input event which does not change existing event schedules(using Continue)

6 Interrupt Event (2/2)? in 6 of 32 A B!a 5!a C 3!out 1 0 5? in!out!a? in * !a A 5!out B 1? in!out!a C

7 Review: Definition of Atomic Class QueueServer in API 7 of 32 class QueueServer : public CAtomic public: QueueServer(); ~ QueueServer(); virtual bool ExtTransFn(const Cmessage &); virtual bool IntTransFn(); virtual bool OutputFn(CMessage &message); virtual TimeType TimeAdvanceFn(); ; // Atomic Model: QueueServer // external transition function // internal transition fucntion // output function // time advance function bool QueueServer ::ExtTransFn(const CMessage &message)... bool QueueServer ::IntTransFn()... bool QueueServer ::OutputFn(CMessage &message)... TimeType QueueServer ::TimeAdvanceFn()...

8 DEVS Development Methodology Step 3 8 of 32 Step 3: For each coupled model Identity input, output and components (X, Y, Mi) Identity three coupling relations (EIC, EOC, IC) Identify priority of components (sel) Coupled Model class CCoupled(C++ class interface of Coupled Model) X bool AddInPorts(int num,...); Y bool AddOutPorts(int num,...); M bool AddComponent(int num,...); EIC,EOC,IC bool AddCoupling( CModel *src_model,const char *src_port, CModel *dst_model, const char *dst_port); SELECT bool SetPriority(int num,...);

9 DEVS Development Methodology Step 4 (1/2) 9 of 32 Step 4: Implement each atomic model class QueueServer : public CAtomic public: QueueServer(); ~ QueueServer(); virtual bool ExtTransFn(const Cmessage &); virtual bool IntTransFn(); virtual bool OutputFn(CMessage &message); virtual TimeType TimeAdvanceFn(); ; // Atomic Model: QueueServer // external transition function // internal transition fucntion // output function // time advance function bool QueueServer ::ExtTransFn(const CMessage &message)... bool QueueServer ::IntTransFn()... bool QueueServer ::OutputFn(CMessage &message)... TimeType QueueServer ::TimeAdvanceFn()...

10 Server.status DEVS Development Methodology Step 4 (2/2) 10 of 32 in B F QueueServer out in 0 Queue Server Queue.length Server.status out in out in out in X = in Y = out S = (length,status) length I, status B, F d ext ((n 0,-),in) = (n+1,-) d ext ((0,F),in) = (1,B) d int ((n 1,B)) = (n-1,b) d int ((n=1,b)) = (0,F) l((n 0,-)) = out ta((n 0,-)) = Service_time out queue.length (n) bool QueueServer::OutputFn(CMessage &message) bool class QueueServer::ExtTransFn(const if(!isstate(length, 0)) public CAtomic CMessage &message) message.setportvalue(out, NULL); public: if(message.getport() return true; == in ) QueueServer(); if(!isstate (length, 0)) ~QueueServer(); SetStateValue(length, GetIntStateValue(length)+1); virtual else if(isstate(length, bool ExtTransFn(const 0) && IsState(status, CMessage &); F)) TimeType QueueServer::TimeAdvanceFn() virtual SetStateValue(length, bool IntTransFn(); 1); virtual SetStateValue(Status, bool OutputFn(CMessage B); if(isstate(length, 0)) &); virtual return TimeType Service_Time; TimeAdvanceFn(); ; return true; else return Infinity; QueueServer::QueueServer() bool QueueServer::IntTransFn() AddInPorts(1, in ); if(!isstate(length, AddOutPorts(1, 1) out ); && IsState(status, B )) AddStateVariables SetStateValue(length, (2, length, GetIntStateValue(length)-1); status ); InitStateValue SetStateBale(status, ( length, B); new Integer(0)); InitStateValue ( status, new String( F )); else if(isstate(length, 1) && IsState(status, B)) SetStateValue(length, 0); QueueServer::~QueueServer() SetStateBale(status, F); return true;

11 DEVS Development Methodology Step 5 11 of 32 Step 5: Implement each coupled model SingleSeverQueue Generator QueueServer out in out class SingleSeverQueue : public CCoupled public: SingleSverQueue(); ~SingleServerQueue(); ; SingleServerQueue::SingleServerQueue() CModel *Gen, *QueSer; Gen = new Generator; QueSer = new QueueServer; AddComponent(2, Gen, QueSer); SetPriority(2, Gen, QueSer); AddCoupling(Gen, out", QueSer, in");...

12 DEVS Development Methodology Step 6 12 of 32 Step 6: Testing / Debugging ta : S Real d ext : Q X Q : Q Y d int : Q Q Atomic Model Interface Developer implement C++ Application program Simulation = Execution of DEVS Model = Call DEVS Functions/Relations t (x, t) L t N e (y, t) Simulator (*, t) (done, t N ) (Simulation algorithm) t L : time of last event t N : time of next event e : elapsed time Simulation Engine C++ compiler (System Environment)) System provide (Develop Environment) Simulator behavior is measurable in pre-condition and post-condition of 4 DEVS functions M l Y X d ext S d int ta R

13 Function Call Order (1/4) 13 of 32 A out in B A::OutputFn B::ExtTransFn Create Msg_Out (new) Attached User Defined Object * Msg_Out B::TimeAdvanceFn A::IntTransFn Delete Msg_Out (delete) A::TimeAdvanceFn

14 Function Call Order (2/4) 14 of 32 Attached User Defined Object * Msg_Out out in A B A::OutputFn B::ExtTransFn Create Msg_Out (new) in C B::TimeAdvanceFn C::ExtTransFn * B,C,D order may in D C::TimeAdvanceFn differ D::ExtTransFn D::TimeAdvanceFn Delete Msg_Out A::IntTransFn (delete) A::TimeAdvanceFn

15 Function Call Order (3/4) 15 of 32 Attached User Defined Object * Msg_Out A out in B C B C out A::OutputFn B::ExtTransFn D out A B B::TimeAdvanceFn Assume that A::IntTransFn A,C,D are scheduled at the same time, A::TimeAdvanceFn and the priority is C>A>D, and B s schedule is later than A,C,D D B even if B receives events. Create Msg_Out (new) Delete Msg_Out (delete)

16 Function Call Order (4/4) Attached User Defined Object * Msg_Out A::OutputFn Create(new) 16 of 32 Msg_Out, Msg_Out2 B::ExtTransFn A out1 in B B::TimeAdvanceFn Attached User Defined Object * Msg_Out2 out2 in in C D C::ExtTransFn C::TimeAdvanceFn D::ExtTransFn D::TimeAdvanceFn * B,C,D,E order may differ in E E::ExtTransFn E::TimeAdvanceFn Delete Msg_Out, A::IntTransFn Msg_Out2 A::TimeAdvanceFn

17 Auxiliary: Simulation Option 17 of 32 // CDEVSimInterface 객체생성 CDEVSimInterface* pinterface=cdevsiminterfacedefaultfactory::create(); // 전역변수로설정 SET_DEVSINTERFACE(pInterface); // 시뮬레이션옵션설정 pinterface->simoption.brealtime = true; pinterface->simoption.btimetick = 0.1; pinterface->simoption.bratio = 20; pinterface->simoption.timemode = CSimOption::MINUTE; pinterface->simoption.bmultithread = true; pinterface->simoption.busehla = false; // 시뮬레이션모델설정 delete pinterface->setmodel(new Model); // 시뮬레이션시작 pinterface->simulationstart(); // 엔진시작 pinterface->enginestart(); // 모델삭제 delete pinterface->getmodel(); pinterface->setmodel(null); // CDEVSimInterface 객체삭제 CDEVSimInterfaceDefaultFactory::destroy(pInterface);

18 Configuration using SimOption 18 of 32 멤버변수타입값의미 brealtime bool true Real-Time 으로동작. btimetick bratio double 20 TimeMode _TimeMode CSimOption::MINUT E bmultithread bool true Thread 로동작 busehla bool false 이벤트가없을경우시뮬레이션시간 0.1 씩전진. 실제시간과시뮬레이션시간이흐르는비율을같도록함. brealtime=ture 이니경우, 시뮬레이션시간 1 을실제시간에서의초로매핑. 외부 HLA/RTI 아답터등에시간진행요청및허가를받아서시뮬레이션진행.

19 DES Level Modeling: Ping-Pong-Game Example Single Ping Pong Game 19 of 32 Referee Player-A Player-B Player-A Player-B Attack Defense Attack Defense Out Out

20 Ping-Pong 시스템의요구사항 경기방법 게임은중앙에네트를친테이블의양끝에상대하는플레이어가볼을서로라켓으로번갈아가면서쳐넘긴다. 경기종류 개인전 2 명의플레이어가경기를진행한다. 득점방법및승패 서브를하면서경기시작한다. 서비스는서브권을가진측에서 2 번을서비스를한후상대플레이어에게서브권을넘긴다. 듀스상황일경우에는 1 번씩서브권을주고받는다. 플레이어가공을받아치는것은확률적으로계산한다. 득점은 1 점씩이며 11 점을먼저얻는측이승리한다. 듀스가되면계속해서 2 점을먼저얻어야승리한다. 20 of 32

21 Ping-Pong 모델링과정 실제로시스템을이루고있는구성요소파악. 심판, 플레이어 2 명, 탁구대, 탁구채, 탁구공등. 21 of 32 모델링목적에맞게시스템을추상화. 모델링목적 : 탁구경기를최대한간단하게표현. 추상화결과 심판, 플레이어 : 모델 탁구공 : 메시지 탁구대, 탁구채등은추상화결과생략. 모델사이의인터페이스정의 심판 플레이어에게서브권넘김. 플레이어 다른플레이어에게공을넘김. 심판에게공격실패를보고함. 각모델을자세하게모델링 표현하고자하는정도에따라계층구조로자세하게표현가능.

22 Ping-Pong Model 22 of 32 Ping-Pong Referee SERVA OUTA OUTB SERVB SERV_SELF SERV_OTHER SERV_OTHER SERV_SELF OUT_OTHER OUT_SELF OUT_SELF OUT_OTHER PlayerA BALL_SEND BALL_REV PlayerB BALL_REV BALL_SEND

23 Atomic DEVS Model for Ping-Pong Player 23 of 32 Model Player SERV_SELF SERV_OTHER?BALL_SEND BALL_SEND OUT_SELF BALL_REV OUT_OTHER [rand_num<m_prob] [rand_num>m_prob]?serv_other?out_other State Variable m_prob rand_num

24 Atomic DEVS Model for Ping-Pong Referee 24 of 32 Model Referee OUTA OUTB?OUTA or?outb SERVA SERVB [m_servf = 1]!SERVB [m_servf = 0] [m_endf = true] State Variable m_scorea m_scoreb m_servf m_endf

25 CPlayer Class (1/2) 25 of 32 class CPlayer : public CAtomic public: CPlayer(); CPlayer(const char* name); virtual ~CPlayer(); virtual bool ExtTransFn(const CMessage &); virtual bool IntTransFn(); virtual bool OutputFn(CMessage &); virtual TimeType TimeAdvanceFn(); public: enum PLAYER_STATE DEFENSE = 0, ATTACK = 1, SERVE = 2 ; protected: PLAYER_STATE m_state; double m_prob; double rand_num; ;

26 CPlayer Class (2/2) 26 of 32 CPlayer::CPlayer(String name, double prob) : m_state(serve), m_prob(prob) m_name = name; SetName(m_Name); AddInPorts(4, "BALL_REV", "OUT_OTHER", "SERV_SELF", "SERV_OTHER"); AddOutPorts(2, "BALL_SEND", "OUT_SELF");

27 CPlayer s External Transition Function 27 of 32 External Transition Function (SERVE, SERV_SELF) ATTACK (SERVE, SERV_OTHER) DEFENSE (DEFENSE, BALL_REV) ATTACK (DEFENSE, OUT_OTHER) SERVE bool CPlayer::ExtTransFn(const CMessage& message) if(m_state == SERVE && message.getport() == "SERV_SELF ) m_state = ATTACK; else if(m_state == SERVE && message.getport() == "SERV_OTHER ) m_state = DEFENSE; else if( m_state == DEFENSE && message.getport() == BALL_REV ) m_state = ATTACK; else if(m_state == DEFENSE && message.getport() == "OUT_OTHER") m_state = SERVE; else return false; return true;

28 CPlayer s Internal Transition Function 28 of 32 Internal Transition Function ATTACK DEFENSE if(m_prob > rand_num ) ATTACK SERVE if(m_prob< rand_num ) bool CPlayer::IntTransFn() if( m_state == ATTACK ) if( m_prob > rand_num ) m_state = DEFENSE; else m_state = SERVE; else return false; return true;

29 CPlayer s Output Function 29 of 32 Output Function ATTACK BALL_SEND if(m_prob > rand_num ) ATTACK OUT_SELF if(m_prob< rand_num ) bool CPlayer::OutputFn(CMessage & message) rand_num = CRandom::Random((unsigned)time(NULL) % ); if( m_state == ATTACK ) if( m_prob > rand_num ) message.setportvalue("ball_send", NULL); else message.setportvalue("out_self", NULL); else return false; return true;

30 CPlayer s Time Advance Function 30 of 32 Time Advance Function ATTACK ATTACK_TIME, SERVE, DEFENSE Infinity TimeType CPlayer::TimeAdvanceFn() if( m_state == ATTACK) return ATTACK_TIME; else return Infinity;

31 Class of CSingleMatch Coupled Model (1/2) 31 of 32 class CSingleMatch : public CCoupled public: CPlayer *player1, *player2; CReferee *referee; CSingleMatch(double prob_a, double prob_b, int first_serv); ~CSingleMatch(); ; PingPong Referee SERVA OUTA OUTB SERVB SERV_SELF SERV_OTHER SERV_OTHER SERV_SELF OUT_OTHER OUT_SELF OUT_SELF OUT_OTHER PlayerA BALL_SEND BALL_REV PlayerB BALL_REV BALL_SEND

32 Class of CSingleMatch Coupled Model (2/2) 32 of 32 CSingleMatch::CSingleMatch(double prob_a, double prob_b, int first_serv) SetName("SingleMatch"); player1 = new CPlayer("A", prob_a); player2 = new CPlayer("B", prob_b); referee = new CReferee("R", first_serv); AddComponent(3, player1, player2, referee); AddCoupling(player1, "BALL_SEND", player2, "BALL_REV"); AddCoupling(player1, "OUT_SELF", player2, "OUT_OTHER"); AddCoupling(player1, "OUT_SELF", referee, "OUTA"); AddCoupling(player2, "BALL_SEND", player1, "BALL_REV"); AddCoupling(player2, "OUT_SELF", player1, "OUT_OTHER"); AddCoupling(player2, "OUT_SELF", referee, "OUTB"); AddCoupling(referee, "SERVA", player1, "SERV_SELF"); AddCoupling(referee, "SERVA", player2, "SERV_OTHER"); AddCoupling(referee, "SERVB", player1, "SERV_OTHER"); AddCoupling(referee, "SERVB", player2, "SERV_SELF"); SetPriority(3, referee, player1, player2);

Lect 7: DEVS Model Reuse and Schedule Conflict

Lect 7: DEVS Model Reuse and Schedule Conflict Lect 7: DEVS Model Reuse and Schedule Conflict Simulation Enge: Independent of Model 2 of 20 Model Execution Algorithm = Execution Enge = Simulation Enge Model and Simulation Enge should be dependent A

More information

Framework for Component-based Modeling/Simulation of Discrete Event Systems

Framework for Component-based Modeling/Simulation of Discrete Event Systems Framework for Component-based ing/simulation of Discrete Event Systems Young-Ik Cho, Jae-Hyun Kim and Tag Gon Kim Systems ing Simulation Lab Department of Electrical Engineering & Computer Science KAIST

More information

Methodology for Automatic Synthesis of Wargame Simulator using DEVS

Methodology for Automatic Synthesis of Wargame Simulator using DEVS Methodology for Automatic Synthesis of Wargame Simulator using DEVS Kim Ju Young, Shim Kwang Hyun ETRI kimjy1113@etri.re.kr, shimkh@etri.re.kr Abstract In specific domain such as wargame, simulator developers

More information

Parametric Behavior Modeling Framework for War Game Models Development Using OO Co-Modeling Methodology

Parametric Behavior Modeling Framework for War Game Models Development Using OO Co-Modeling Methodology Parametric Behavior Modeling Framework for War Game Models Development Using OO Co-Modeling Methodology Jae-Hyun Kim* and Tag Gon Kim** Department of EECS KAIST 373-1 Kusong-dong, Yusong-gu Daejeon, Korea

More information

DEVS Framework for Component-based Modeling/Simulation of Discrete Event Systems

DEVS Framework for Component-based Modeling/Simulation of Discrete Event Systems DEVS Framework for Component-based Modeling/Simulation of Discrete Event Systems Young Ik Cho and Tag Gon Kim Systems Modeling Simulation Lab Department of Electrical Engineering and Computer Science Korea

More information

Beyond programming. CS 199 Computer Science for Beginners Spring 2009 Lois Delcambre Week 5/12/2009 1

Beyond programming. CS 199 Computer Science for Beginners Spring 2009 Lois Delcambre Week 5/12/2009 1 Beyond programming CS 199 Computer Science for Beginners Spring 2009 Lois Delcambre Week 5/12/2009 1 Introduction We ve covered: Python data types Python expressions Python statements We ve written approximately

More information

Concurrent Computing CSCI 201 Principles of Software Development

Concurrent Computing CSCI 201 Principles of Software Development Concurrent Computing CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline Threads Multi-Threaded Code CPU Scheduling Program USC CSCI 201L Thread Overview Looking

More information

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems OS Structure Processes COMP755 Advanced Operating Systems An OS has many parts. The Kernel is the core of the OS. It controls the execution of the system. Many OS features run outside of the kernel, such

More information

InterprocStack analyzer for recursive programs with finite-type and numerical variables

InterprocStack analyzer for recursive programs with finite-type and numerical variables InterprocStack analyzer for recursive programs with finite-type and numerical variables Bertrand Jeannet Contents 1 Invoking InterprocStack 1 2 The Simple language 2 2.1 Syntax and informal semantics.........................

More information

FreeRTOS X. Task Notifications Semaphores Family Critical Section FreeRTOS Producer Consumer Tasks

FreeRTOS X. Task Notifications Semaphores Family Critical Section FreeRTOS Producer Consumer Tasks FreeRTOS X Task Notifications Semaphores Family Critical Section FreeRTOS Producer Consumer Tasks Task Notifications Semaphores Family Binary Semaphore Counting Semaphore Mutex Recursive Mutex Critical

More information

Object Oriented Programming Using C++ Mathematics & Computing IET, Katunayake

Object Oriented Programming Using C++ Mathematics & Computing IET, Katunayake Assigning Values // Example 2.3(Mathematical operations in C++) float a; cout > a; cout

More information

Lecture. Simulation && Design. Richard E Sarkis CSC 161: The Art of Programming

Lecture. Simulation && Design. Richard E Sarkis CSC 161: The Art of Programming Lecture Simulation && Design Richard E Sarkis CSC 161: The Art of Programming Class Administrivia Agenda To understand the potential applications of simulation as a way to solve real-world problems To

More information

Linux Device Drivers Interrupt Requests

Linux Device Drivers Interrupt Requests Overview 1 2 3 Installation of an interrupt handler Interface /proc 4 5 6 7 primitive devices can be managed only with I/O regions, most devices require a more complicated approach, devices cooperate with

More information

Concurrency Abstractions in C#

Concurrency Abstractions in C# Concurrency Abstractions in C# 1 1 Motivation Concurrency in C# Concurrency critical factor in behavior/performance affects semantics of all other constructs advantages of language vs. library Compiler

More information

M1-R4: Programing and Problem Solving using C (JAN 2019)

M1-R4: Programing and Problem Solving using C (JAN 2019) M1-R4: Programing and Problem Solving using C (JAN 2019) Max Marks: 100 M1-R4-07-18 DURATION: 03 Hrs 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter

More information

C-types: basic & constructed. C basic types: int, char, float, C constructed types: pointer, array, struct

C-types: basic & constructed. C basic types: int, char, float, C constructed types: pointer, array, struct C-types: basic & constructed C basic types: int, char, float, C constructed types: pointer, array, struct Memory Management Code Global variables in file (module) Local static variables in functions Dynamic

More information

Q1. State True/false with jusification if the answer is false:

Q1. State True/false with jusification if the answer is false: Paper Title: Operating System (IOPS332C) Quiz 1 Time : 1 hr Q1. State True/false with jusification if the answer is false: a. Multiprogramming (having more programs in RAM simultaneously) decreases total

More information

Chapter-8 DATA TYPES. Introduction. Variable:

Chapter-8 DATA TYPES. Introduction. Variable: Chapter-8 DATA TYPES Introduction To understand any programming languages we need to first understand the elementary concepts which form the building block of that program. The basic building blocks include

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Python Programming: An Introduction to Computer Science Chapter 9 Simulation and Design Python Programming, 2/e 1 Objectives æ To understand the potential applications of simulation as a way to solve real-world

More information

Agenda. The main body and cout. Fundamental data types. Declarations and definitions. Control structures

Agenda. The main body and cout. Fundamental data types. Declarations and definitions. Control structures The main body and cout Agenda 1 Fundamental data types Declarations and definitions Control structures References, pass-by-value vs pass-by-references The main body and cout 2 C++ IS AN OO EXTENSION OF

More information

Computer Department. Question (1): State whether each of the following is true or false. Question (2): Select the correct answer from the following:

Computer Department. Question (1): State whether each of the following is true or false. Question (2): Select the correct answer from the following: Computer Department Program: Computer Midterm Exam Date : 19/11/2016 Major: Information & communication technology 1 st Semester Time : 1 hr (10:00 11:00) Course: Introduction to Programming 2016/2017

More information

Editing/Creating FDDEVS model Couplings using System Entity Structures

Editing/Creating FDDEVS model Couplings using System Entity Structures Editing/Creating FDDEVS model Couplings using System Entity Structures This step by step guide will help you to understand - how to use an advanced feature of FDDEVS involving System Entity Structures

More information

THE BIG FOUR FRIEND FUNCTIONS

THE BIG FOUR FRIEND FUNCTIONS er THE BIG FOUR FRIEND FUNCTIONS Problem Solving with Computers-II Read the syllabus. Know what s required. Know how to get help. CLICKERS OUT Freq Af How is h01 (specifically the CS16 final) going? A.

More information

Distributed Coordination! Distr. Systems: Fundamental Characteristics!

Distributed Coordination! Distr. Systems: Fundamental Characteristics! Distributed Coordination! What makes a system distributed?! Time in a distributed system! How do we determine the global state of a distributed system?! Event ordering! Mutual exclusion! Reading: Silberschatz,

More information

SpiNNaker Application Programming Interface (API)

SpiNNaker Application Programming Interface (API) SpiNNaker Application Programming Interface (API) Version 2.0.0 10 March 2016 Application programming interface (API) Event-driven programming model The SpiNNaker API programming model is a simple, event-driven

More information

CSE 153 Design of Operating Systems Fall 2018

CSE 153 Design of Operating Systems Fall 2018 CSE 153 Design of Operating Systems Fall 2018 Lecture 5: Threads/Synchronization Implementing threads l Kernel Level Threads l u u All thread operations are implemented in the kernel The OS schedules all

More information

Object Oriented Programming. Week 10 Part 1 Threads

Object Oriented Programming. Week 10 Part 1 Threads Object Oriented Programming Week 10 Part 1 Threads Lecture Concurrency, Multitasking, Process and Threads Thread Priority and State Java Multithreading Extending the Thread Class Defining a Class that

More information

The University of Alabama in Huntsville Electrical and Computer Engineering CPE Example of Objective Test Questions for Test 4

The University of Alabama in Huntsville Electrical and Computer Engineering CPE Example of Objective Test Questions for Test 4 The University of Alabama in Huntsville Electrical and Computer Engineering CPE 112 02 Example of Objective Test Questions for Test 4 True or False Name: 1. The statement switch (n) case 8 : alpha++; case

More information

Introduction to RPC, Apache Thrift Workshop. Tomasz Powchowicz

Introduction to RPC, Apache Thrift Workshop. Tomasz Powchowicz Introduction to RPC, Apache Thrift Workshop Tomasz Powchowicz It is all about effective communication page 2 Synchronous, asynchronous execution Executor Executor A Executor B Executor A Executor B 1 1

More information

Process Scheduling. Copyright : University of Illinois CS 241 Staff

Process Scheduling. Copyright : University of Illinois CS 241 Staff Process Scheduling Copyright : University of Illinois CS 241 Staff 1 Process Scheduling Deciding which process/thread should occupy the resource (CPU, disk, etc) CPU I want to play Whose turn is it? Process

More information

Computer Science 162, Fall 2014 David Culler University of California, Berkeley Midterm 1 September 29, 2014

Computer Science 162, Fall 2014 David Culler University of California, Berkeley Midterm 1 September 29, 2014 Computer Science 162, Fall 2014 David Culler University of California, Berkeley Midterm 1 September 29, 2014 Name SID Login TA Name Section Time This is a closed book exam with one 2-sided page of notes

More information

NVIDIA AFTERMATH: A NEW WAY OF DEBUGGING CRASHES ON THE GPU. Alex Dunn, 2 nd March 2017

NVIDIA AFTERMATH: A NEW WAY OF DEBUGGING CRASHES ON THE GPU. Alex Dunn, 2 nd March 2017 NVIDIA AFTERMATH: A NEW WAY OF DEBUGGING CRASHES ON THE GPU Alex Dunn, 2 nd March 2017 NVIDIA AFTERMATH What is it? New tool to diagnose GPU crashes, available on GeForce! Coming to D3D for broad availability

More information

We now begin to build models in DEVS-Scheme and organize them using the system entity

We now begin to build models in DEVS-Scheme and organize them using the system entity Chapter 4 ATOMIC-MODELS: SIMPLE PROCESSOR EXAMPLE We now begin to build models in DEVS-Scheme and organize them using the system entity structure. The model domain to be disccussed is that of simple computer

More information

From Pseudcode Algorithms directly to C++ programs

From Pseudcode Algorithms directly to C++ programs From Pseudcode Algorithms directly to C++ programs (Chapter 7) Part 1: Mapping Pseudo-code style to C++ style input, output, simple computation, lists, while loops, if statements a bit of grammar Part

More information

gcc o driver std=c99 -Wall driver.c bigmesa.c

gcc o driver std=c99 -Wall driver.c bigmesa.c C Programming Simple Array Processing This assignment consists of two parts. The first part focuses on array read accesses and computational logic. The second part focuses on array read/write access and

More information

Microkernel Construction

Microkernel Construction Microkernel Construction Interprocess Communication Nils Asmussen 05/03/2018 1 / 33 Outline Introduction Microkernel vs. Monolithic kernel Synchronous vs. Asynchronous Different Implementations Synchronous

More information

Concurrency Abstractions in C#

Concurrency Abstractions in C# Concurrency Abstractions in C# Concurrency critical factor in behavior/performance affects semantics of all other constructs advantages of language vs. library compiler analysis/optimization clarity of

More information

UML-BASED MODELING AND SIMULATION METHOD FOR MISSION-CRITICAL REAL-TIME EMBEDDED SYSTEM DEVELOPMENT

UML-BASED MODELING AND SIMULATION METHOD FOR MISSION-CRITICAL REAL-TIME EMBEDDED SYSTEM DEVELOPMENT UML-BASED MODELING AND SIMULATION METHOD FOR MISSION-CRITICAL REAL-TIME EMBEDDED SYSTEM DEVELOPMENT KeungSik Choi, SungChul Jung, HyunJung Kim, Doo-Hwan Bae Department of EECS Korea Advanced Institute

More information

Concurrency Abstractions in C#

Concurrency Abstractions in C# Concurrency Abstractions in C# Concurrency critical factor in behavior/performance affects semantics of all other constructs advantages of language vs. library compiler analysis/optimization clarity of

More information

CSE 153 Design of Operating Systems

CSE 153 Design of Operating Systems CSE 153 Design of Operating Systems Winter 19 Lecture 7/8: Synchronization (1) Administrivia How is Lab going? Be prepared with questions for this weeks Lab My impression from TAs is that you are on track

More information

Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds.

Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds. Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds. A STRUCTURED DEVS MODEL REPRESENTATION BASED ON EXTENDED STRUCTURED

More information

DEVSim++ Environment

DEVSim++ Environment Reusability Measure of DEVS Simulation Models in DEVSim++ Environment Yoonil Choi and Tag Gon Kim Department of Electrical Engineering Korea Advanced Institute of Science and Technology 373-1 Kusong-dong

More information

CS 261 Fall C Introduction. Variables, Memory Model, Pointers, and Debugging. Mike Lam, Professor

CS 261 Fall C Introduction. Variables, Memory Model, Pointers, and Debugging. Mike Lam, Professor CS 261 Fall 2017 Mike Lam, Professor C Introduction Variables, Memory Model, Pointers, and Debugging The C Language Systems language originally developed for Unix Imperative, compiled language with static

More information

ADVANCED OPERATING SYSTEMS

ADVANCED OPERATING SYSTEMS ADVANCED OPERATING SYSTEMS UNIT 2 FILE AND DIRECTORY I/O BY MR.PRASAD SAWANT Prof.Prasad Sawant,Assitiant Professor,Dept. Of CS PCCCS Chichwad Prof.Prasad Sawant,Assitiant Professor,Dept. Of CS PCCCS Chichwad

More information

STD_CU43USBSW_V1.0E. CUnet (MKY43) USB Unit. CU-43USB Software Manual

STD_CU43USBSW_V1.0E. CUnet (MKY43) USB Unit. CU-43USB Software Manual STD_CU43USBSW_V1.0E CUnet (MKY43) USB Unit CU-43USB Software Manual Introduction This document describes API included with CU-43USB unit. Before using the product, please check the latest information on

More information

Chapter 20: Binary Trees

Chapter 20: Binary Trees Chapter 20: Binary Trees 20.1 Definition and Application of Binary Trees Definition and Application of Binary Trees Binary tree: a nonlinear linked list in which each node may point to 0, 1, or two other

More information

Haskell Types COMP360

Haskell Types COMP360 Haskell Types COMP360 Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration. Stan Kelly-Bootle British author, singer-songwriter and computer

More information

Real Time & Embedded Systems. Final Exam - Review

Real Time & Embedded Systems. Final Exam - Review Real Time & Embedded Systems Final Exam - Review Final Exam Review Topics Finite State Machines RTOS Context switching Process states Mutex - purpose and application Blocking versus non-blocking Synchronous

More information

Methodology for Efficient Design of Continuous/Discrete Co-Simulation Tool

Methodology for Efficient Design of Continuous/Discrete Co-Simulation Tool Methodology for Efficient Design of Continuous/Discrete Co-Simulation Tool, H. Boucheneb, L. Gheorghe, F. Bouchimma Ecole Polytechnique de Montréal Tel : (514) 340 4711 ext 5434 Fax: (514) 340 3240 Email

More information

CS 223: Data Structures and Programming Techniques. Exam 2. April 19th, 2012

CS 223: Data Structures and Programming Techniques. Exam 2. April 19th, 2012 CS 223: Data Structures and Programming Techniques. Exam 2 April 19th, 2012 Instructor: Jim Aspnes Work alone. Do not use any notes or books. You have approximately 75 minutes to complete this exam. Please

More information

SEMANTIC ANALYSIS TYPES AND DECLARATIONS

SEMANTIC ANALYSIS TYPES AND DECLARATIONS SEMANTIC ANALYSIS CS 403: Type Checking Stefan D. Bruda Winter 2015 Parsing only verifies that the program consists of tokens arranged in a syntactically valid combination now we move to check whether

More information

From IMP to Java. Andreas Lochbihler. parts based on work by Gerwin Klein and Tobias Nipkow ETH Zurich

From IMP to Java. Andreas Lochbihler. parts based on work by Gerwin Klein and Tobias Nipkow ETH Zurich From IMP to Java Andreas Lochbihler ETH Zurich parts based on work by Gerwin Klein and Tobias Nipkow 2015-07-14 1 Subtyping 2 Objects and Inheritance 3 Multithreading 1 Subtyping 2 Objects and Inheritance

More information

ITP 342 Mobile App Dev. Code

ITP 342 Mobile App Dev. Code ITP 342 Mobile App Dev Code Comments Variables Arithmetic operators Format specifiers if - else Relational operators Logical operators Constants Outline 2 Comments For a single line comment, use // The

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 21

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 21 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 21 LAST TIME: UNIX PROCESS MODEL Began to explore the implementation of the UNIX process model The user API is very simple: fork() creates a

More information

Due Date: See Blackboard

Due Date: See Blackboard Source File: ~/2315/45/lab45.(C CPP cpp c++ cc cxx cp) Input: under control of main function Output: under control of main function Value: 4 Integer data is usually represented in a single word on a computer.

More information

Example Threads. compile: gcc mythread.cc -o mythread -lpthread What is the output of this program? #include <pthread.h> #include <stdio.

Example Threads. compile: gcc mythread.cc -o mythread -lpthread What is the output of this program? #include <pthread.h> #include <stdio. Example Threads #include #include int num = 0; void *add_one(int *thread_num) { num++; printf("thread %d num = %d\n", *thread_num, num); } void main() { pthread_t thread; int my_id

More information

Integration of analytic model and simulation model for analysis on system survivability

Integration of analytic model and simulation model for analysis on system survivability 6 Integration of analytic model and simulation model for analysis on system survivability Jang Se Lee Department of Computer Engineering, Korea Maritime and Ocean University, Busan, Korea Summary The objective

More information

! Tree: set of nodes and directed edges. ! Parent: source node of directed edge. ! Child: terminal node of directed edge

! Tree: set of nodes and directed edges. ! Parent: source node of directed edge. ! Child: terminal node of directed edge Trees & Heaps Week 12 Gaddis: 20 Weiss: 21.1-3 CS 5301 Fall 2018 Jill Seaman!1 Tree: non-recursive definition! Tree: set of nodes and directed edges - root: one node is distinguished as the root - Every

More information

libcppa Now: High-Level Distributed Programming Without Sacrificing Performance

libcppa Now: High-Level Distributed Programming Without Sacrificing Performance libcppa Now: High-Level Distributed Programming Without Sacrificing Performance Matthias Vallentin matthias@bro.org University of California, Berkeley C ++ Now May 14, 2013 Outline 1. Example Application:

More information

A Deterministic Concurrent Language for Embedded Systems

A Deterministic Concurrent Language for Embedded Systems A Deterministic Concurrent Language for Embedded Systems Stephen A. Edwards Columbia University Joint work with Olivier Tardieu SHIM:A Deterministic Concurrent Language for Embedded Systems p. 1/38 Definition

More information

SE350: Operating Systems

SE350: Operating Systems SE350: Operating Systems Tutorial: The Programming Interface Main Points Creating and managing processes fork, exec, wait Example: implementing a shell Shell A shell is a job control system Allows programmer

More information

CPSC 213. Introduction to Computer Systems. Threads. Unit 2b

CPSC 213. Introduction to Computer Systems. Threads. Unit 2b CPSC 213 Introduction to Computer Systems Unit 2b Threads 1 Reading Text Concurrent Programming with Threads 2ed: 12.3 1ed: 13.3 2 The Virtual Processor Originated with Edsger Dijkstra in the THE Operating

More information

Type Conversion. and. Statements

Type Conversion. and. Statements and Statements Type conversion changing a value from one type to another Void Integral Floating Point Derived Boolean Character Integer Real Imaginary Complex no fractional part fractional part 2 tj Suppose

More information

TDRV006-SW-42. VxWorks Device Driver. 64 Digital Inputs/Outputs (Bit I/O) Version 4.0.x. User Manual. Issue December 2017

TDRV006-SW-42. VxWorks Device Driver. 64 Digital Inputs/Outputs (Bit I/O) Version 4.0.x. User Manual. Issue December 2017 The Embedded I/O Company TDRV006-SW-42 VxWorks Device Driver 64 Digital Inputs/Outputs (Bit I/O) Version 4.0.x User Manual Issue 4.0.0 December 2017 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek,

More information

C Pointers. 6th April 2017 Giulio Picierro

C Pointers. 6th April 2017 Giulio Picierro C Pointers 6th April 07 Giulio Picierro Functions Return type Function name Arguments list Function body int sum(int a, int b) { return a + b; } Return statement (return keyword

More information

Embedded Software TI2726 B. 4. Interrupts. Koen Langendoen. Embedded Software Group

Embedded Software TI2726 B. 4. Interrupts. Koen Langendoen. Embedded Software Group Embedded Software 4. Interrupts TI2726 B Koen Langendoen Embedded Software Group What is an Interrupt? Asynchronous signal from hardware Synchronous signal from software Indicates the need for attention

More information

CS4411 Intro. to Operating Systems Exam 1 Fall points 10 pages

CS4411 Intro. to Operating Systems Exam 1 Fall points 10 pages CS4411 Intro. to Operating Systems Exam 1 Fall 2005 (October 6, 2005) 1 CS4411 Intro. to Operating Systems Exam 1 Fall 2005 150 points 10 pages Name: Most of the following questions only require very short

More information

Extracting Executable Architecture from Legacy Code using Static Reverse Engineering. REHMAN ARSHAD The University of Manchester, UK

Extracting Executable Architecture from Legacy Code using Static Reverse Engineering. REHMAN ARSHAD The University of Manchester, UK Extracting Executable Architecture from Legacy Code using Static Reverse Engineering REHMAN ARSHAD The University of Manchester, UK Research Context Research Product Line Engineering Reverse Engineering

More information

arxiv: v5 [cs.oh] 2 May 2018

arxiv: v5 [cs.oh] 2 May 2018 An Introduction to Classic DEVS Yentl Van Tendeloo Hans Vangheluwe {Yentl.VanTendeloo,Hans.Vangheluwe}@uantwerpen.be May 3, 2018 arxiv:1701.07697v5 [cs.oh] 2 May 2018 Abstract DEVS is a popular formalism

More information

Design Patterns (Composite, Iterator)

Design Patterns (Composite, Iterator) CS 246: Software Abstraction and Specification Lecture 17 Design Patterns (Composite, Iterator) Reading: Head First Design Patterns U Waterloo CS246se (Spring 2011) p.1/30 Today's Agenda Design patterns:

More information

CMSC 202 Midterm Exam 1 Fall 2015

CMSC 202 Midterm Exam 1 Fall 2015 1. (15 points) There are six logic or syntax errors in the following program; find five of them. Circle each of the five errors you find and write the line number and correction in the space provided below.

More information

Largest Online Community of VU Students

Largest Online Community of VU Students WWW.VUPages.com http://forum.vupages.com WWW.VUTUBE.EDU.PK Largest Online Community of VU Students MIDTERM EXAMINATION SEMESTER FALL 2003 CS301-DATA STRUCTURE Total Marks:86 Duration: 60min Instructions

More information

CSC 126 FINAL EXAMINATION Spring Total Possible TOTAL 100

CSC 126 FINAL EXAMINATION Spring Total Possible TOTAL 100 CSC 126 FINAL EXAMINATION Spring 2011 Version A Name (Last, First) Your Instructor Question # Total Possible 1. 10 Total Received 2. 15 3. 15 4. 10 5. 10 6. 10 7. 10 8. 20 TOTAL 100 Name: Sp 11 Page 2

More information

20-CS Programming Languages Fall 2018

20-CS Programming Languages Fall 2018 20-CS-4003-001 Programming Languages Fall 2018 Answer all questions Be sure to put your name on the paper in the space provided! Name Signature 1. It is claimed in https://docs.oracle.com/javase/tutorial/extra/generics/fineprint.html

More information

ADVENTURE_IO Input/Output format and libraries for ADVENTURE modules List of Input/Output Functions February 17, 2006

ADVENTURE_IO Input/Output format and libraries for ADVENTURE modules List of Input/Output Functions February 17, 2006 ADVENTURE_IO Input/Output format and libraries for ADVENTURE modules List of Input/Output Functions February 17, 2006 ADVENTURE Project Contents 1. Open/Close of Adv file... 3 2. Open/Close of AdvDocument...

More information

Concurrency. On multiprocessors, several threads can execute simultaneously, one on each processor.

Concurrency. On multiprocessors, several threads can execute simultaneously, one on each processor. Synchronization 1 Concurrency On multiprocessors, several threads can execute simultaneously, one on each processor. On uniprocessors, only one thread executes at a time. However, because of preemption

More information

f() ! " Run a higher-priority task? ! " Yield the processor to another task because our ! " Use the processor for some other activity while

f() !  Run a higher-priority task? !  Yield the processor to another task because our !  Use the processor for some other activity while CS 410/510: Advanced Programming Continuing a Computation: Continuations Mark P Jones Portland State University 1 Standard nested function call pattern 2 Continuing a Computation: What might we want to

More information

CS 410/510: Advanced Programming

CS 410/510: Advanced Programming CS 410/510: Advanced Programming Continuations Mark P Jones Portland State University 1 Continuing a Computation: f() g() h() Standard nested function call pattern 2 Continuing a Computation: f() g() h()

More information

C++: Const Function Overloading Constructors and Destructors Enumerations Assertions

C++: Const Function Overloading Constructors and Destructors Enumerations Assertions C++: Const Function Overloading Constructors and Destructors Enumerations Assertions Const const float pi=3.14159; const int* pheight; // defines pointer to // constant int value cannot be changed // pointer

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming Input Processing in Linux (Module 17) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Linux Input Systems An option: each attached input device

More information

CS106X Handout 35 Winter 2018 March 12 th, 2018 CS106X Midterm Examination

CS106X Handout 35 Winter 2018 March 12 th, 2018 CS106X Midterm Examination CS106X Handout 35 Winter 2018 March 12 th, 2018 CS106X Midterm Examination This is an open-book, open-note, closed-electronic-device exam. You needn t write #includes, and you may (and you re even encouraged

More information

9. Security. Safeguard Engine. Safeguard Engine Settings

9. Security. Safeguard Engine. Safeguard Engine Settings 9. Security Safeguard Engine Traffic Segmentation Settings Storm Control DoS Attack Prevention Settings Zone Defense Settings SSL Safeguard Engine D-Link s Safeguard Engine is a robust and innovative technology

More information

OBJECT ORIENTED SIMULATION LANGUAGE. OOSimL Reference Manual - Part 2

OBJECT ORIENTED SIMULATION LANGUAGE. OOSimL Reference Manual - Part 2 OBJECT ORIENTED SIMULATION LANGUAGE OOSimL Reference Manual - Part 2 Technical Report TR-CSIS-OOPsimL-2 José M. Garrido Department of Computer Science Updated November 2014 College of Computing and Software

More information

CS 142 Style Guide Grading and Details

CS 142 Style Guide Grading and Details CS 142 Style Guide Grading and Details In the English language, there are many different ways to convey a message or idea: some ways are acceptable, whereas others are not. Similarly, there are acceptable

More information

Communications API. TEAM A : Communications and Integration Group. April 15, 1995

Communications API. TEAM A : Communications and Integration Group. April 15, 1995 Communications API TEAM A : Communications and Integration Group April 15, 1995 1 Introduction This document specifies the API provided by the Communications and Integration group for use in the AMC system.

More information

AC: COMPOSABLE ASYNCHRONOUS IO FOR NATIVE LANGUAGES. Tim Harris, Martín Abadi, Rebecca Isaacs & Ross McIlroy

AC: COMPOSABLE ASYNCHRONOUS IO FOR NATIVE LANGUAGES. Tim Harris, Martín Abadi, Rebecca Isaacs & Ross McIlroy AC: COMPOSABLE ASYNCHRONOUS IO FOR NATIVE LANGUAGES Tim Harris, Martín Abadi, Rebecca Isaacs & Ross McIlroy Synchronous IO in the Windows API Read the contents of h, and compute a result BOOL ProcessFile(HANDLE

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

Recap. ANSI C Reserved Words C++ Multimedia Programming Lecture 2. Erwin M. Bakker Joachim Rijsdam

Recap. ANSI C Reserved Words C++ Multimedia Programming Lecture 2. Erwin M. Bakker Joachim Rijsdam Multimedia Programming 2004 Lecture 2 Erwin M. Bakker Joachim Rijsdam Recap Learning C++ by example No groups: everybody should experience developing and programming in C++! Assignments will determine

More information

Creating Threads COMP755

Creating Threads COMP755 Creating Threads COMP755 "I pledged California to a Northern Republic and to a flag that should have no treacherous threads of cotton in its warp, and the audience came down in thunder." Thomas Starr King

More information

MCS 360 Exam 2 11 November In order to get full credit, you need to show your work.

MCS 360 Exam 2 11 November In order to get full credit, you need to show your work. MCS 360 Exam 2 11 November 2015 Name: Do not start until instructed to do so. In order to get full credit, you need to show your work. You have 50 minutes to complete the exam. Good Luck! Problem 1.a /15

More information

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable Basic C++ Overview C++ is a version of the older C programming language. This is a language that is used for a wide variety of applications and which has a mature base of compilers and libraries. C++ is

More information

CPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points)

CPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points) Name Definition Matching (8 Points) 1. (8 pts) Match the words with their definitions. Choose the best definition for each word. Relational Expression Iteration Counter Count-controlled loop Loop Flow

More information

Armide Documentation. Release Kyle Mayes

Armide Documentation. Release Kyle Mayes Armide Documentation Release 0.3.1 Kyle Mayes December 19, 2014 Contents 1 Introduction 1 1.1 Features.................................................. 1 1.2 License..................................................

More information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information Laboratory 2: Programming Basics and Variables Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information 3. Comment: a. name your program with extension.c b. use o option to specify

More information

EMBEDDED SYSTEMS PROGRAMMING Language Basics

EMBEDDED SYSTEMS PROGRAMMING Language Basics EMBEDDED SYSTEMS PROGRAMMING 2015-16 Language Basics "The tower of Babel" by Pieter Bruegel the Elder Kunsthistorisches Museum, Vienna (PROGRAMMING) LANGUAGES ABOUT THE LANGUAGES C (1972) Designed to replace

More information

Pointers, Dynamic Data, and Reference Types

Pointers, Dynamic Data, and Reference Types Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation The new operator The delete operator Dynamic Memory Allocation for Arrays 1 C++ Data Types simple

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Fall 2014 Project 1: Review Geoffrey M. Voelker Locks & CVs Lock issues A thread cannot Acquire a lock it already holds A thread cannot Release a lock it does not

More information

Multimedia-Programmierung Übung 3

Multimedia-Programmierung Übung 3 Multimedia-Programmierung Übung 3 Ludwig-Maximilians-Universität München Sommersemester 2016 Ludwig-Maximilians-Universität München Multimedia-Programmierung 1-1 Today Ludwig-Maximilians-Universität München

More information

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above P.G.TRB - COMPUTER SCIENCE Total Marks : 50 Time : 30 Minutes 1. C was primarily developed as a a)systems programming language b) general purpose language c) data processing language d) none of the above

More information

CSC148 Intro. to Computer Science

CSC148 Intro. to Computer Science CSC148 Intro. to Computer Science Lecture 2: designing classes, special methods, managing attributes; intro composition, inheritance Amir H. Chinaei, Summer 2016 Office Hours: R 10 12 BA4222 csc148ta@cdf.toronto.edu

More information