Introduction to Operating System for self taught web developer

Written by oluwaseunOmoya | Published 2018/01/06
Tech Story Tags: docker | linux | operating-systems | windows | android

TLDRvia the TL;DR App

Operating system is a core topic in computer science and it is one of those topics every software developer must have a basic understanding of it works. Unfortunately in the world of JavaScript it is not a thing to worry about hence why most self taught web developer forget to learn it. In this article, I will explain some basic concepts of Operating system.

Structure

photo credit: http://minnie.tuhs.org

The OS is divided into different layers of abstraction. Hardware, Kernel Mode and User Mode. Each layers hides it’s own complexities and export API to the layer above.

The hardware as you know is the physical parts or components of a computer, such as the monitor, keyboard, computer data storage, graphic card, sound card and motherboard.

Kernel Mode

This is the layer where the OS works, also known as the Privileged Mode. It’s hides the hardware details from your applications. Code and access to operations at the kernel layer are restricted from user application, this is to enable coordination and allow the OS to manage the computer resources effectively. Any attempt by the user application to illegally cross directly into the kernel causes a trappable exception to be thrown. Most drivers runs in the kernel mode.

OS provides API for user applications to request services in the kernel, such requests are called System Calls. In Linux includes:

  • fork() — use for creating new child processes
  • execve() — executes the program pointed to by filename
  • open() — opens the file specified by pathname.
  • read() — read from a file descriptor
  • write() — write to a file descriptor

User Mode

The user mode as the name imply, is where all your user applications runs, your JavaScript programs. Your applications runs as a process.

A process is an instance of executing program

Each process has a virtual address space that is private, the virtual address contains the stack, heap, text and all of your application states. A process only have access to it’s own virtual address and cannot access that of others. This allow each application to run in isolation so that a crash in one application does not affect other applications.

Conclusion

Operating system is a voluminous topic but the knowledge is worth it for those who didn’t study Computer Science.

This was just a brief introduction to operating system, for a deeper understanding I will advice you take this course on Udacity. — Introduction to Operating System


Published by HackerNoon on 2018/01/06