General – Jacob N Calvert https://jacobncalvert.com/blog-archive Fri, 22 May 2020 13:27:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.0.17 https://jacobncalvert.com/blog-archive/wp-content/uploads/2018/02/cropped-icon-32x32.png General – Jacob N Calvert https://jacobncalvert.com/blog-archive 32 32 Calculus Made Simple https://jacobncalvert.com/blog-archive/2020/05/22/calculus-made-simple/ https://jacobncalvert.com/blog-archive/2020/05/22/calculus-made-simple/#comments Fri, 22 May 2020 13:27:38 +0000 https://jacobncalvert.com/?p=699 To many, integral and differential calculus may as well be a foreign language from an alien planet. Many people don’t grasp the fundamental concepts which drive the calculus, and consequently fail to derive the value they otherwise could from that knowledge. I’ve always found the key to making use of some bit of knowledge is to internalize it, to restate the concepts in terms that are familiar and comfortable to you, but to compare this restatement and internalization to the…

The post Calculus Made Simple appeared first on Jacob N Calvert.

]]>
To many, integral and differential calculus may as well be a foreign language from an alien planet. Many people don’t grasp the fundamental concepts which drive the calculus, and consequently fail to derive the value they otherwise could from that knowledge. I’ve always found the key to making use of some bit of knowledge is to internalize it, to restate the concepts in terms that are familiar and comfortable to you, but to compare this restatement and internalization to the textbooks, data, etc. to make sure sure you’ve truly grasped the concept.

I’ll give an example of what I mean by “internalize and restate it”.

To understand orbital motion (things like planets, moons, satellites), the mathematics to get a precise understanding of the shape and speed of an object in motion (Kepler’s First and Second Laws) can be fairly intimidating. For me, the breakthrough in highschool Physics class was comparing the speed and motion of an orbiting body to paddle ball toy. If you sling the ball part of a paddle ball toy while fixing the paddle part flat on a table, the elastic in the string will cause the ball to move slower the further away from the paddle it gets, and as it returns the elastic causes it to move faster.

Now this example doesn’t compare apples to apples because the elastic force in my example and gravitational forces in the physical world mathematically do not work the same way, but it’s an easy way to visualize the concept. PS: for a neat visualization with computer graphics, see here.

Back to the calculus now: I have found a book from the early 1910s called Calculus Made Easy, by Silvanus Thompson. Thompson’s approach to demystifying the concepts in basic calculus are the most straightforward I’ve ever read. He uses simple, relatable concepts to help the reader internalize and restate the problems in a domain that most have a keen understanding of, and as a result, the concepts become much less scary and much more useful! This book is freely available online as a PDF from Project Gutenbergm and a dedicated website. Both linked below for convenience.

Whether you’re learning calculus for the first time, need a basic refresher, or just want to reinforce your understanding of the concepts, I highly recommend giving it a look.

Project Gutenberg Link

Website Link

The post Calculus Made Simple appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2020/05/22/calculus-made-simple/feed/ 2
Kernel Design: Microkernel vs. Monolithic https://jacobncalvert.com/blog-archive/2020/05/19/kernel-design-microkernel-vs-monolithic/ https://jacobncalvert.com/blog-archive/2020/05/19/kernel-design-microkernel-vs-monolithic/#comments Tue, 19 May 2020 22:41:39 +0000 https://jacobncalvert.com/?p=683 Motivation This hotly debated topic has been around for decades, and it is just as alive today as it was 28 years ago. The truth is, there are fundamental differences in the theory which drives the design of a monolithic kernel versus a microkernel. In this post, I will extrapolate from my knowledge of various kernel designs to explore what these two primary types are, what their features, benefits, drawbacks and implications may be. I’ll also briefly explore the extension…

The post Kernel Design: Microkernel vs. Monolithic appeared first on Jacob N Calvert.

]]>
Motivation

This hotly debated topic has been around for decades, and it is just as alive today as it was 28 years ago. The truth is, there are fundamental differences in the theory which drives the design of a monolithic kernel versus a microkernel. In this post, I will extrapolate from my knowledge of various kernel designs to explore what these two primary types are, what their features, benefits, drawbacks and implications may be. I’ll also briefly explore the extension of the theories that drive these designs into “fringe” types of kernels (such as a nanokernel).

Key Concepts

Before hopping into the discussion about the differences between these two kernel archetypes, I need to lay out some key concepts which will help bound the discussion.

Userspace vs. Kernelspace

Broadly, userspace is considered to be “outside” of the kernel. Kernelspace is “inside.” The way this is typically implemented is through the use of multiple address spaces, aided by the hardware (MMU, MPU). This usually results in all userspace applications having believing they have the whole address space to themselves, while in reality the MMU is remapping some Virtual Addresses (VAs) to the real Physical Addresses (PAs). Actions in userspace cannot (well, SHOULD not) perturb the operation of the core kernel. Contrast this to kernelspace, wherein any part of the kernel is available to poke and tinker with from code running in this space.

This separation of spaces may also use other hardware features (Rings in x86-land, Exception Levels in ARM) to further represent the distinction and privilege of code running in each space.

Examples of userspace are your typical Linux application.

Examples of kernelspace are a Linux .ko kernel module.

Kernel-User Boundary

This boundary is the line which separates the userspace and kernelspace. Crossing this boundary involves a change in privilege level, and is often accomplished by invoking a system call. Why and when we cross this boundary is a key point of interest in the discussion of kernel design since it is usually an expensive operation.

Essential Operating System Functions

For the purpose of this discussion, I consider the following to be essential to any OS for it to be of any use.

  • Memory Management
    • Addresses needs of the kernel to map/unmap/remap Virtual Memories to Physical ones
  • Task/Process Management
    • Addresses needs of the kernel to handle multi-tasking
  • Inter-process Communication (IPC)
    • Addresses needs of kernel and applications to communicate via a common interface
  • Device Drivers
    • Addresses needs of applications to communicate with the outside world
  • Filesystems
    • Addresses needs of application and kernel to store/retrieve data via a common interface

Monolithic Kernels

Monolithic kernels and the essential properties which make it monolithic can be succinctly summed up in the following phrase:

Everything except the application exists in kernelspace.

In a monolithic kernel, all the essential components, and many other accessory components, live in kernelspace.

Figure 1. Monolithic Kernel

The design choice to bring all these functions and services into the kernelspace has several benefits, drawbacks, and implications.

Benefits

Since all the code that directly interacts with devices live in the same address space, moving data around is an inexpensive operation. Much of what happens in a system falls into this category, so you end up with a relatively speedy and snappy kernel implementation. For example, if two network devices are being bridged to transmit data from one network to another, and the network stacks and device drivers live in kernelspace, this operation can occur without any context change, saving time and increasing throughput.

Another benefit is that the userspace applications have a rich set of services which has a consistent interface available (usually the system call interface). This allows rich applications to be developed using a standard scheme.

Drawbacks

The same feature which is a benefit to monolithic kernels enabling speedy execution of kernelspace work, also is a drawback in some scenarios. If anything in kernelspace fails, it can potentially impact all of kernelspace. This is often addressed by having hardware enforced protections of kernelspace tasks as well as userspace tasks, which in many instances, ameliorates this issue.

Another drawback is that monolithic kernels must be updated atomically. They are typically tightly coupled and updates can be difficult to introduce.

Implications

If speed is a primary concern, monolithic kernels are good choices.

Microkernels

Microkernels are the minimalist brother to monolithic kernels. The essence of the microkernel can be summed up as:

Only the bare minimum to operate the kernel lives in kernelspace.

Nothing besides the minimal set of operations to consider the kernel operational resides in kernelspace in a microkernel. Many resources say this set is:

  • Memory Management
  • Process Management
  • IPC

I like to add one more to the list because I feel it is a critical resource in a real system: Interrupt Management. Either way, it is easily seen that the microkernel contains fewer components running in kernelspace, hence the “micro” name.

Figure 2. Microkernel

The services that were once part of the kernelspace in the monolithic design are now run as “servers” in the userspace. These servers interact with the applications and the other servers via IPC, which is facilitated by the kernel. This of course has benefits, drawbacks and implications as well.

Benefits

One obvious benefit over the monolithic kernel is that the servers can be taken online/offline independently of the kernel and a failure in one does not induce a system-wide failure necessarily.

Drawbacks

Similarly to the monolithic kernel, the primary benefit to a microkernel also has a drawback associated. Because each server runs in userspace and relies on IPC as a primary mechanism of communications, constant context switching into and out of kernel mode means microkernels are typically slower than their monolithic counterparts.

Another drawback is that not all expected services are going to be available on a microkernel since they are effectively decoupled from kernel execution.

Implications

If service independence is most important, a microkernel is a good choice.

Key Takeaways

There are some aspects of the two primary kernel types I didn’t dig into, and I want to address them specifically below.

Security

There is a strong case for both monolithic and microkernels in the security perspective. In this realm, the truth is that both designs have strengths and weaknesses, and the kernel’s design is only one aspect of the security posture of the system.

Safety

Like security, safety has a place in both micro and monolithic kernels. The safety of each relies more on the implementation and usage of the particular kernel rather than its design.

Absoluteness of Design

In today’s software architectures, we regularly see hybrids of these two concepts where we can meld the benefits of each in a blended fashion. This is a bit of a hot topic because when the lines are blurred it is harder to define what falls into each category. For examples of hybridization, see this article.

Extension of the Concepts

By taking the concepts which drive the monolithic and particularly the microkernel design to extremes, we see some interesting outcomes. Take for instance the nanokernel. This is the extreme version of a microkernel, where additional services may not be available and the application must provide this all itself. This is tending towards being simply a hypervisor however, and may not be a microkernel at all. Another example is the exokernel where the hardware resources are basically un-abstracted completely, so the application must make all these decisions. Of note regarding exokernels, is that they have yet to be developed into a commercial-grade offering as of now, and are primarily a research concept.

The post Kernel Design: Microkernel vs. Monolithic appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2020/05/19/kernel-design-microkernel-vs-monolithic/feed/ 1
Turning my Hallway Closet into a Drop Zone: Gallery https://jacobncalvert.com/blog-archive/2019/12/21/turning-my-hallway-closet-into-a-drop-zone/ https://jacobncalvert.com/blog-archive/2019/12/21/turning-my-hallway-closet-into-a-drop-zone/#respond Sat, 21 Dec 2019 17:41:55 +0000 https://jacobncalvert.com/?p=543 Genesis of a Project In our new house, we had a hallways closet that was massive. It was very deep, and fairly wide, but had low overhead, due to the stairs passing above it. My wife had the brilliant idea to turn this into a dropzone for shoes, parcels, mail, etc. She took to Pinterest to gather ideas, and I turned it into a weekend project. The Project Plan Regrettably, I didn’t capture all the “design” pieces, and only have…

The post Turning my Hallway Closet into a Drop Zone: Gallery appeared first on Jacob N Calvert.

]]>
Genesis of a Project

In our new house, we had a hallways closet that was massive. It was very deep, and fairly wide, but had low overhead, due to the stairs passing above it. My wife had the brilliant idea to turn this into a dropzone for shoes, parcels, mail, etc. She took to Pinterest to gather ideas, and I turned it into a weekend project.

The Project Plan

Regrettably, I didn’t capture all the “design” pieces, and only have a picture of my materials list. You can get an idea of what went into the design though. I measured the space, and used good old pencil, paper, and a ruler to draw a scale-sized picture of what I wanted to build. I then got buyoff from the wife, of course.

The Final Product

We wanted the walls to be beadboard, painted white, with shelves under a benchtop, and hooks all around the top to hang things. Check out the gallery below for a step-by-step on producing this. I think it turned out quite well!

The post Turning my Hallway Closet into a Drop Zone: Gallery appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2019/12/21/turning-my-hallway-closet-into-a-drop-zone/feed/ 0
Pickin’ On Series https://jacobncalvert.com/blog-archive/2018/08/17/pickin-on-series/ https://jacobncalvert.com/blog-archive/2018/08/17/pickin-on-series/#respond Fri, 17 Aug 2018 19:14:52 +0000 https://jacobncalvert.com/?p=295 I was poking around YouTube and found a great channel and project, you should check them out!   The Pickin’ On channel is filled to the brim with great acoustic bluegrass interpretations of some of the best songs around. From Nirvana, to The Guess Who, to Lynyrd Skynard, they’ve done it all! Check out one of my faves:  

The post Pickin’ On Series appeared first on Jacob N Calvert.

]]>
I was poking around YouTube and found a great channel and project, you should check them out!

 

The Pickin’ On channel is filled to the brim with great acoustic bluegrass interpretations of some of the best songs around. From Nirvana, to The Guess Who, to Lynyrd Skynard, they’ve done it all!

Check out one of my faves:

 

The post Pickin’ On Series appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2018/08/17/pickin-on-series/feed/ 0
Happy Independence Day! https://jacobncalvert.com/blog-archive/2018/07/04/happy-independence-day/ https://jacobncalvert.com/blog-archive/2018/07/04/happy-independence-day/#respond Wed, 04 Jul 2018 15:58:59 +0000 https://jacobncalvert.com/?p=288 Happy Independence Day USA! I hope everyone enjoys their day off, but pauses to remember those who have served and do serve to keep our country safe daily. Thank you to our military, police, fire, emergency, and medical staffers work tirelessly in service to their fellow Americans.  

The post Happy Independence Day! appeared first on Jacob N Calvert.

]]>
Happy Independence Day USA!

Happy Independence Day!!

Happy Independence Day!!

I hope everyone enjoys their day off, but pauses to remember those who have served and do serve to keep our country safe daily. Thank you to our military, police, fire, emergency, and medical staffers work tirelessly in service to their fellow Americans.

 

The post Happy Independence Day! appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2018/07/04/happy-independence-day/feed/ 0
I’m back! https://jacobncalvert.com/blog-archive/2018/02/10/im-back/ https://jacobncalvert.com/blog-archive/2018/02/10/im-back/#respond Sat, 10 Feb 2018 16:17:58 +0000 https://jacobncalvert.com/?p=45 The server was down for about 24 hours while I performed some hardware and software upgrades. I’ll be bringing all of my blog entries back as soon as I can get the SQL imported! For the nerdy and techies who wonder: Hardware Upgrades 512MB RAM to 1GB Single Core 32bit to single core 64bit Software Upgrades Debian 7 to Debian 9 Installation of security (super secret stuff!) software to mitigate the endless torrent of hacking attempts PHP5.4 to PHP7.x  …

The post I’m back! appeared first on Jacob N Calvert.

]]>
The server was down for about 24 hours while I performed some hardware and software upgrades. I’ll be bringing all of my blog entries back as soon as I can get the SQL imported! For the nerdy and techies who wonder:

Hardware Upgrades

  • 512MB RAM to 1GB
  • Single Core 32bit to single core 64bit

Software Upgrades

  • Debian 7 to Debian 9
  • Installation of security (super secret stuff!) software to mitigate the endless torrent of hacking attempts
  • PHP5.4 to PHP7.x

 

 

The post I’m back! appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2018/02/10/im-back/feed/ 0
It’s been a while again! https://jacobncalvert.com/blog-archive/2016/04/16/its-been-a-while-again/ https://jacobncalvert.com/blog-archive/2016/04/16/its-been-a-while-again/#respond Sat, 16 Apr 2016 15:44:36 +0000 http://jacobncalvert.com/?p=100 I have been very busy with Capstone Design again this semester so I’ve not had any time to myself. However, I have quite a lot to write about! School I am wrapping up my final few classes and getting ready for graduation! This semester I have taken several rather applicable classes to my upcoming work situation. My favorite class has absolutely been Embedded Systems. This class goes from the question What is an embedded system? through What are the considerations when designing an embedded…

The post It’s been a while again! appeared first on Jacob N Calvert.

]]>
I have been very busy with Capstone Design again this semester so I’ve not had any time to myself. However, I have quite a lot to write about!

School

I am wrapping up my final few classes and getting ready for graduation! This semester I have taken several rather applicable classes to my upcoming work situation. My favorite class has absolutely been Embedded Systems. This class goes from the question What is an embedded system? through What are the considerations when designing an embedded system? all the way to considering individual pieces of embedded systems: peripherals, memory architectures, processor types, and more. This class has piqued my interest in RTOS’s and I will definitely be researching that more as I find time.
I also have been taking a PLCs class, as well a class title Numerical Linear Algebra. That class is all about the algorithms that popular Algebraic systems (like MATLAB) use to solve or approximate the answer to all kinds of problems. 

Other Stuff

All my recent work has been wrapped up in Capstone Design recently. I do however have a post to write (I will post immediately after this one) about how I trained color sensors to recognize discrete colors based on RGB and Clear value feedback.
Thanks for reading!

The post It’s been a while again! appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2016/04/16/its-been-a-while-again/feed/ 0
It’s Been a While! https://jacobncalvert.com/blog-archive/2015/12/18/its-been-a-while/ https://jacobncalvert.com/blog-archive/2015/12/18/its-been-a-while/#respond Fri, 18 Dec 2015 15:28:47 +0000 http://jacobncalvert.com/?p=102 I’ve not posted in a few months, mainly because I’ve been extremely busy! Here’s what I’ve been up to recently. School I just finished up the semester and finals were rough, but I came out with great success. I really enjoyed a few of my classes. Namely, Computer Architecture, where I studied how the MIPS32 ISA was designed, and then implemented several hardware versions of it. The second best class was Digital Systems Design where I was introduced to VHDL and was able…

The post It’s Been a While! appeared first on Jacob N Calvert.

]]>
I’ve not posted in a few months, mainly because I’ve been extremely busy! Here’s what I’ve been up to recently.

School

I just finished up the semester and finals were rough, but I came out with great success. I really enjoyed a few of my classes. Namely, Computer Architecture, where I studied how the MIPS32 ISA was designed, and then implemented several hardware versions of it. The second best class was Digital Systems Design where I was introduced to VHDL and was able to, with a lab partner, design and implement a 16 microcontroller, with assembly language, assembler, linker, and loader! That was a very good learning experience. The best class though, and most definitely the most difficult was a mathematics class. Boundary Value Problems was all about partial differential equations which model basically every physical process we can measure. The heat, wave, LaPlace, and other conservation equations and methods to solutions were discussed in this class. It really opened my eyes to a new way of viewing physical processes such as the vibration of a rectangular membrane, or an in-compressible fluid traveling in a pipe where there is wall-friction in the inner walls.

Other Stuff

Last night, I modified an old ATX power supply to work as a desktop bench power supply. I basically opened the unit up, removed wiring I did not need, and routed out the wire I did need. Then I ran to a local RadioShack and bought a few things:

  • LEDs with mounting hardware
  • Switch (SPST)
  • Project box
  • 12 pin connector (male and female)
  • Small pack of resistors
  • 6 binding posts

I drilled all the necessary holes for the LED indicator, switch, binding posts and connector, and soldered/wired the project box components. I wired the mate to the connector on the ATX power supply end and *boom* I have a desktop power supply on the cheap. It generated +12v, -12v, +5v, -5v, +3.3v and GND nodes for use. Check out the pics below!

 

The post It’s Been a While! appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2015/12/18/its-been-a-while/feed/ 0
Autonomy is Cool… and Hard! https://jacobncalvert.com/blog-archive/2015/09/14/autonomy-is-cool-and-hard/ https://jacobncalvert.com/blog-archive/2015/09/14/autonomy-is-cool-and-hard/#respond Mon, 14 Sep 2015 15:52:40 +0000 http://jacobncalvert.com/?p=106 Beginning in the last week of August, I joined The University of Alabama’s IEEE Autonomous Robotics Senior Design Team for 2016. I am the System Architecture and Integration Lead. UA has sent fiercely competitive teams to this competition for the past several years, though none have won. This year’s team is staffed with motivated, driven individuals and we are attempting to bring home first place for UA for the first time. I have linked the official competition rules below. IEEE…

The post Autonomy is Cool… and Hard! appeared first on Jacob N Calvert.

]]>
Beginning in the last week of August, I joined The University of Alabama’s IEEE Autonomous Robotics Senior Design Team for 2016. I am the System Architecture and Integration Lead. UA has sent fiercely competitive teams to this competition for the past several years, though none have won. This year’s team is staffed with motivated, driven individuals and we are attempting to bring home first place for UA for the first time.
I have linked the official competition rules below.
IEEE Hardware Competition 2016

 

The post Autonomy is Cool… and Hard! appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2015/09/14/autonomy-is-cool-and-hard/feed/ 0
NSA Playset https://jacobncalvert.com/blog-archive/2015/08/12/nsa-playset/ https://jacobncalvert.com/blog-archive/2015/08/12/nsa-playset/#respond Wed, 12 Aug 2015 20:41:11 +0000 http://jacobncalvert.com/?p=108 Today an article ran on ArsTechnica which caught my eye. It’s titled The NSA Playset: Espionage tools for the rest of us and talks about the creation of a collection of NSA-ANT-like devices for doing… NSA-like things. One device — a deceptively simple device — caught my attention. It is called the CONGAFLOCK. This single transistor RF reflector can be implanted into anything that transmits data via wires. The resultant device can be hit with a continuous wave at the frequency of the bug’s…

The post NSA Playset appeared first on Jacob N Calvert.

]]>
Today an article ran on ArsTechnica which caught my eye. It’s titled The NSA Playset: Espionage tools for the rest of us and talks about the creation of a collection of NSA-ANT-like devices for doing… NSA-like things. One device — a deceptively simple device — caught my attention. It is called the CONGAFLOCK. This single transistor RF reflector can be implanted into anything that transmits data via wires. The resultant device can be hit with a continuous wave at the frequency of the bug’s antennae, and the received reflectivity can be AM demodulated to recover the signal! I find this simplicity both amazing, and disturbing. A link to the device specifications (what to and how to build it) is below!
CONGAFLOCK RF retroreflector

 

The post NSA Playset appeared first on Jacob N Calvert.

]]>
https://jacobncalvert.com/blog-archive/2015/08/12/nsa-playset/feed/ 0