Brief Introduction to Computer System Architecture

App Inventor is a “high level” programming language. That means we create programs without having to know about the underlying operating system or hardware components of our device. The software engineers that create operating system software are “low level” programmers who must be familiar with the details of the hardware.

To understand the SPECTRE and MELTDOWN exploits, we need to have a basic understanding of computer systems – particularly the CPU or processor – and how it operates.

This video is a high level, simplified introduction to the basic elements of a computer system. I emphasize “simplified”! I have an Intel processor manual from a couple of years ago that has over 3,400 pages!

A future video will look at how high level programs are converted into “machine instructions” that are processed by the CPU. After that, we will look at how SPECTRE works to read memory that should be protected.

Be sure to Click Subscribe on Youtube!

In the above video, I did not define “RAM” memory and what it means. RAM means “Random Access Memory”. A typical modern PC has 8 to 16 gigabytes of RAM memory. Many smart phones have 4 to 6 gigabytes of RAM memory. While both RAM and FLASH are types of memory, they are not the same thing.

This short video introduces types of memory used in computers, smart phones and electronic devices including ROM, PROM, EPROM, EEPROM, FLASH, RAM (both DRAM and SRAM), and a brief history of the now very old “magnetic core” memory.

The major difference between ROM, PROM, EPROM, EEPROM/FLASH is that these memories retain their stored values even if power is turned off.

RAM memory, however, loses its content if power is turned off. Some times a battery backup unit is attached to RAM to keep the memory “alive” even if the overall system power is turned off. RAM memory is otherwise fast to use and has become remarkably inexpensive.

“DRAM” means “dynamic RAM” and “SRAM” means “static RAM”.

Most of our devices use DRAM because it is cheaper and each bit takes up less circuit space (than SRAM) so more memory can be packed into a smaller space. The reason it is called “dynamic” RAM is because the memory must be continuously refreshed. Each bit is stored as a tiny capacitive charge. Because the charge slowly bleeds off, the charge must be periodically refreshed – if not, the values stored in memory will gradually fade away (so to speak).

A special circuit continuously reads and then rewrites each bit so that the charge stored at each bit location is refreshed and does not fade away.

 

Intel updates performance impact of SPECTRE and MELTDOWN fixes

Intel is continuing to measure and evaluate the performance impact of their own firmware changes to address the SPECTRE and MELTDOWN exploits. Click on the chart to view the results in full size.

The chart shows Intel’s measurements for certain 6th, 7th and 8th generation Intel processors. The measurements are made using standard “benchmarket” tests that simulate specific usage scenarios. Consequently, these are measurements of performance impacts to these benchmark tests, which may not represent how we use our own computers.

Source: Intel Security Issue Update: Initial Performance Data Results for Client Systems

Separately, Google says they managed to upgrade their cloud servers with their own fixes that had negligible impacts.

While AMD processors appear to not be impacted by the MELTDOWN exploit, AMD did announce that one of the variants of SPECTRE does impact the AMD processors.

This suggests that over the weeks and months to come, future updates may appear that fix new variations of the exploits but also improve performance as better solutions are identified.

The SPECTRE and MELTDOWN research papers

Here is some additional background information about how the SPECTRE and MELTDOWN exploits were discovered, plus a link to the research papers that describe the exploits in detail. The news media inappropriately, albeit understandably, referred to these as “Intel CPU” bugs or defects but they are not specific to Intel nor are they defects.

The exploits take advantage of a basic feature of pipelined architecture CPUs, which is all  high end CPUs now. You can read the research papers that explain the problem in detail at https://spectreattack.com/. Members of Google’s Project Zero Group found the problem; they are continuously doing research seeking new security vulnerabilities. Read their papers if interested in the super details of these security exploits.

The exploit is due to pipelined architecture and speculative and out of order execution, items that have been incorporated into personal computer CPUs for over two decades, to improve performance (make programs run faster).

Understanding the SPECTRE and MELTDOWN papers, at the link, does require an understanding of system and processor architecture.This is a very technical subject and we would not expect most new App Inventor programmers to understand such topics! That said, computer architecture is a fascinating subject if you wish to dive in at some point.

In a future video I hope to introduce computer and processor architecture to help you  understand the issues to see how this problem evolved – and how the exploit is not very obvious either.

I do think this is a big deal for server farms, but, after patches to OS, apps and firmware, probably not a huge deal to most of us running our personal computers.

Many videos demonstrating benchmark performance before and after patching have been posted on Youtube. I just watched one that tested before and then after installing both  Intel firmware patches and the Windows 10 updates and they found negligible performance change across a broad set of benchmarks – except for one test of 4K READ blocks from SSD disk (I think it was).

My current view is most of us will not see noticeable changes but that there are some scenarios, and specifically some server scenarios that may see significant performance issues. As with any other security vulnerability that is discovered, it is important to keep current with software updates, including Android, iOS, Windows, Linux and Mac OS X, plus app updates and so forth.

New drone quadcopter programmable using Scratch #AppInventor #STEM #Drones #CES2018

The ability to code is an important part of literacy and will enable kids to learn about creative problem solving and how to communicate their ideas. Engineers at Ryze have made Tello programmable with Scratch, an MIT-developed coding system that allows kids and teens to learn the basics of programming. Kids can program their Tello to string multiple flips into a single command or create their own flight patterns using MIT Media Lab’s easy-to-use block-based coding interface called Scratch.

Source: Ryze and DJI team to create Tello $99 drone – sUAS News – The Business of Drones

The Scratch programming system came before App Inventor and inspired the “blocks” programming model used in App Inventor.

The “Intel CPU” Exploit – does it affect App Inventor apps? #SPECTRE #MELTDOWN

Yes, but Android has already been updated to deal with it.

What is the “Intel CPU” Exploit? Well, its not just Intel, as first described. The SPECTRE exploit works on processors from many vendors. The MELTDOWN exploit might mostly impact Intel processor (but could affect some others).

What are these exploits and what do they do?

This first video is a high level overview. I hope to add another video going into more details – which means explaining a bit about what goes on inside your computer or smart phone processor and computing system.

There is a typo in a title in the slide set – about half way through the video the title says “What do this exploits actually do?” and of course, that should say, “”What do these exploits actually do?”

Ignore the type “doe” in the FB link below – that’s been fixed on the web site! But the typo in this tittle, in the middle of the video should say “What do THESE exploits actually do?

MIT App Inventor team still needs donations to make iOS/iPhone App Inventor happen!

The MIT App Inventor team still needs donations by 31 December 2017 to make the iOS version of MIT App Inventor for iPhone and iPad a reality!

They are just under half way to their fundraising goal. If you have been thinking about contributing a donation – but got busy and forgot to follow up – now would be a great time to help them out!

Their crowdfunding donation web page is here.

Here’s the text of the letter the MIT Team emailed to supporters:

“We’re proud of the reach of MIT App Inventor—more than 6 million users worldwide—and we’re grateful for everyone who’s tried us out. Some users have really gotten to know our system, constantly testing its limits, teaching other users, and helping us improve. It’s been amazing to see what you can do.

We’re so thankful for your help, and today we’re hoping that you might be willing to help us out in a different way. As you know, there’s been an incredible demand to release App Inventor for iOS—and we’re doing it now. To help cover the cost of developing App Inventor for iOS—which includes salary and benefits for two full-time employees—we’re hoping to raise $100,000 through a crowdfunding campaign that runs through December 31st.

As one of our users, we would love it if you were willing to be an ambassador for this campaign: share it through friends and colleagues by email or social media. It’s easy to do, and only takes a few minutes. If you’re interested, just reply to this email, and we can sign you up with a custom, shareable link to spread the message about our campaign.

MIT App Inventor remains, and will always be, free to use—we promise. Central to our mission is the idea that everyone should be able to learn to code, no matter their background. If you’re able, we hope you can help us make App Inventor available to even more people, across platforms, by sharing our campaign.

Give Now

Or, if you prefer to give by Paypal, donate here.

Hal Abelson and the MIT App Inventor Team”

 

Disclaimer I have no connection to MIT or the MIT App Inventor team. I am just a enthusiastic software expert that thinks MIT App Inventor is a tremendous advancement in software development!

App Inventor to run on iPhones? Yes. How about Windows and Mac OS X? #AppInventor #Stem

MIT has announced that App Inventor will run on iPhones and iPads, hopefully by spring of 2018. You can help make that happen by making a donation to their effort – go to http://appinventor.mit.edu and follow the links to make a donation!

Did you know that you can run App Inventor Android apps on Windows and Mac OS X? Sure can!

All you need is to install an Android simulator for Windows or Mac and then install your App Inventor .apk app into the simulator. This way you can run your apps on Windows or Mac!

This short video shows you how to do that – take a look!

 

There are several Android simulators for both Windows and Mac OS X.

This video demonstrates using BlueStacks for Windows (also available for Mac OS X) and Nox App Player for Mac OS X.

Can you create an MIT App Inventor app without a computer? YES

Several people have asked me if it is possible to create an Android app without using a computer. Yes, it is possible!

All you need do is access appinventor.mit.edu in the web browser on your Android device. App Inventor works the same as it does on a computer.

You’ll need to go in to Android Settings | Security and check the option to allow installation of apps from Unknown Sources.

Then, in the App Inventor web interface, you will use Build | App (save .apk to my computer). The app will be “compiled” (translated into an executable program file for Android known as an “apk” file – short for Android package) and then downloaded to your computer.

The download part will vary depending on what browser you are using as well as what version of Android you have. You might find the download icon (a down arrow) in the notification bar. Swype down from the top and then select the downloaded file, open it and select Install to install your app. Once installed, you can run the app directly – or the app will appear in the list of apps installed on your device and you can run it directly from the app list. The exact way this all happens will vary depending on your system and browser.

The following video tutorial shows I how I did this on Android using the Opera browser. Note that I used a Bluetooth keyboard and a Bluetooth mouse – so the screen looks like I am using a computer because I am not touching anything!

 

MIT App Inventor team receives Distinguished Leadership Award from the Mass Technology Leadership Council

The MIT App Inventor team accepted the Council’s Distinguished Leadership Award for working to make application development universally accessible.

Source: Wayfair CEO Niraj Shah, athenahealth, and Toast Take Top Honors at 20th Annual Mass Technology Leadership Awards

Congratulations to the team! Well done! Well deserved!

Appy Builder: Using the BatteryStatus component #AppInventor #AppyBuilder #STEM #Programming

A reader asked if there is a way to determine the status of the Android device battery in MIT App Inventor. Unfortunately, App Inventor does not provide a way to check the battery status … but Appy Builder does!

To answer that question, our first Appy Builder app is a simple tutorial showing how to use the BatteryStatus component in Appy Builder.

User Interface

The output is displayed after pressing the Start button and shows that my phone’s battery is at 99% and was plugged in to the AC power charger.

In this screen shot, the phone was unplugged from the battery charger and the “plugged in” status has changed to UNKNOWN.

Designer View

I created this screen by adding a Button control, and then adding six HorizontalLayouts. Inside each layout, I dragged two Label controls, setting one to the descriptive text (such as “Battery level:” and the second to be used to display the status for that property).

Blocks View

The BatteryManager has several properties that describe aspects of the battery.

Before the properties may be used you must activate the BatteryManager by setting the .StartMonitoring property to true; this must be done separately as shown below. Errors occurred when I put that code inside the button’s .Click handler. Instead, I moved the StartMonitoring assignment to the Screen1.Initialize event handler and everything worked fine.

  • BatteryLevel – the battery’s current level in percent
  • BatteryTemperature – the temperature of the battery in degrees Celsius
  • BatteryPresent – true (my phone does not permit me to remove the battery)
  • BatteryPlugged – returns “AC” if the device is connected to a charger, or UNKNOWN if the device is not plugged in. This might also return “WIRELESS” if the device is currently using a wireless charger (based on Android BatteryManager API).
  • BatteryVoltage – battery voltage. A typically value will be near 4 volts plus or minus for most phones.
  • BatteryHealth – GOOD. I presume this returns a value corresponding to the Android BatteryManager API, which includes COLD, DEAD, GOOD, OVERHEAT, OVER_VOLTAGE, UNKNOWN and UNSPECIFIED_FAILURE.

Download Source

Right-click (or Ctrl-click on Mac OS X) and use your browser’s feature to save this file to your computer: BatteryStatus.aia

Then, use Projects | Import selected project (.aia) from my computer … to load the file into Appy Builder

The quick and easy way to write Android Apps

%d bloggers like this: