Simple Introduction to Operating System

Check out all my other posts in My Technical Articles

Yu-Ming, CHANG (he/him)
3 min readFeb 5, 2022

What is Operating System

Operating System is the intermediary between software programming and hardware peripherals. It serves as a portal to communicate information in a standardized way from programming to hardware.

Why do we need Operating System

There was no such thing as operating system when computer was first introduced to the world. A programmer back then only need to write code that works in a single computer.

As computer involves, we started to use computer to control other devices, such as a printer. However, since there was no OS, a programmer needed to know how a particular hardware sending and receiving information. This area is part of the domain of firmware. So a programmer needs to understand not only how to write software program to interact between user and computer, but also needs to posses knowledge about how a computer could communicate to hardware devices. It is a tedious task for a programmer. Besides, a programmer usually does not have access to all the models in the market to test their code; hence, the only thing that a programmer could do is to write a program that works on a few selected devices. When that program is shared, they could only pray the program won’t break. This method, as you could imagine, did not work out.

Operating System was implemented to make programmers’ life easier. It serves an intermediary between software program and hardware peripherals. To be more specifically, OS provides software abstraction, through APIs, called device drivers. This allows programmers to talk to common input and output hardware, or I/O management.

In short, OS standardize the way for programmers to talk to various hardware peripherals.

What are some of the common features of Operating System

  1. I/O Management: as the story we mentioned in the last section
  2. Multitasking: as computer getting faster, there was too much idle time for computer to wait for hardware peripherals to complete their tasks. Hence, OS is also capable to put waiting programs to sleep, and to execute next ready-to-run program so that we maximize utilization of a computer.
  3. Memory Management: to achieve multitasking, we need to allocate memory to each running program. Also, if a program crashes, it only crashes in its allocated section with no impact to other programs. Such limits restricts a program to access the memory it shouldn’t touch. It is called memory protection. Moreover, the physical location of allocated memory is not necessarily in consecutive space. It often creates confusion for programmers without memory knowledge. To improve a better communication, OS provides another abstraction for memory, called virtual memory, that will display a consecutive memory space to programmers. One must keep in mind that virtual memory does not alter how physical memory is allocated. Virtual memory just display an abstract information to user so it seems the allocated memory are consecutive.
  4. Time-sharing: OS can not only run multiple programs at a time, it could also accept multiple users through the help of memory management: a user could only access a portion of allocated memory and not the rest.

Future series

I will write more OS articles below. Stay tuned!

--

--

Yu-Ming, CHANG (he/him)

I enjoy the positive mind flow when writing code to solve a problem. This is my journey to become a software developer, though now working as a product owner