ECP Second Chapter Notes
ECP Second Chapter Notes
PROGRAMMING)
UNIT 2: INTRODUCTION TO OPERATING SYSTEM
• An Operating System acts as a communication interface between the user and computer
hardware. Its purpose is to provide a platform on which a user can execute programs
conveniently and efficiently. An operating system is software that manages the allocation
of Computer Hardware. The coordination of the hardware must be appropriate to ensure
the computer system’s correct operation and to prevent user programs from interfering with
it. The main goal of the Operating System is to make the computer environment more
convenient to use and the Secondary goal is to use the resources most efficiently.
Working of MS-DOS
MS-DOS input and output occur at the command line in the form of issued commands and system
results of those commands. When booted, MS-DOS systems display a command prompt. MS-DOS
commands are then entered using a keyboard. Commands are either one of the standard DOS
commands, implemented as part of the OS, or they are the file name of an executable program.
Although it does not natively support a GUI, MS-DOS can run graphical programs if they are
installed on a system disk or diskette. Users enter the command for a graphical program, and the
program takes control of the input and output devices. When the program terminates, the control
reverts to MS-DOS and the command prompt reappears.
Advantages of DOS
• The commands in DOS are easy to remember and use.
• DOS is free of cost and can be installed easily.
• It gives us direct access to the BIOS calls.
• It can run on smaller machines and therefore the booting process is much faster than
other operating systems.
• DOS is very lightweight and it allows access to hardware.
• It does not have the overhead of a multitasking operating system.
Disadvantages of DOS
• DOS doesn’t support multitasking.
• It only has 2 GB of space which cannot be extended.
• It can only have a single user at a time.
• It is not compatible with other browsers.
• It doesn’t support networking.
• Automatic IRQ ordering is not supported by the OS.
• Not nearly as fancy in the graphics department.
Architecture of Linux
1. Kernel: Kernel is the core of the Linux based operating system. It virtualizes the
common hardware resources of the computer to provide each process with its virtual
resources. This makes the process seem as if it is the sole process running on the
machine. The kernel is also responsible for preventing and mitigating conflicts between
different processes. Different types of the kernel are:
• Monolithic Kernel
• Hybrid kernels
• Exo kernels
• Micro kernels
2. System Library: Linux uses system libraries, also known as shared libraries, to implement
various functionalities of the operating system. These libraries contain pre-written code
that applications can use to perform specific tasks. By using these libraries, developers can
save time and effort, as they don’t need to write the same code repeatedly. System libraries
act as an interface between applications and the kernel, providing a standardized and
efficient way for applications to interact with the underlying system.
3. Shell: The shell is the user interface of the Linux Operating System. It allows users to
interact with the system by entering commands, which the shell interprets and executes.
The shell serves as a bridge between the user and the kernel, forwarding the user’s requests
to the kernel for processing. It provides a convenient way for users to perform various
tasks, such as running programs, managing files, and configuring the system.
4. Hardware Layer: The hardware layer encompasses all the physical components of the
computer, such as RAM (Random Access Memory), HDD (Hard Disk Drive), CPU
(Central Processing Unit), and input/output devices. This layer is responsible for
interacting with the Linux Operating System and providing the necessary resources for the
system and applications to function properly. The Linux kernel and system libraries enable
communication and control over these hardware components, ensuring that they work
harmoniously together.
5. System Utility: System utilities are essential tools and programs provided by the Linux
Operating System to manage and configure various aspects of the system. These utilities
perform tasks such as installing software, configuring network settings, monitoring system
performance, managing users and permissions, and much more. System utilities simplify
system administration tasks, making it easier for users to maintain their Linux systems
efficiently.
Advantages of Linux
• The main advantage of Linux is it is an open-source operating system. This means the
source code is easily available for everyone and you are allowed to contribute, modify and
distribute the code to anyone without any permissions.
• In terms of security, Linux is more secure than any other operating system. It does not mean
that Linux is 100 percent secure, it has some malware for it but is less vulnerable than any
other operating system. So, it does not require any anti-virus software.
• The software updates in Linux are easy and frequent.
• Various Linux distributions are available so that you can use them according to your
requirements or according to your taste.
• Linux is freely available to use on the internet.
• It has large community support.
• It provides high stability. It rarely slows down or freezes and there is no need to reboot it
after a short time.
• It maintains the privacy of the user.
• The performance of the Linux system is much higher than other operating systems. It
allows a large number of people to work at the same time and it handles them efficiently.
• It is network friendly.
• The flexibility of Linux is high. There is no need to install a complete Linux suite; you are
allowed to install only the required components.
• Linux is compatible with a large number of file formats.
• It is fast and easy to install from the web. It can also install it on any hardware even on
your old computer system.
• It performs all tasks properly even if it has limited space on the hard disk.
Disadvantages of Linux
Software Compatibility:
• Limited Support for Some Applications: Popular software like Adobe Creative Suite,
Microsoft Office, or some video games are either unavailable on Linux or require complex
workarounds like Wine or virtual machines.
• Fewer Commercial Apps: The lack of commercial support can be a limitation for certain
enterprise applications.
Hardware Compatibility:
• Driver Issues: Linux may struggle with compatibility for certain hardware, especially
newer devices (like some printers, Wi-Fi cards, and GPUs), where drivers may not be
readily available or fully optimized.
• Proprietary Hardware Support: Certain hardware manufacturers do not release drivers
or support for Linux, which can lead to compatibility problems.
Learning Curve:
• Not Beginner-Friendly: For users accustomed to Windows or macOS, Linux can be
intimidating, especially in command-line use and system configuration.
• Requires Familiarity with Terminal: While modern desktop environments have made it
easier, advanced troubleshooting and system management often require the use of the
command line.
OR
Windows is a graphical operating system developed by Microsoft. It allows users to view and
store files, run the software, play games, watch videos, and provides a way to connect to the
internet. It was released for both home computing and professional works.
Versions of Windows Operating System
1. Windows 1.0
• It was released on November 20, 1985
• Pure Operating Environment
• Used Graphical User Interface
• Simple Graphics
• Offered limited multi-tasking was expected to have a better future potential
2. Windows 2.0
• It was released on December 9, 1987
• 16-bit Graphic User Interface (GUI) based operating environment
• Introduced Control Panel, and the first version of MS Word and Excel
• Unlike Windows 1.0, it had the capacity to allow applications to overlap each other
• It was also the last Windows OS which did not require a hard disk
• Hardware played an important role
3. Windows 3.0
• It was released in 1990
• It was better at multitasking
• Used 8086 microprocessors
• It has both, conventional and extendable memory
• First version of Windows to gather critical appreciation
• Better memory/ storage
Note* – None of the above mentioned Windows was Operating Systems. They all came under the
category of Windows, working based on a graphical operating environment. It was Windows 95,
which was the first Operating System released by Microsoft.
4. Window 95
• It was the first complete Operating System
• It was released on August 15, 1995
• It merged MS-DOS and Windows products
• It simplified plug and play features
• Taskbar and Start menu was introduced with this Windows OS
• Advanced from 16 bit GUI to 32 bit GUI
• Long file names could be saved
• Initially, computers with Windows 95 did not have Internet Explorer installed but by the
release date of Windows 95, the first version of Internet Explorer was installed in the
software
• On December 31, 2001, Windows declared this version of OS outdated and ended its
support for the same
5. Windows 98
• It was released to manufacturing on May 15, 1998
• It was a 16 bit and 32 bit product based on MS DOS
• It was not an entirely new version but just a tuned-up version to Windows 95
• Internet Explorer 4.01 was released along with this Windows version
• It did not support USB printers or mass storage devices
• An update to this version “Windows SE” was released in 1999
6. Windows 2000
• It was officially released on February 17, 2000. However, its manufacturing had begun in
late 1999
• A core set of features was followed for manufacturing Windows 2000 but 4 different
editions, targeting different sectors of the market were released. These included: Server,
Professional, Advanced Server and Datacenter Server
• It was considered as one of the most secure OS ever
• A local disk manager was introduced with these Windows
• Multilingual User Interface – it supported many different languages
7. Windows XP
• While the manufacturing started on August 24, 2001, the official product was released on
October 25, 2001
• Advanced portable PC support
• Automatic wireless connection support
• Fast start-up
• Better Graphical User Interface (GUI)
• Help and support centre
8. Windows Vista
• It was released on January 30, 2007
• It had an upgraded version of Graphical User Interface
• It was the first operating system to use DVD-ROM for installation
9. Windows 7
• It was released on October 22, 2009
• A large number of new features were introduced
• Redesigned Windows shell with an updated taskbar
• Incremental upgrade to the Windows line
• Libraries were added in the file management system
• A few features from the past Windows were removed
• Extended hardware support
10. Windows 8
• It was released for retail on October 26, 2012
• Optimisations for touch-based
• Installed in new devices like Laptops, Mobile phones, tablets, etc.
• Increased integration with cloud services
• Windows Store service for software distribution
• Task manager had been redesigned
• New security features were introduced
• Online Applications could be directly downloaded
11. Windows 10
• It was released on July 29, 2015
• Addresses shortcomings in the user interface first introduced with Windows 8
• A virtual desktop system
• It had the ability to run windows store apps within windows on the desktop rather than in
the full-screen mode
• Included new icons
• To reduce storage shortcomings, Windows 10 automatically compresses the file size
4.Android Architecture
Android Operating System, is an open-source operating system based on the Linux kernel,
developed primarily for mobile devices such as smartphones, tablets, smartwatches, and other
wearable devices.
The Android operating system is a mobile operating system that was developed by Google
(GOOGL) to be primarily used for touchscreen devices, cell phones, and tablets. Its design lets
users manipulate the mobile devices intuitively, with finger movements that mirror common
motions, such as pinching, swiping, and tapping. Google also employs Android software in
televisions, cars, and wristwatches—each of which is fitted with a unique user interface.
Components of Android Architecture
The main components of Android architecture are the following:-
• Applications
• Application Framework
• Android Runtime
• Platform Libraries
• Linux Kernel
Fig. Android Architecture
1. Applications
Applications is the top layer of android architecture. The pre-installed applications like home,
contacts, camera, gallery etc and third party applications downloaded from the play store like chat
applications, games etc. will be installed on this layer only. It runs within the Android run time
with the help of the classes and services provided by the application framework.
2. Application framework
Application Framework provides several important classes which are used to create an Android
application. It provides a generic abstraction for hardware access and also helps in managing the
user interface with application resources. Generally, it provides the services with the help of which
we can create a particular class and make that class helpful for the Applications creation. It includes
different types of services activity manager, notification manager, view system, package manager
etc. which are helpful for the development of our application according to the prerequisite.
3. Application runtime
Android Runtime environment is one of the most important part of Android. It contains
components like core libraries and the Dalvik virtual machine(DVM). Mainly, it provides the base
for the application framework and powers our application with the help of the core libraries. Like
Java Virtual Machine (JVM), Dalvik Virtual Machine (DVM) is a register-based virtual machine
and specially designed and optimized for android to ensure that a device can run multiple instances
efficiently. It depends on the layer Linux kernel for threading and low-level memory management.
The core libraries enable us to implement android applications using the standard JAVA or Kotlin
programming languages.
4. Platform libraries
The Platform Libraries includes various C/C++ core libraries and Java based libraries such as
Media, Graphics, Surface Manager, OpenGL etc. to provide a support for android development.
• Media library provides support to play and record an audio and video formats.
• Surface manager responsible for managing access to the display subsystem.
• SGL and OpenGL both cross-language, cross-platform application program interface
(API) are used for 2D and 3D computer graphics.
• SQLite provides database support and FreeType provides font support.
• Web-Kit This open source web browser engine provides all the functionality to display web
content and to simplify page loading.
• SSL (Secure Sockets Layer) is security technology to establish an encrypted link between
a web server and a web browser.
5. Linux Kernel
Linux Kernel is heart of the android architecture. It manages all the available drivers such as
display drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers, etc. which are
required during the runtime. The Linux Kernel will provide an abstraction layer between the device
hardware and the other components of android architecture. It is responsible for management of
memory, power, devices etc. The features of Linux kernel are:
• Security: The Linux kernel handles the security between the application and the system.
• Memory Management: It efficiently handles the memory management thereby providing
the freedom to develop our apps.
• Process Management: It manages the process well, allocates resources to processes
whenever they need them.
• Network Stack: It effectively handles the network communication.
• Driver Model: It ensures that the application works properly on the device and hardware
manufacturers responsible for building their drivers into the Linux build.
Features of Android
• Open-source platform: Android is built on an open-source Linux kernel, allowing
developers to access the source code, modify it, and contribute to its development. This
openness fosters innovation and collaboration within the Android ecosystem.
• Customizable user interface: Android provides users with the ability to customize their
device’s user interface, including wallpapers, themes, widgets, and launchers. Users can
personalize their devices to suit their preferences and style. This feature sets it apart from
its closest competitor, iOS.
• Multitasking: Android supports multitasking, allowing users to run multiple apps
simultaneously, switch between them seamlessly, and perform various tasks
simultaneously. Users can also use split-screen mode to view two apps side by side.
• Google Play Store: Android users can access the Google Play Store, which offers a vast
catalog of apps, games, movies, music, books, and more. The Play Store provides users a
centralized platform to discover, download, and install content for their devices.
• Google Assistant: Android devices come with Google Assistant, a virtual assistant
powered by artificial intelligence. Google Assistant can perform various tasks, answer
questions, provide recommendations, and control smart home devices using voice
commands.
• Security features: Android incorporates various security features to protect users’ data
and privacy. These features include app sandboxing, secure boot, encrypted file systems,
Google Play Protect, and regular security updates from device manufacturers.
• Accessibility: Android includes a wide range of accessibility features to accommodate
users with disabilities or special needs. These features include screen readers,
magnification gestures, color inversion, text-to-speech, and more.
• Google Services integration: Android devices seamlessly integrate with Google services
such as Gmail, Google Maps, Google Drive, Google Photos, and others. This integration
provides users access to a suite of productivity tools, communication services, and cloud
storage options.
• Development tools and support: Android provides developers with comprehensive
development tools, including Android Studio, the official integrated development
environment (IDE) for Android app development. Developers can also access extensive
documentation, APIs, libraries, and resources to build high-quality apps for Android
devices.
➢ Applications of Operating System
1. Resource Management
• CPU Management: The OS manages the execution of processes and allocates CPU time
to different tasks, ensuring efficient and fair processing.
• Memory Management: It manages the computer's memory, including RAM, to ensure
that applications and processes get the required memory and prevent conflicts.
• Storage Management: The OS handles data storage devices, managing file systems and
ensuring data is stored and retrieved efficiently.
• I/O Management: It coordinates input and output devices like keyboards, monitors,
printers, etc., and ensures smooth data transfer between devices.
2. Process Management
• The OS schedules processes, manages their execution, and handles multitasking or
multithreading. It ensures that multiple applications or tasks can run concurrently without
conflicts.
3. Security and Access Control
• The operating system controls access to system resources, ensuring only authorized users
and processes can access sensitive data and resources. It enforces security policies like user
authentication, permissions, and encryption.
4. User Interface (UI)
• Operating systems provide user interfaces such as command-line interfaces (CLI) or
graphical user interfaces (GUI) that allow users to interact with the system, run
applications, and manage resources.
5. Networking
• OS handles network communication protocols, enabling devices to connect to local area
networks (LAN), wide area networks (WAN), and the internet. It manages data
transmission, addresses, and connections between systems.
6. Virtualization
• The OS can run multiple virtual machines or containers, enabling one physical machine to
act as if it were multiple independent systems. This is used in cloud computing, server
management, and testing environments.
7. File Management
• It organizes and maintains files and directories on storage devices, providing methods for
creating, reading, writing, and deleting files. File systems also define access permissions
and hierarchy for efficient file retrieval.
8. Device Drivers
• OS manages communication with hardware through device drivers, which are software
components that enable the OS to interact with peripherals like printers, cameras, and
storage devices.
9. System Performance Monitoring
• The OS tracks and monitors system performance, offering tools to analyze resource usage
(e.g., CPU, memory, disk usage) and diagnose problems related to performance or stability.
10. Application Support
•The OS provides the necessary environment for running applications, including libraries,
system calls, and runtime environments. It also manages the interaction between software
applications and hardware components.
11. Multitasking and Multiprocessing
• It allows the execution of multiple processes simultaneously, either through multitasking
(running multiple processes in a single CPU) or multiprocessing (using multiple CPUs or
cores for concurrent execution).
12. Backup and Recovery
• Many operating systems offer backup and recovery tools that help protect data from loss
or corruption and enable the restoration of the system to a previous state.