What is an operating system?
An operating system (OS) is the program that, after being initially loaded into the computer by a boot program, organizes all of the other application programs in a computer. The application programs use the operating system by requesting services through a specified application program interface (API).
Your computer’s operating system (OS) manages all of the software and hardware on the computer. Most of the time, several different computer programs run simultaneously, and they all need to access your computer’s central processing unit (CPU), memory, and storage.
Operating systems provide an interface to communicate with the computer without learning the computer’s language i.e. machine language. Basically, an operating system provides a layer between the program and hardware to enable a program to use a standard interface irrespective of what hardware is used. in this blog post, we will discuss how these components are interconnected and melded into a kernel.
Must Read:
Introduction to Standard C++ : In a Nutshell #1
How to Do Masters in Computer Science in INDIA?
Let’s see the types of operating system structures available there.
Types of Operating System Structure
Simple Structure
many operating systems do not have well-defined structures because such systems started as small, simple, and limited systems and grown. e.g. MS-DOS and original UNIX are other examples of limited structuring.
Below Figure the original UNIX structure.
Layered Approach
If the proper hardware support is available then operating systems can be broken into pieces that are smaller and more appropriate than those allowed by the original MS-DOS and UNIX systems. then the operating system can retain better control over the computer and the applications.
A system can be modular in many ways. One method is the Layered approach, in which the operating system is broken into a number of layers(levels). where the uppermost layer represents the user interface (layer N) and the bottom layer represents the hardware.
the below figure is showing this structure:
Microkernels
We have seen that as UNIX expanded, the kernel became large, and managing it also became difficult. in the 1980s Carnegie Mellon University developed an operating system – Mach, that modularized the kernel with a microkernel approach. In this method, the operating system was structured by removing all nonessential components from the kernel and implementing them as a system and user-level programs, which resulted in a smaller kernel.
The main function of the microkernel is to provide communication between the client program and the various services that are also running in the user space. Communication is provided through message passing.
Message Passing – if the client program wishes to access a file, it must interact with the file server. the client program and services never interact directly. Rather, they communicate indirectly by exchanging messages with the microkernel.
The performance of microkernels can suffer due to increased system function overhead. Windows NT was based on layered microkernel organization. Windows 4.0 partially corrected the performance problem by moving layers from user space to kernel space. By the time Windows XP was designed, windows architecture had become more monolithic than microkernel.
The Mac OS X kernel (known as Darwin) was also partly based on the Mach microkernel.
Must Read:
Introduction to Standard C++ : In a Nutshell #1
How to Do Masters in Computer Science in INDIA?
Modules
The current methodology for the operating system design involves using loadable kernel modules. the kernel has a set of core components and links in additional via modules. This design type is common in modern implementations of UNIX, e.g Solaris, Linux, and Mac OS X, as well as Windows.
the overall result resembles a layered system in that each kernel section has defined, protected interfaces; but it is more flexible than a layered system because any module can call any other module. this approach is similar to the microkernel approach but it is more efficient than that. as modules do not need to invoke message passing in order to communicate.
The Solaris operating system structure is organized around a core kernel with seven types of loadable kernel modules :
- Scheduling classes
- File systems
- Loadable system calls
- Executable formats
- Streams modules
- Miscellaneous
- Device and bus drivers
Linux also uses loadable kernel modules, primarily for supporting device drivers and file systems.
Hybrid Systems
A single, strictly defined structure adopted by operating systems is few there. Instead, they combine different structures, resulting in hybrid systems that address performance, security, and usability issues.
We explore the structures of three hybrid systems:
Apple’s Mac OS X and the two most prominent mobile operating systems – iOS and Android.
Mac OS X
The Mac OS X operating system uses a hybrid operating system structure. It is a layered system, the top layers include the Aqua user interface and a set of application environments and services. The Cocoa environment specifies an API for Objective-C programming language which is used to write Mac OS X applications. The below layers is the kernel environment which consists of primarily the Mach microkernel and the BSD UNIX kernel. the BSD application environment can make use of BSD facilities directly.
iOS
iOS is a mobile operating system designed by Apple to run its smartphone, the iPhone, and its tablet computer iPad. Cocoa Touch is an API for Objective-C that provides several frameworks for developing applications that run on iOS devices. the media services layer provides services for graphics, audio, and video. the core services layer provides a variety of features, including support for cloud computing and databases. the bottom layer Core OS is based on the kernel environment.
Android
Android is a mobile operating system based on a modified version of the Linux kernel and other open-source software. The Android mobile operating system is developed by Open Handset Alliance (led by Google) primarily for touchscreen devices, such as cell phones and tablets. Android runs on a variety of mobile platforms and is open-sourced, partly explaining its rapid rise in popularity.
Android provides a rich application framework that allows us to build innovative apps and games for mobile devices in a Java language environment.
Advantages of Google Android
- Android is an open-source platform allowing UI customization
- Supports cloud storage enabling sync of devices with G-account
- Continual improvement & removal of old features
- Supports 3rd party widget & information display on the screen
- Supports running multiple apps simultaneously
there are a lot of reasons that make Android a better choice for both end users and app developers. The software is simple to use, free, and allows a lot more flexibility. You have a lot more freedom as an app user and developer using Android.
Android is similar to iOS in that is a layered stack of software that provides a rich set of frameworks for developing mobile applications. The bottom layer of the Android structure in Linux is modified by Google and it is outside the normal distribution of Linux releases.
Linux is used in android for process, memory, and device-driver support for hardware. Software developers develop apps for android in java language. Here, rather than using standard java API google has developed a separate android API for java development. the java class files are first compiled to java bytecode and then translated into an executable file that runs on Dalvik virtual machine.
The Dalvik Virtual Machine was designed and optimized for android mobile devices with limited memory and CPU processing capabilities. The library set for android applications include frameworks for developing web browsers (WebKit), database support (SQLite), and libc (a smaller standard c library but designed for the slower CPUs that characterize mobile devices).
Must Read: