The document introduces CorelDraw, a graphical package for creating and editing graphics. It defines graphics and lists some common graphics packages, including CorelDraw. It then describes the CorelDraw environment, including the title bar, menu bar, rulers, status bar, color palette, and keyboard shortcuts. It outlines the different toolboxes in CorelDraw, including tools for editing shapes, selecting objects, zooming, drawing rectangles, lines, ellipses, polygons, and text. It also details tools for applying fills, outlines, and other painting tools. Finally, it provides basic instructions for opening CorelDraw, drawing shapes, applying color, and exiting the program.
The document contains a multiple choice test with 60 questions about various topics related to computers and their history. The questions cover topics such as computer hardware components, software, programming languages, early computers, units of measurement, companies/founders, and applications. The key provided indicates the correct answer for each question.
The document provides an agenda for a .NET and C# training session. It will cover the .NET platform and Visual Studio IDE, the .NET framework, an introduction to the C# programming language, object-oriented principles in C#, assemblies and modules, and sample applications. It then discusses key concepts about the .NET platform, Visual Studio, C# language syntax and components, data types in C#, arrays, and assemblies.
How to implement a simple dalvik virtual machineChun-Yu Wang
This slide is an introduction to Android Dalvik Virtual Machine on a short course.
We use two hand-made JVM and DVM which called Simple JVM and Simple DVM respectively, to tell student how they work. A Foo Class was provided as a target for verifying the execution results of those VM. We hope it will help student to understand JVM and DVM quickly.
Java Multiple Choice Questions and AnswersJava Projects
http://www.javaassignmenthelp.net/java-multiple-choice-questions-with-answers/ Advanced java multiple choice questions and answers are important if you want to pass on your exam. Check this presentation to learn more about Java multiple choice questions and answers.
Multiple choice quiz for introductions to computersKate Bailey
The document contains 8 lessons that introduce basic concepts about computers and the Internet. It covers early calculating machines, computer components and their functions, input/output devices, storage types, uses of microprocessors, ways computers output information, limitations of artificial intelligence, components of the Internet, factors affecting webpage loading, wireless connections, and information about the creator of COBOL programming language Dr. Grace Hopper.
Provides basic file and directory support classes
Contains types that enable you to read and write files and data streams
Many of the types or classes defined as part of the System.IO namespace are designed around streams
This document summarizes the history and concepts of database connectivity prior to and with the introduction of JDBC and ODBC. It discusses how database connectivity was previously vendor-specific and difficult, and how JDBC and ODBC standardized connectivity through open APIs. It then covers the key aspects of JDBC including its definition, tasks, support for different architectures, and types of JDBC drivers.
Image contro, and format functions in vbAmandeep Kaur
The document discusses various aspects of using picture boxes and image controls in Visual Basic forms and applications. It covers how to add, load images into, format text in, handle events of, and animate picture boxes. It also compares picture boxes and image controls, describing how picture boxes allow more customization but image controls automatically resize images. Formatting functions for numbers, currency, percentages, and dates are also outlined.
20160331_Automate the boring stuff with pythonSungman Jang
The document is a book in Korean titled "Automate the Boring Stuff with Python" that teaches Python programming. It has two main parts: Part 1 covers Python basics like flow control, functions, lists, and strings. Part 2 covers automating tasks with Python like working with files, web scraping, Excel, PDFs, and controlling the keyboard and mouse. The book compares Python to other languages like Java and C++, explaining why Python is a productive language for automation tasks.
This CAO lab manual is strictly designed as per the BPUT syllabus covering all the experiments. Any suggestion and comments are welcome at [email protected]
The document discusses Unified Extensible Firmware Interface (UEFI), which is a replacement for the older BIOS firmware. It aims to address limitations of BIOS like being based on 16-bit architecture and a non-graphical interface. UEFI uses a new GUID Partition Table scheme and supports 64-bit processors and longer mode. It provides standardized interfaces for booting an operating system and improved performance over BIOS. Major operating systems have implemented UEFI including Windows, Mac OS, and Linux.
This is the first term Continuous Assessment Test for JS2. It is arranged in a way that economizes for the school. Where you have one print out for four students and all you have to do is cut it off. They are accurately measured.
Event Driven programming(ch1 and ch2).pdfAliEndris3
The document discusses event-driven programming fundamentals in C#. It defines an event-driven program as one where the flow is determined by events or triggers. Key features discussed include forms, event loops, trigger functions, and event handlers. It also covers how to create a basic "Hello World" application in C#, including using namespaces, classes and the main method. Finally, it discusses different programming elements like fields, properties, methods and events.
The document provides an overview of the basics of C# 2008 .NET 3.0/3.5, including the basic structure of a C# program, namespaces, classes, methods, variables, data types, operators, flow control, arrays, namespaces, console input/output, and comments. It discusses key concepts such as object-oriented programming fundamentals, console applications in Visual Studio 2008, and more advanced topics such as checked and unchecked operators.
This document provides an introduction to computer programming concepts, including:
1) It defines what a computer program is and explains that programs get input from users and generate output.
2) It discusses the importance of program design, implementation, and testing according to a specification.
3) It explains that high-level programming languages are used instead of machine language, and compilers translate programs into machine language.
C# is an object-oriented programming language where programs consist of objects that interact through methods. The document discusses C# program structure, sample code, how code is executed, and data types in C#. It provides details on value types like integers and floats, reference types like strings, and pointer types. Key features of C# include being case sensitive and requiring semicolons. The document also covers operators, variables, and keywords in C#.
The document discusses sending emails using PHP. It provides the syntax for PHP's mail() function which requires parameters like to, subject, message, headers, and parameters. It also discusses configuring PHP in the php.ini file to send emails and debugging email issues. Common PHP errors like syntax errors, runtime errors, and logical errors are covered as well as basic error handling techniques.
C was originally developed in the early 1970s by Dennis Ritchie at Bell Labs to write the UNIX operating system. Previous languages like FORTRAN and B were insufficient for this task. Ritchie developed C between 1971-1973 to create a language that was better suited to writing UNIX. UNIX was then rewritten in C, and even the UNIX kernel was rewritten in C in 1973 on a PDP-11 computer. C became widely popularized after Ritchie and Brian Kernighan published their book "The C Programming Language" in 1978. C has since evolved through various standards, with Dennis Ritchie considered the father of C for his approach in developing UNIX with shared computing resources for multiple users.
Java was created by Sun Microsystems in 1991 and is now owned by Oracle. It is one of the most popular programming languages due to its platform independence, allowing code to run on Windows, Linux, and other operating systems. Java applications are compiled to bytecode that can be run on any system with a Java Virtual Machine. This "write once, run anywhere" ability makes Java widely used for both web and mobile applications.
ASP.NET Core is a framework that unifies ASP.NET MVC, Web API, and Web Pages around the .NET Core platform. It allows building web applications and services using modern web development tools and approaches on Windows, Mac and Linux. ASP.NET Core is cross-platform and supports Docker containers. It integrates with Entity Framework Core for database access and model binding.
This document contains a practice test with multiple choice questions about basic computer hardware, software, and concepts. Some of the questions test knowledge of computer components like monitors, hard drives, and operating systems. Other questions cover common computer tasks and applications like word processing, file management, and internet browsing. The test also includes questions about ergonomics, ethics, and the appropriate use of technology.
Google I/O 2011, Android Accelerated RenderingRomain Guy
The document discusses Android accelerated rendering. It describes how hardware acceleration allows Android to render UI elements on the GPU rather than the CPU. This improves performance by taking advantage of the GPU's parallel processing abilities. It outlines the new drawing model which uses display lists to cache drawing commands and reduce redundant work. Finally, it compares the old software rendering approach to the new hardware accelerated approach using display lists.
The .NET Framework is a development platform that provides a common language runtime and class libraries. It allows programming languages to interact seamlessly by defining a common type system and language specification. .NET languages compile to intermediate language code that gets compiled to machine code by the just-in-time compiler. The class libraries provide basic functionality for tasks like data access, XML, windows forms, web development and web services. Visual Studio .NET is an IDE that supports building applications on the .NET platform.
BP204 - Take a REST and put your data to work with APIs!Craig Schumann
Today, the web is buzzing with the talk about web APIs. It seems that everyone - Facebook, Twitter, Netflix - has some sort of API you can use to integrate with their services. APIs are fundamental to how services on the web work today and data is the new currency. Knowing how to put them to work or how to roll your own can be a huge addition to your development toolbox. This session is all about web-based APIs (like REST). If you have only the vaguest idea about what an API is, or have ever wondered what REST was all about -- then this session is for you! We'll cover examples of using common public APIs and how you can put them to work in your own apps, and how to go about creating your own APIs, or use the REST services in IBM Domino.
Data Persistence in Android with Room LibraryReinvently
Android developer Dmitry Dogar talks on how to organize data persistence in Android using the new Room library. Topic inspired by Google Developer Group meetup.
This document contains a list of 40 multiple choice questions about the Unity game engine and C# programming. It covers topics like the main components of Unity like scenes, transforms, prefabs; scripting fundamentals in C# for Unity including classes, inheritance, and MonoBehaviour; rendering and optimization techniques; and references for additional Unity and C# tutorials. The questions are intended to test knowledge of the Unity game engine and C# programming concepts for games.
C++ is a general-purpose programming language created by Bjarne Stroustrup in 1979. It has imperative, object-oriented and generic programming features. The structure of a C++ program includes preprocessor directives, a main() function, and a program body. Variables are declared with a data type and used to store and manipulate data. C++ supports various operators for arithmetic, relational, logical, and bitwise operations.
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
In this presentation, Doug Hawkins will discuss how the Dalvik VM is different from traditional Java VMs and the motivations behind those differences. Along the way, you'll learn about Android's service architecture, Dalvik's byte code format, and the surprising details of how Android installs, launches, and executes applications.
Understanding the Dalvik bytecode with the Dedexer toolGabor Paller
This document discusses the Dalvik virtual machine used in Android and how to decompile Dalvik bytecode using the Dedexer tool. It provides background on Android's use of Java and the Dalvik VM. Key points include: Dalvik uses its own bytecode format rather than Java bytecode and executes applications; the Dedexer tool can be used to disassemble DEX files back into Dalvik bytecode; and differences in Dalvik like its register-based rather than stack-based design are explained. Examples of Dalvik bytecode instructions and register usage are also provided.
Image contro, and format functions in vbAmandeep Kaur
The document discusses various aspects of using picture boxes and image controls in Visual Basic forms and applications. It covers how to add, load images into, format text in, handle events of, and animate picture boxes. It also compares picture boxes and image controls, describing how picture boxes allow more customization but image controls automatically resize images. Formatting functions for numbers, currency, percentages, and dates are also outlined.
20160331_Automate the boring stuff with pythonSungman Jang
The document is a book in Korean titled "Automate the Boring Stuff with Python" that teaches Python programming. It has two main parts: Part 1 covers Python basics like flow control, functions, lists, and strings. Part 2 covers automating tasks with Python like working with files, web scraping, Excel, PDFs, and controlling the keyboard and mouse. The book compares Python to other languages like Java and C++, explaining why Python is a productive language for automation tasks.
This CAO lab manual is strictly designed as per the BPUT syllabus covering all the experiments. Any suggestion and comments are welcome at [email protected]
The document discusses Unified Extensible Firmware Interface (UEFI), which is a replacement for the older BIOS firmware. It aims to address limitations of BIOS like being based on 16-bit architecture and a non-graphical interface. UEFI uses a new GUID Partition Table scheme and supports 64-bit processors and longer mode. It provides standardized interfaces for booting an operating system and improved performance over BIOS. Major operating systems have implemented UEFI including Windows, Mac OS, and Linux.
This is the first term Continuous Assessment Test for JS2. It is arranged in a way that economizes for the school. Where you have one print out for four students and all you have to do is cut it off. They are accurately measured.
Event Driven programming(ch1 and ch2).pdfAliEndris3
The document discusses event-driven programming fundamentals in C#. It defines an event-driven program as one where the flow is determined by events or triggers. Key features discussed include forms, event loops, trigger functions, and event handlers. It also covers how to create a basic "Hello World" application in C#, including using namespaces, classes and the main method. Finally, it discusses different programming elements like fields, properties, methods and events.
The document provides an overview of the basics of C# 2008 .NET 3.0/3.5, including the basic structure of a C# program, namespaces, classes, methods, variables, data types, operators, flow control, arrays, namespaces, console input/output, and comments. It discusses key concepts such as object-oriented programming fundamentals, console applications in Visual Studio 2008, and more advanced topics such as checked and unchecked operators.
This document provides an introduction to computer programming concepts, including:
1) It defines what a computer program is and explains that programs get input from users and generate output.
2) It discusses the importance of program design, implementation, and testing according to a specification.
3) It explains that high-level programming languages are used instead of machine language, and compilers translate programs into machine language.
C# is an object-oriented programming language where programs consist of objects that interact through methods. The document discusses C# program structure, sample code, how code is executed, and data types in C#. It provides details on value types like integers and floats, reference types like strings, and pointer types. Key features of C# include being case sensitive and requiring semicolons. The document also covers operators, variables, and keywords in C#.
The document discusses sending emails using PHP. It provides the syntax for PHP's mail() function which requires parameters like to, subject, message, headers, and parameters. It also discusses configuring PHP in the php.ini file to send emails and debugging email issues. Common PHP errors like syntax errors, runtime errors, and logical errors are covered as well as basic error handling techniques.
C was originally developed in the early 1970s by Dennis Ritchie at Bell Labs to write the UNIX operating system. Previous languages like FORTRAN and B were insufficient for this task. Ritchie developed C between 1971-1973 to create a language that was better suited to writing UNIX. UNIX was then rewritten in C, and even the UNIX kernel was rewritten in C in 1973 on a PDP-11 computer. C became widely popularized after Ritchie and Brian Kernighan published their book "The C Programming Language" in 1978. C has since evolved through various standards, with Dennis Ritchie considered the father of C for his approach in developing UNIX with shared computing resources for multiple users.
Java was created by Sun Microsystems in 1991 and is now owned by Oracle. It is one of the most popular programming languages due to its platform independence, allowing code to run on Windows, Linux, and other operating systems. Java applications are compiled to bytecode that can be run on any system with a Java Virtual Machine. This "write once, run anywhere" ability makes Java widely used for both web and mobile applications.
ASP.NET Core is a framework that unifies ASP.NET MVC, Web API, and Web Pages around the .NET Core platform. It allows building web applications and services using modern web development tools and approaches on Windows, Mac and Linux. ASP.NET Core is cross-platform and supports Docker containers. It integrates with Entity Framework Core for database access and model binding.
This document contains a practice test with multiple choice questions about basic computer hardware, software, and concepts. Some of the questions test knowledge of computer components like monitors, hard drives, and operating systems. Other questions cover common computer tasks and applications like word processing, file management, and internet browsing. The test also includes questions about ergonomics, ethics, and the appropriate use of technology.
Google I/O 2011, Android Accelerated RenderingRomain Guy
The document discusses Android accelerated rendering. It describes how hardware acceleration allows Android to render UI elements on the GPU rather than the CPU. This improves performance by taking advantage of the GPU's parallel processing abilities. It outlines the new drawing model which uses display lists to cache drawing commands and reduce redundant work. Finally, it compares the old software rendering approach to the new hardware accelerated approach using display lists.
The .NET Framework is a development platform that provides a common language runtime and class libraries. It allows programming languages to interact seamlessly by defining a common type system and language specification. .NET languages compile to intermediate language code that gets compiled to machine code by the just-in-time compiler. The class libraries provide basic functionality for tasks like data access, XML, windows forms, web development and web services. Visual Studio .NET is an IDE that supports building applications on the .NET platform.
BP204 - Take a REST and put your data to work with APIs!Craig Schumann
Today, the web is buzzing with the talk about web APIs. It seems that everyone - Facebook, Twitter, Netflix - has some sort of API you can use to integrate with their services. APIs are fundamental to how services on the web work today and data is the new currency. Knowing how to put them to work or how to roll your own can be a huge addition to your development toolbox. This session is all about web-based APIs (like REST). If you have only the vaguest idea about what an API is, or have ever wondered what REST was all about -- then this session is for you! We'll cover examples of using common public APIs and how you can put them to work in your own apps, and how to go about creating your own APIs, or use the REST services in IBM Domino.
Data Persistence in Android with Room LibraryReinvently
Android developer Dmitry Dogar talks on how to organize data persistence in Android using the new Room library. Topic inspired by Google Developer Group meetup.
This document contains a list of 40 multiple choice questions about the Unity game engine and C# programming. It covers topics like the main components of Unity like scenes, transforms, prefabs; scripting fundamentals in C# for Unity including classes, inheritance, and MonoBehaviour; rendering and optimization techniques; and references for additional Unity and C# tutorials. The questions are intended to test knowledge of the Unity game engine and C# programming concepts for games.
C++ is a general-purpose programming language created by Bjarne Stroustrup in 1979. It has imperative, object-oriented and generic programming features. The structure of a C++ program includes preprocessor directives, a main() function, and a program body. Variables are declared with a data type and used to store and manipulate data. C++ supports various operators for arithmetic, relational, logical, and bitwise operations.
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
In this presentation, Doug Hawkins will discuss how the Dalvik VM is different from traditional Java VMs and the motivations behind those differences. Along the way, you'll learn about Android's service architecture, Dalvik's byte code format, and the surprising details of how Android installs, launches, and executes applications.
Understanding the Dalvik bytecode with the Dedexer toolGabor Paller
This document discusses the Dalvik virtual machine used in Android and how to decompile Dalvik bytecode using the Dedexer tool. It provides background on Android's use of Java and the Dalvik VM. Key points include: Dalvik uses its own bytecode format rather than Java bytecode and executes applications; the Dedexer tool can be used to disassemble DEX files back into Dalvik bytecode; and differences in Dalvik like its register-based rather than stack-based design are explained. Examples of Dalvik bytecode instructions and register usage are also provided.
With growth in app market it is essential to guard our android apps against possible threats, in this presentation we will walk through various tools and techniques which some one can use to reverse engineer an android app, we will see how some one can get access to APP DB, CODE, API, PREFERENCES.
We will also see different tools and techniques to guard our app against possible threats from code obfuscation with tools like dexgaurd to newer methods like verification of api calls using google play services.
This session was taken in Barcamp 13 bangalore http://barcampbangalore.org/bcb/bcb13/reverse-engineering-an-android-app-securing-your-android-apps-against-attacks
and bangalore android user group meetup Jan meetup http://www.meetup.com/blrdroid/events/100360682/
(Presentation at HITcon 2011) This talk introduces how to do Android application reverse engineering by real example. And, it covers the advanced topics like optimized DEX and JNI.
Android internals 05 - Dalvik VM (rev_1.1)Egor Elizarov
This document discusses the Dalvik virtual machine (VM) used in Android. It begins with an overview of VMs and describes Dalvik as a register-based VM that relies on the operating system for memory management, threading, and process isolation. It then covers Dalvik bytecode, the interpreter core, just-in-time compilation, application launching via the Zygote process, and porting Dalvik to new platforms.
So you've reversed you're first Android APK; now what? Java pseduocode is nice, but how do we modify the app? This is a crash course in reading and understanding Davlik opcodes. It will go through some basics then we will jump into a couple case studies to demonstrate some of the concepts. This talk should help testers who are interested in or do Android application assessments to better understand how to mess with the underlying code.
This document discusses the Java Native Interface (JNI) which allows Java code running in the Java Virtual Machine (JVM) to call and be called by native code such as C and C++. It provides an overview of JNI and walks through a sample implementation in 5 steps. It also discusses more details of JNI including JNI types, the JNIEnv interface, accessing fields and methods, and managing native memory.
LinkedIn - Disassembling Dalvik BytecodeAlain Leon
The document discusses disassembling Dalvik bytecode on Android. It begins by providing background on Android, Dalvik VM, APK files, DEX files, and JIT compilation. It then discusses ways to hack at different levels: using macros to automate games, intercepting REST traffic, analyzing APK/DEX files by decompiling them and modifying bytecode, analyzing and modifying shared object libraries, and disassembling machine code. The key steps outlined are decompiling DEX to Smali bytecode, applying changes, recompiling to an APK, installing on a device, and analyzing shared object libraries by disassembling to machine code.
This document summarizes a presentation on reverse engineering obfuscated Android applications. It discusses reverse engineering techniques like static and dynamic analysis. It covers analyzing the Android application package (APK) file format and tools like apktool, smali, baksmali, and dex2jar. Common obfuscation techniques like string encryption, call hiding using reflection, and native code are also summarized. The document concludes by recommending further reading on tools and the arms race between attackers and defenders applying obfuscation.
This presentation covers the working model about Process, Thread, system call, Memory operations, Binder IPC, and interactions with Android frameworks.
JVM Mechanics: When Does the JVM JIT & Deoptimize?Doug Hawkins
HotSpot promises to do the "right" thing for us by identifying our hot code and compiling "just-in-time", but how does HotSpot make those decisions?
This presentation aims to detail how HotSpot makes those decisions and how it corrects its mistakes through a series of demos that you run yourself.
The new runtime which Google is started implementing as developers view to implement or not which has advantages over the previous Dalvik runtime and more...
Presentation on Android operating systemSalma Begum
The document summarizes information about the Android operating system. It discusses the origin of Android, its features, architecture, versions, application development process, limitations and future. Android was developed by Android Inc which was later acquired by Google. It has an open source model and uses Linux kernel. The architecture includes libraries, Dalvik VM, application framework and core applications. There are many versions of Android with incremental updates and improvements.
[1D6]RE-view of Android L developer PRE-viewNAVER D2
The document discusses key architectural changes and performance improvements in Android L, including:
1. The introduction of a separate UI and render thread to improve responsiveness.
2. A move from just-in-time (JIT) compilation to ahead-of-time (AOT) compilation with the new Android Runtime (ART) to boost performance.
3. Enhancements to the garbage collection model to reduce pause times and fragmentation.
The document discusses Just-In-Time (JIT) compilation in Android. It begins by explaining the problem with interpreting bytecode, which is slower than native compilation. JIT compilation improves performance by compiling bytecode to native machine code at runtime. The Android Dalvik VM uses a trace-based JIT compiler that identifies and compiles hot regions of code. It generates an intermediate representation (IR) of the code and performs optimizations before code generation. The IR allows machine-specific optimizations to be performed.
JNode is a Java-based operating system that is actively developed and open source. It uses a plugin framework so that everything, including the JVM and framework, can be loaded as plugins. The driver framework finds and maps hardware devices to Java drivers through extension points. Future goals include improved performance, a deployment framework, and a document-oriented desktop environment. Java benefits the OS through dynamic linking, type safety, security features, and development tools.
The document provides an introduction to the Java programming language. It discusses that Java was created by Sun Microsystems to allow web pages to include interactive Java code. It is a simple, object-oriented, portable language that uses bytecode and a virtual machine to achieve platform independence. The document outlines Java's core features such as being distributed, multithreaded, robust, secure, and high performance. It also summarizes Java's basic data types, classes, objects, and how to write both applications and applets.
In dieser Session werfen wir einen Blick auf die Android Platform jenseits der Dalvik VM. Wir entdecken den Android Source Code und erklären wo sich interessante Beispiele und Referenzen für App-Entwickler sowie nützliche Tools verbergen. Ein High-Level Überblick über die Platform-Architektur und das Platform-Build-System runden die Session ab.
The document provides an introduction to Java servlets and JavaServer Pages (JSP). It discusses servlet lifecycles and interfaces like ServletRequest and RequestDispatcher. It covers session tracking techniques including cookies, hidden form fields, and URL rewriting. It also mentions servlet events and listeners.
The document discusses the Java Virtual Machine (JVM) architecture and memory. It covers the following key points:
1. The JVM is the foundation of the Java platform and provides hardware- and operating system-independence for Java programs.
2. The JVM memory is divided into heap spaces like Eden space and survivor space, as well as non-heap spaces like the permanent generation and code cache.
3. Benefits of the JVM include security, cross-platform capability, while drawbacks include slower speed compared to native compilation and lack of platform-specific features.
- The document provides an introduction to Java programming including an overview of Java, its history, platforms, architecture, components, applications, features, and setting up Java.
- It describes Java as a simple, general-purpose, object-oriented language that is architecture neutral, portable, robust and secure.
- The document outlines the key components of Java including the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK).
Amazon Web Services (AWS) is an online cloud computing platform that allows users to store data and run applications on their own servers. It offers services such as web hosting, database management, email, storage, analytics, mobile apps, and more. This course will teach you how to use AWS for various purposes.
Amazon Web Services (AWS) is an online cloud computing platform that allows users to store data and run applications on their own servers. It offers services such as web hosting, database management, email, storage, analytics, mobile apps, and more. This course will teach you how to use AWS for various purposes.
Java : Components
Java : Features
Java : Security
Java better than C++
Basic Data Types
Applications : Types
Life Cycle of Java Code
Java Development Kit
Java Example
Mechanism of Applets
Significance of downloading Applets
Used Java Main Packages
Java is a widely used programming language that is mainly used for application programming. It is platform-independent and supports features like multi-threading and documentation comments. The key aspects of a simple Java program are that it must contain a class with a main method that can be the starting point of execution. The main method has a specific signature of public static void main(String[] args). When a Java program is run, the JVM (Java Virtual Machine) loads and executes the program by performing operations like loading code, verifying code, and providing a runtime environment.
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)JiandSon
This document provides debugging tips for Xcode including using breakpoint actions, exception breakpoints, symbolic breakpoints, and static analysis. It compares ARC and non-ARC debugging and discusses diagnostic tools like memory management and logging. Finally, it introduces DTrace as a dynamic tracing facility for macOS and iOS.
The document discusses Java bytecode and the Java Virtual Machine (JVM). It provides details on:
- Bytecode is machine language for the JVM and is stored in class files. Each method has its own bytecode stream.
- Bytecode instructions consist of opcodes and operands that are executed by the JVM. Common opcodes include iconst_0, istore_0, iinc, iload_0, etc.
- The JVM has various components like the class loader, runtime data areas (method area, heap, stacks), and execution engine that interprets or compiles bytecode to machine code.
This document discusses multithreading in Android. It describes how the AsyncTask class can be used to perform background operations and publish results on the UI thread without manipulating threads directly. It also explains how the Handler class allows sending and processing Message and Runnable objects on a specific thread's message queue, allowing actions to be performed on a different thread than the current one using post() and sendMessage(). Multithreading improves performance on systems with multiple CPUs by allowing tasks to be separated into independent threads that can execute in parallel.
The document provides an overview of key Java concepts:
1. Java is an object-oriented, platform-independent language that is compiled to bytecode and interpreted by the Java Virtual Machine (JVM).
2. The JVM handles security, memory management through garbage collection, and allows multithreaded programming.
3. Developers use the Java Development Kit (JDK) for coding Java applications, which includes the compiler, JVM, and other tools. The Java Runtime Environment (JRE) provides minimum requirements to run Java applications.
Presented by: N.V.Rajasekhar Reddy
www.technolamp.co.in
Want more interesting...
Watch and Like us @ https://www.facebook.com/Technolamp.co.in
subscribe videos @ http://www.youtube.com/user/nvrajasekhar
Java is an object-oriented programming language originally developed by Sun Microsystems. There are four main types of Java applications: standalone, web, enterprise, and mobile. The key features of Java include being platform independent, secure, robust, and distributed. Java code is compiled into bytecode that runs on a Java Virtual Machine (JVM) on any device. The JVM performs tasks like loading code, memory management, and execution. There are various data types in Java including primitives like int and double, and reference types like classes. Variables are used to store and reference values in memory and can be local, instance, or class variables. Arrays provide a way to store multiple values of the same type.
PyPy takes a tracing just-in-time (JIT) compilation approach to optimize Python programs. It works by first interpreting the program, then tracing hot loops and optimizing their performance by compiling them to machine code. This JIT compilation generates and runs optimized trace trees representing the control flow and operations within loops. If guards placed in the compiled code fail, indicating the optimization may no longer apply, execution falls back to the interpreter or recompiles the trace with additional information. PyPy's approach aims to optimize the most common execution paths of Python programs for high performance while still supporting Python's dynamic nature.
This document discusses making Linux capable of hard real-time performance. It begins by defining hard and soft real-time systems and explaining that real-time does not necessarily mean fast but rather determinism. It then covers general concepts around real-time performance in Linux like preemption, interrupts, context switching, and scheduling. Specific features in Linux like RT-Preempt, priority inheritance, and threaded interrupts that improve real-time capabilities are also summarized.
Introduce Brainf*ck, another Turing complete programming language. Then, try to implement the following from scratch: Interpreter, Compiler [x86_64 and ARM], and JIT Compiler.
The promise of the IoT won’t be fulfilled until integrated
software platforms are available that allow software
developers to develop these devices efficiently and in
the most cost-effective manner possible.
This presentation introduces F9 microkernel, new open source
implementation built from scratch, which deploys
modern kernel techniques dedicated to deeply
embedded devices.
The document discusses how a "Hello World" program works behind the scenes. It covers topics like compilation, linking, executable file formats, loading programs into memory, and process creation. The key points are:
1) A C program is compiled into an object file, then linked with library files to create an executable. The linker resolves symbols and relocates addresses.
2) Executable files use formats like ELF that contain machine code, data, symbol tables, and sections. Object files have a similar format.
3) When a program runs, the OS loads pages of the executable into memory as needed and sets up the process with its own virtual address space.
4) System calls
Build a full-functioned virtual machine from scratch, when Brainfuck is used. Basic concepts about interpreter, optimizations techniques, language specialization, and platform specific tweaks.
Xvisor is an open source lightweight hypervisor for ARM architectures. It uses a technique called cpatch to modify guest operating system binaries, replacing privileged instructions with hypercalls. This allows the guest OS to run without privileges in user mode under the hypervisor. Xvisor also implements virtual CPU and memory management to isolate guest instances and virtualize physical resources for multiple operating systems.
This presentation covers the general concepts about real-time systems, how Linux kernel works for preemption, the latency in Linux, rt-preempt, and Xenomai, the real-time extension as the dual kernel approach.
The Mars Pathfinder mission successfully demonstrated new landing techniques and returned valuable data from the Martian surface. However, it experienced issues with priority inversion in its VxWorks real-time operating system. The lower priority weather data collection task would occasionally prevent the higher priority communication task from completing before the next cycle began, resetting the system. Engineers traced the problem to the use of VxWorks' select() call to wait for I/O from multiple devices, allowing long-running lower priority tasks to block critical higher priority tasks.
* Know the reasons why various operating systems exist and how they are functioned for dedicated purposes
* Understand the basic concepts while building system software from scratch
• How can we benefit from cheap ARM boards and the related open source tools?
- Raspberry Pi & STM32F4-Discovery
F9 is a new open source microkernel designed for deeply embedded systems like IoT devices. It aims to provide efficiency, security, and a flexible development environment. F9 follows microkernel principles with minimal kernel functionality and isolates components as user-level processes. It uses capabilities for access control and focuses on performance through techniques like tickless scheduling and adaptive power management.
AI Trends and Fun Demos – Sotheby’s Rehoboth PresentationEthan Holland
Ethan B. Holland explores the impact of artificial intelligence on real estate and digital transformation. Covering key AI trends such as multimodal AI, agency, co-pilots, and AI-powered computer usage, the document highlights how emerging technologies are reshaping industries. It includes real-world demonstrations of AI in action, from automated real estate insights to AI-generated voice and video applications. With expertise in digital transformation, Ethan shares insights from his work optimizing workflows with AI tools, automation, and large language models. This presentation is essential for professionals seeking to understand AI’s role in business, automation, and real estate.
Bedrock Data Automation (Preview): Simplifying Unstructured Data ProcessingZilliz
Bedrock Data Automation (BDA) is a cloud-based service that simplifies the process of extracting valuable insights from unstructured content—such as documents, images, video, and audio. Come learn how BDA leverages generative AI to automate the transformation of multi-modal data into structured formats, enabling developers to build applications and automate complex workflows with greater speed and accuracy.
Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...Earley Information Science
Revolutionizing Field Service with LLM-Powered Knowledge Management
Field service technicians need instant access to accurate repair information, but outdated knowledge systems often create frustrating delays. Large Language Models (LLMs) are changing the game—enhancing knowledge retrieval, streamlining troubleshooting, and reducing technician dependency on senior staff.
In this webinar, Seth Earley and industry experts Sanjay Mehta, and Heather Eisenbraun explore how LLMs and Retrieval-Augmented Generation (RAG) are transforming field service operations. Discover how AI-powered knowledge management is improving efficiency, reducing downtime, and elevating service quality.
LLMs for Instant Knowledge Retrieval – How AI-driven search dramatically cuts troubleshooting time.
Structured Data & AI – Why high-quality, organized knowledge is essential for LLM success.
Real-World Implementation – Lessons from deploying LLM-powered knowledge tools in field service.
Business Impact – How AI reduces service delays, optimizes workflows, and enhances technician productivity.
Empower your field service teams with AI-driven knowledge access. Watch the webinar to see how LLMs are revolutionizing service efficiency.
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use CasesSanjay Willie
Our latest session with Astiostech covered how to unlock the full potential of ChatGPT and LLMs for real-world use!
✅ Key Takeaways:
🔹 Effective Prompting: Crafting context-specific, high-quality prompts for optimal AI responses.
🔹 Advanced ChatGPT Features: Managing system prompts, conversation memory, and file uploads.
🔹 Optimizing AI Outputs: Refining responses, handling large texts, and knowing when fine-tuning is needed.
🔹 Competitive Insights: Exploring how ChatGPT compares with other AI tools.
🔹 Business & Content Use Cases: From summarization to SEO, sales, and audience targeting.
💡 The session provided hands-on strategies to make AI a powerful tool for content creation, decision-making, and business growth.
🚀 Are you using AI effectively in your workflow? Let’s discuss how it can improve efficiency and creativity!
#AI #ChatGPT #PromptEngineering #ArtificialIntelligence #LLM #Productivity #Astiostech
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...Chris Wahl
Recording: https://youtu.be/PASG0NTKUQA?si=1Ih7O9z0Lk0IzX9n
Welcome innovators! In this comprehensive tutorial, you will learn how to get started with AWS Cloud and Terraform to build an enterprise-like landing zone for a secure, low-cost environment to develop with Terraform. We'll guide you through setting up AWS Control Tower, Identity and Access Management, and creating a sandbox account, ensuring you have a safe and controlled area for learning and development. You'll also learn about budget management, single sign-on setup, and using AWS organizations for policy management. Plus, dive deep into Terraform basics, including setting up state management, migrating local state to remote state, and making resource modifications using your new infrastructure as code skills. Perfect for beginners looking to master AWS and Terraform essentials!
Caching for Performance Masterclass: The In-Memory DatastoreScyllaDB
Understanding where in-memory data stores help most and where teams get into trouble.
- Where in the stack to cache
- Memcached as a tool
- Modern cache primitives
Transcript: AI in publishing: Your questions answered - Tech Forum 2025BookNet Canada
George Walkley, a publishing veteran and leading authority on AI applications, joins us for a follow-up to his presentation "Applying AI to publishing: A balanced and ethical approach". George gives a brief overview of developments since that presentation and answers attendees' pressing questions about AI’s impact and potential applications in the book industry.
Link to recording and presentation slides: https://bnctechforum.ca/sessions/ai-in-publishing-your-questions-answered/
Presented by BookNet Canada on February 20, 2025 with support from the Department of Canadian Heritage.
Leadership u automatizaciji: RPA priče iz prakse!UiPathCommunity
Dobrodošli na "AI Powered Automation Leadership Talks", online događaj koji okuplja senior lidere i menadžere iz različitih industrija kako bi podelili svoja iskustva, izazove i strategije u oblasti RPA (Robotic Process Automation). Ovaj događaj pruža priliku da zavirite u način razmišljanja ljudi koji donose ključne odluke u automatizaciji i liderstvu.
📕 Kroz panel diskusiju sa tri izuzetna stručnjaka, istražićemo:
Kako uspešno započeti i skalirati RPA projekte u organizacijama.
Koji su najveći izazovi u implementaciji RPA-a i kako ih prevazići.
Na koje načine automatizacija menja radne procese i pomaže timovima da ostvare više.
Bez obzira na vaše iskustvo sa UiPath-om ili RPA uopšte, ovaj događaj je osmišljen kako bi bio koristan svima – od menadžera do tehničkih lidera, i svima koji žele da unaprede svoje razumevanje automatizacije.
Pridružite nam se i iskoristite ovu jedinstvenu priliku da naučite od onih koji vode automatizaciju u svojim organizacijama. Pripremite svoja pitanja i inspiraciju za sledeće korake u vašoj RPA strategiji!
UiPath Agentic Automation Capabilities and OpportunitiesDianaGray10
Learn what UiPath Agentic Automation capabilities are and how you can empower your agents with dynamic decision making. In this session we will cover these topics:
What do we mean by Agents
Components of Agents
Agentic Automation capabilities
What Agentic automation delivers and AI Tools
Identifying Agent opportunities
❓ If you have any questions or feedback, please refer to the "Women in Automation 2025" dedicated Forum thread. You can find there extra details and updates.
Predictive vs. Preventive Maintenance — Which One is Right for Your FactoryDiagsense ltd
Efficient maintenance is the backbone of any manufacturing operation. It ensures that machinery runs smoothly, minimizes downtime and optimizes overall productivity. Earlier, factories have relied on preventive maintenance but with advancements in technology, Manufacturing PdM Solutions is gaining traction. The question is—which one is the right fit for your factory? Let’s break it down.
DealBook of Ukraine: 2025 edition | AVentures CapitalYevgen Sysoyev
The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2024 and the first deals of 2025.
This is session #3 of the 5-session online study series with Google Cloud, where we take you onto the journey learning generative AI. You’ll explore the dynamic landscape of Generative AI, gaining both theoretical insights and practical know-how of Google Cloud GenAI tools such as Gemini, Vertex AI, AI agents and Imagen 3.
EaseUS Partition Master Crack 2025 + Serial Keykherorpacca127
https://ncracked.com/7961-2/
Note: >> Please copy the link and paste it into Google New Tab now Download link
EASEUS Partition Master Crack is a professional hard disk partition management tool and system partition optimization software. It is an all-in-one PC and server disk management toolkit for IT professionals, system administrators, technicians, and consultants to provide technical services to customers with unlimited use.
EASEUS Partition Master 18.0 Technician Edition Crack interface is clean and tidy, so all options are at your fingertips. Whether you want to resize, move, copy, merge, browse, check, convert partitions, or change their labels, you can do everything with a few clicks. The defragmentation tool is also designed to merge fragmented files and folders and store them in contiguous locations on the hard drive.
DevOps iş təhlükəsizliyi sizi maraqlandırır? İstər developer, istər təhlükəsizlik mühəndisi, istərsə də DevOps həvəskarı olun, bu tədbir şəbəkələşmək, biliklərinizi bölüşmək və DevSecOps sahəsində ən son təcrübələri öyrənmək üçün mükəmməl fürsətdir!
Bu workshopda DevOps infrastrukturlarının təhlükəsizliyini necə artırmaq barədə danışacayıq. DevOps sistemləri qurularkən avtomatlaşdırılmış, yüksək əlçatan və etibarlı olması ilə yanaşı, həm də təhlükəsizlik məsələləri nəzərə alınmalıdır. Bu səbəbdən, DevOps komandolarının təhlükəsizliyə yönəlmiş praktikalara riayət etməsi vacibdir.
Not a Kubernetes fan? The state of PaaS in 2025Anthony Dahanne
Kubernetes won the containers orchestration war. But has it made deploying your apps easier?
Let's explore some of Kubernetes extensive app developer tooling, but mainly what the PaaS space looks like in 2025; 18 years after Heroku made it popular.
Is Heroku still around? What about Cloud Foundry?
And what are those new comers (fly.io, railway, porter.sh, etc.) worth?
Did the Cloud giants replace them all?
Webinar: LF Energy GEISA: Addressing edge interoperability at the meterDanBrown980551
This webinar will introduce the Grid Edge Security and Interoperability Alliance, or GEISA, an effort within LF Energy to address application interoperability at the very edge of the utility network: meters and other distribution automation devices. Over the last decade platform manufacturers have introduced the ability to run applications on electricity meters and other edge devices. Unfortunately, while many of these efforts have been built on Linux, they haven’t been interoperable. APIs and execution environment have varied from one manufacturer to the next making it impossible for utilities to obtain applications that they can run across a fleet of different devices. For utilities that want to minimize their supply chain risk by obtaining equipment from multiple suppliers, they are forced to run and maintain multiple separate management systems. Applications available for one device may need to be ported to run on another, or they may not be available at all.
GEISA addresses this by creating a vendor neutral specification for utility edge computing environments. This webinar will discuss why GEISA is important to utilities, the specific issues GEISA will solve and the new opportunities it creates for utilities, platform vendors, and application vendors.
[Webinar] Scaling Made Simple: Getting Started with No-Code Web AppsSafe Software
Ready to simplify workflow sharing across your organization without diving into complex coding? With FME Flow Apps, you can build no-code web apps that make your data work harder for you — fast.
In this webinar, we’ll show you how to:
Build and deploy Workspace Apps to create an intuitive user interface for self-serve data processing and validation.
Automate processes using Automation Apps. Learn to create a no-code web app to kick off workflows tailored to your needs, trigger multiple workspaces and external actions, and use conditional filtering within automations to control your workflows.
Create a centralized portal with Gallery Apps to share a collection of no-code web apps across your organization.
Through real-world examples and practical demos, you’ll learn how to transform your workflows into intuitive, self-serve solutions that empower your team and save you time. We can’t wait to show you what’s possible!
3. Myself was a Kaffe (world-frist open source JVM)
Developer
● Threaded Interpreter, JIT, AWT for
embedded system, robustness
was a GCJ (Java Frontend for GCC)
and GNU Classpath Developer
is an AOSP (Android Open Source
Project) contributror
● 45+ patches are merged officially
● bionic libc, ARM optimizations
4. Goals of This Presentation
• Understand how a virtual machine works
• Analyze the Dalvik VM using existing tools
• VM hacking is really interesting!
6. Reference Hardware and Host
Configurations
• Android Phone: Nexus S
– http://www.google.com/phone/detail/nexus-s
– Install CyanogenMod (CM9)
http://www.cyanogenmod.com/
• Host: Lenovo x200
– Ubuntu Linux 11.10+ (32-bit)
• AOSP/CM9 source code: 4.0.3
• Follow the instructions in Wiki
http://wiki.cyanogenmod.com/wiki/Building_from_source
7. Build CyanogenMod from Source
• cyanogen-ics$ source build/envsetup.sh
including device/moto/stingray/vendorsetup.sh
including device/moto/wingray/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
• cyanogen-ics$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. full-eng Target: cm_crespo
… Configuration: userdebug
8. full_panda-eng
9. cm_crespo-userdebug
8. Nexus S Device Configurations
• Which would you like? [full-eng] 9
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=cm_crespo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=MR1
============================================
9. Build Dalvik VM
(ARM Target + x86 Host)
• cyanogen-ics$ make dalvikvm dalvik
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=cm_crespo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
… libdvm.so is the VM engine
Install: out/host/linux-x86/lib/libdvm.so
Install: out/target/product/crespo/system/bin/dalvikvm
host C++: dalvikvm <= dalvik/dalvikvm/Main.cpp
host Executable: dalvikvm Install: out/host/linux-
x86/bin/dalvikvm
Copy: dalvik (out/host/linux-
x86/obj/EXECUTABLES/dalvik_intermediates/dalvik)
Install: out/host/linux-x86/bin/dalvik
“dalvik” is a shell script to launch dvm
10. Dalvik VM requires core APIs for runtime
cyanogen-ics$ out/host/linux-x86/bin/dalvik
E( 6983) No valid entries found in bootclasspath
'/tmp/cyanogen-ics/out/host/linux-x86/framework/core-
hostdex.jar:/tmp/cyanogen-ics/out/host/linux-
x86/framework/bouncycastle-hostdex.jar:/tmp/cyanogen-
ics/out/host/linux-x86/framework/apache-xml-
hostdex.jar' (dalvikvm)
E( 6983) VM aborting (dalvikvm)
...
out/host/linux-x86/bin/dalvik: line 28: 6983
Segmentation fault (core dumped)
ANDROID_PRINTF_LOG=tag ANDROID_LOG_TAGS=""
ANDROID_DATA=/tmp/android-data
ANDROID_ROOT=$ANDROID_BUILD_TOP/out/host/linux-x86
LD_LIBRARY_PATH=$ANDROID_BUILD_TOP/out/host/linux-x86/lib
$ANDROID_BUILD_TOP/out/host/linux-x86/bin/dalvikvm -Xbootclasspath:
$ANDROID_BUILD_TOP/out/host/linux-x86/framework/core-hostdex.jar:
$ANDROID_BUILD_TOP/out/host/linux-x86/framework/bouncycastle-
hostdex.jar:
$ANDROID_BUILD_TOP/out/host/linux-x86/framework/apache-xml-
hostdex.jar $*
11. Satisfy Dalvik Runtime Dependency
cyanogen-ics$ make bouncycastle bouncycastle-hostdex
cyanogen-ics$ make sqlite-jdbc mockwebserver
cyanogen-ics$ make sqlite-jdbc-host
cyanogen-ics$ make mockwebserver-hostdex
cyanogen-ics$ make apache-xml-hostdex
cyanogen-ics$ (cd libcore && make)
cyanogen-ics$ out/host/linux-x86/bin/dalvik
...
I(19820) Unable to open or create cache for
/tmp/cyanogen-ics/out/host/linux-x86/framework/core-
hostdex.jar (/data/dalvik-cache/tmp@cyanogen-
ics@out@host@linux-x86@framework@core-
[email protected]) (dalvikvm)
E(19820) Could not stat dex cache directory
'/data/dalvik-cache': No such file or directory
(dalvikvm)
Extra space for "dalvik-cache" is required.
12. Host-side Dalvik VM
cyanogen-ics$ make dexopt
cyanogen-ics$ sudo mkdir -p /data/dalvik-cache
cyanogen-ics$ sudo chmod 777 /data/dalvik-cache
cyanogen-ics$ out/host/linux-x86/bin/dalvik
Dalvik VM requires a class name
Finally, host-side dalvik vm is ready.
It just complain no given class.
cyanogen-ics$ ls /data/dalvik-cache/
tmp@cyanogen-ics@out@host@linux-x86@framework@apache-xml-
[email protected]
tmp@cyanogen-ics@out@host@linux-x86@framework@bouncycastle-
[email protected]
tmp@cyanogen-ics@out@host@linux-x86@framework@core-
[email protected]
Optimized DEX generated by “dexopt"
13. Agenda (1) How Virtual Machine Works
(2) Dalvik VM
(3) Utilities
15. What is Virtual Machine
• A virtual machine (VM) is a software implementation
of a machine (i.e. a computer) that executes programs
like a physical machine.
• Basic parts
– A set of registers
– A stack (optional)
– An execution environment
– A garbage-collected heap
– A constant pool
– A method storage area
– An instruction set
16. VM Types
• Based on its functionality
– System Virtual Machine
supports execution of a complete OS
– Process Virtual Machine
supports execution of a single process
• Based on its architecture
– Stack based VM (uses instructions to load in a
stack for execution)
– Register based VM (uses instructions to be
encoded in source and destination registers)
17. JVM Conceptual Architecture
Class
Classfile
Loader
Memory Space Automatic
memory
Native
Java method
manager
Method Java heap
stack heap
Address
Data and
Instruction
Instruction counter Native
Execution Native
and implicit Method
Engine LIbraries
registers Interface
18. Segment
javaframe
optop
method
Class fields
pc
others
{Variables locales }
vars
19. Segment
javaframe
vars
Environnement cotext
javaframe_i optop
optop_i
registres
20. Example: JVM
• Example Java source: Foo.java
class Foo {
public static void main(String[] args) {
System.out.println("Hello, world");
}
int calc(int a, int b) {
int c = 2 * (a + b);
return c;
}
}
22. Bytecode execution
c := 2 * (a + b)
• Example bytecode
– iconst 2
– iload a
– iload b
– iadd
– imul
– istore c
23. Example bytecode:
iconst 2
iload a a 42
iload b b 7
iadd c 0
imul 2
istore c
Computes: c := 2 * (a + b)
24. Example:
iconst 2
iload a a 42
iload b b 7
iadd c 0 42
imul 2
istore c
Computes: c := 2 * (a + b)
25. Example:
iconst 2
iload a a 42
iload b b 7 7
iadd c 0 42
imul 2
istore c
Computes: c := 2 * (a + b)
26. Example:
iconst 2
iload a a 42
iload b b 7
iadd c 0 49
imul 2
istore c
Computes: c := 2 * (a + b)
27. Example:
iconst 2
iload a a 42
iload b b 7
iadd c 0
imul 98
istore c
Computes: c := 2 * (a + b)
28. Example:
iconst 2
iload a a 42
iload b b 7
iadd c 98
imul
istore c
Computes: c := 2 * (a + b)
29. iadd in specification and implementation
③ add
value1 + value2
④ push
① pop
value2
② pop value1 +
value1 value2
case SVM_INSTRUCTION_IADD: {
/* instruction body */
jint value1 = stack[stack_size - 2].jint; ②
jint value2 = stack[--stack_size].jint; ①
stack[stack_size - 1].jint = value1 +
④ value2; ③
/* dispatch */
goto dispatch;
} Taken from SableVM
sablevm/src/libsablevm/instructions_switch.c
30. Example: Dalvik VM
$ dx --dex --output=Foo.dex Foo.class
$ dexdump -d Foo.dex
Processing 'Foo.dex'...
Opened 'Foo.dex', DEX version '035'
...
Virtual methods -
#0 : (in LFoo;)
name : 'calc'
type : '(II)I'
...
00018c: |[00018c] Foo.calc:(II)I
00019c: 9000 0203 |0000: add-int v0, v2, v3
0001a0: da00 0002 |0002: mul-int/lit8 v0, v0, #int 2
0001a4: 0f00 |0004: return v0
31. Java bytecode vs. Dalvik bytecode
(stack vs. register)
public int method(int i1, int i2)
{
int i3 = i1 * i2;
return i3 * 2;
}
.var 0 is “this” this: v1 (Ltest2;)
.var 1 is argument #1 parameter[0] : v2 (I)
.var 2 is argument #2 parameter[1] : v3 (I)
method public method(II)I
iload_1
iload_2 .method public method(II)I
imul mul-int v0,v2,v3
istore_3 mul-int/lit-8 v0,v0,2
iload_3 return v0
iconst_2 .end method
imul
ireturn
.end method
Java Dalvik
32. Dalvik is register based
• Dalvik uses 3-operand form, which it what a
processoractually uses
33. Dalvik is register based
• To execute "int foo = 1 + 2", the VM does:
– const-4 to store 1 into register 0
– add-int/lit8 to sum the value in register 0 (1) with the literal
2 and store the result intoregister 1 -- namely “foo”
34. Dalvik is register based
• This is only 2 dispatches, but Dalvik byte code is measured
into 2-byte units
• Java byte code was 4-bytes, the Dalvik byte code is actually
6-bytes
35. Code Size
• Generally speaking, the code size of register-based
VM instructions is larger than that of the
corresponding stack VM instructions
• On average, the register code is 25.05% larger than
the original stack code
36. Execution Time
• Register architecture requires an average of 47%
fewer executed VM instructions
Source: Virtual Machine Showdown: Stack Versus Registers
Yunhe Shi, David Gregg, Andrew Beatty, M. Anton Ertl
41. Best Dispatch Implementation
• The computed GOTO can be further optimized if
we re-write it in assembly.
• The code above uses typically two memory
reads. We can lay out all our bytecodes in
memory in such a way that each bytecode takes
exactly the same amount of memory - this way
we can calculate the address directly from the
index.
• Added benefit is the cacheline warm-up for
frequently used bytecodes.
43. Class 文件例子
import java.io.Serializable;
结构:
public class Foo implements Serializable { 声明与常量
public void bar() {
int i = 31;
if (i > 0) {
int j = 42;
代码:
} 语句与表达式
}
}
输出调试符号信息
编译 Java 源码
javac -g Foo.java
javap -c -s -l -verbose Foo
反编译 Class 文件
44. Class 文件例子
public Foo();
Signature: ()V
LineNumberTable:
方法 line 2: 0
元数据
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LFoo;
Code:
字节码 Stack=1, Locals=1, Args_size=1
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
45. Class 文件例子
public void bar();
Signature: ()V
LineNumberTable:
line 4: 0
line 5: 3
line 6: 7
line 8: 10
LocalVariableTable:
方法 Start Length Slot Name
元数据 Signature
10 0 2 j I
0 11 0 this Java 6 开始,有分支
LFoo; 控制流的方法会带有
3 8 1 i I StackMapTable,记
录每个基本块开头处
StackMapTable: number_of_entries = 1
frame_type = 252 /* append */
操作数栈的类型状态
offset_delta = 10
locals = [ int ]
Code:
Stack=1, Locals=3, Args_size=1
0: bipush 31
字节码 2: istore_1
3: iload_1
4: ifle 10
7: bipush 42
9: istore_2
10: return
46. 基于栈与基于寄存器的体系结构的区别
public class Demo {
public static void foo() {
int a = 1;
int b = 2;
int c = (a + b) * 5;
}
}
概念中的 Dalvik 虚拟机
概念中的 Java 虚拟机
Source: Java Program in Action——Java 程序的编译、加载与执行 , 莫枢
48. Dalvik VM
• Dalvik architecture is register based
• Optimized to use less space
• Execute its own Dalvik byte code rather than Java
byte code
• Class Library taken from Apache Harmony
– A compatible, independent implementation of the
Java SE 5 JDK under the Apache License v2
– A community-developed modular runtime (VM and
class library) architecture. (deprecated now)
49. Reasons to Choose Dalvik
• Dalvik (Register based) take average 47 % less
executed VM instruction then JVM (Stack based).
• Register code is 25% larger than the corresponding
stack code.
• This increased cost of fetching more VM instructions
due to larger code size involves only 1.07% extra
real machine loads per VM instruction. Which is
negligible.
• Some Marketing Reasons too
– Oracle lawsuit against Google
50. Dalvik ARM CPU
Memory(DDR)
hello.JAVA Write
(Source) back
“Stack” Section Excute
JAVAC (ARM
(Compiler) code) Memory
Reg
“BSS” Section access
Decode excute
hello.class “Data” Section (Number)
DX Decode
(Compiler)
“Text” Section Fetch PC fetch
Hello.dexLoading Excute Interpreter
(Dex)
51. Constant Pool:
References to other classes
Method names
Numerical constants
Class Definition:
Access flags
Class names
Data:
Method code
Info related to methods
Variables
52. Dalvik Architecture
• Register architecture
• 216 available registers
• Instruction set has 218 opcodes
– JVM: 200 opcodes
• 30% fewer instructions, but 35% larger code size
(bytes) compared to JVM
53. Constant Pool
• Dalvik
– Single pool
– dx eliminates some constants by inlining their
values directly into the bytecode
• JVM
– Multiple
54. Primitive Types
• Ambiguous primitive types
– Dalvik
int/float, long/double use the same opcodes
does not distinguish : int/float, long/double, 0/null.
– JVM
Different: JVM is typed
• Null references
– Dalvik
Not specify a null type
Use zero value
55. Object Reference
• Comparison of object references
• Dalvik
– Comparison between two integers
– Comparison of integer and zero
• JVM
– if_acmpeq / if_acmpne
– ifnull / ifnonnull
56. Dalvik
• Storage of primitive types in arrays
• Dalvik
– Ambiguous opcodes
– aget for int/float, aget-wide for long/double
57. Dalvik
• Dalvik uses annotation to store:
– signature
– inner class
– Interface
– Throw statement.
• Dalvik is more compact, average of 30% less
instructions than JVM.
61. Shared constant pool
• Zapper.java
public interface Zapper {
public String zap(String s, Object o);
}
public class Blort implements Zapper {
public String zap(String s, Object o) { … }
}
public class ZapUser {
public void useZap(Zapper z) { z.zap(...); }
}
70. Efficient Interpreter in Android
• There are 3 forms of Dalvik
– dexopt: optimized DEX
– Zygote
– libdvm + JIT
71. Efficient Interpreter: Optimized DEX
• Apply platform-specific optimizations:
– specific bytecode
Common operations like String.length
– vtables for methods
have their own special instruction
– offsets for attributes execute-inline
VM has special code just for those
– method inlining
common operations
• Example: Things like calling the Object’s
constructor - optimized to nothing
because the method is empty
73. • Virtual (non-private, non-constructor, non-static methods)
invoke-virtual <symbolic method name> → invoke-virtual-quick <vtable index>
Before:
invoke-virtual {v0, v1},
Ljava/io/PrintStream;.println:(Ljava/lang/String;)V
After:
+invoke-virtual-quick {v0, v1}, [002c] // vtable #002c
• Can change invoke-virtual to invoke-virtual-quick
– because we know the layout of the v-table
74. DEX Optimizations
• Before being executed by Dalvik, DEX files are optimized.
– Normally it happens before the first execution of code from the DEX file
– Combined with the bytecode verification
– In case of DEX files from APKs, when the application is launched for
the first time.
• Process
– The dexopt process (which is actually a backdoor of Dalvik) loads the
DEX, replaces certain instructions with their optimized counterparts
– Then writes the resulting optimized DEX (ODEX) file into the
/data/dalvik-cache directory
– It is assumed that the optimized DEX file will be executed on the same
VM that optimized it. ODEX files are NOT portable across VMs.
76. Meaning of DEX Optimizations
• Sets byte ordering and structure alignment
• Aligns the member variables to 32-bits / 64-bits
• boundary (the structures in the DEX/ODEX file itself
are 32-bit aligned)
• Significant optimizations because of the elimination
of symbolic field/method lookup at runtime.
• Aid of Just-In-Time compiler
77. Efficient Interpreter: Zygote
is a VM process that starts at system boot time.
• Boot-loader load kernel and start init process.
• Starts Zygote process
• Initializes a Dalvik VM which preloads and pre-
initializes core library classes.
• Keep in an idle state by system and wait for socket
requests.
• Once an application execution request occur, Zygote
forks itself and create new process with pre-loaded
Dalvik VM.
79. Efficient Interpreter:
Just-In-Time Compilation
• Just-in-time compilation (JIT), also known as
dynamic translation, is a technique for improving
the runtime performance of a computer program.
• A hybrid approach, with translation occurring
continuously, as with interpreters, but with caching of
translated code to minimize performance
degradation
80. JIT Types
• When to compile
– install time, launch time, method invoke time, instruction
fetch time
• What to compile
– whole program, shared library, page, method, trace, single
instruction
• Android needs a combination that meet the needs of a mobile
– Minimal additional memory usage
– Coexist with Dalvik’s container-based security model
– Quick delivery of performance boost
– Smooth transition between interpretation & compiled code
81. Android system_server example
Source: Google I/O 2010 - A JIT Compiler for Android's Dalvik VM
• Compiled Code takes up memory - want the benefits of JIT with small memory footprint
• Small amount compilation provides a big benefit
• In test program, 4.5MB of byte code - 8% of methods: 390K was hot; 25% of code in
methods was hot - so 2% in the end
• 90% of time in 10% of the code may be generous
82. Trace JIT
• Trace : String of Instructions
• Minimizing memory usage critical for mobile devices
• Important to deliver performance boost quickly
– User might give up on new app if we wait too long to JIT
• Leave open the possibility of supplementing with method
based JIT
– The two styles can co-exist
– A mobile device looks more like a server when it's
plugged in
– Best of both worlds
• Trace JIT when running on battery
• Method JIT in background while charging
84. Dalvik JIT Overview
• Tight integration with interpreter
– Useful to think of the JIT as an extension of the
interpreter
• Interpreter profiles and triggers trace selection mode
when a potential trace head goes hot
• Trace request is built during interpretation
• Trace requests handed off to compiler thread, which
compiles and optimizes into native code
• Compiled traces chained together in translation
cache
85. Dalvik JIT Features
• Per-process translation caches (sharing only within
security sandboxes)
• Simple traces - generally 1 to 2 basic blocks long
• Local optimizations
– Register promotion
– Load/store elimination
– Redundant null-check elimination
• Loop optimizations
– Simple loop detection
– Invariant code motion
– Induction variable optimization
99. Dexmaker: bytecode generator
http://code.google.com/p/dexmaker/
• A Java-language API for doing compile time or
runtime code generation targeting the Dalvik VM.
Unlike cglib or ASM, this library creates Dalvik .dex
files instead of Java .class files.
• It has a small, close-to-the-metal API. This API
mirrors the Dalvik bytecode specification giving you
tight control over the bytecode emitted.
• Code is generated instruction-by-instruction; you
bring your own abstract syntax tree if you need one.
And since it uses Dalvik's dx tool as a backend, you
get efficient register allocation and regular/wide
instruction selection for free.
100. Reference
• Dalvik VM Internals, Dan Bornstein (2008)
http://sites.google.com/site/io/dalvik-vm-internals
• Analysis of Dalvik Virtual Machine and Class Path Library,
Institute of Management SciencesPeshawar, Pakistan (2009)
http://serg.imsciences.edu.pk
• Reconstructing Dalvik applications, Marc Schonefeld (2009)
• A Study of Android Application Security, William Enck,
Damien Octeau, Patrick McDaniel, and Swarat Chaudhuri (2011)
• dalvik の GC をのぞいてみた , @akachochin (2011)
• 《 Android 惡意代碼分析教程》 , Claud Xiao (2012)
http://code.google.com/p/amatutor/
• XXX