Operating System
Operating System
DEADLOCKS
Consider an example when two trains are coming toward each other on the same track and
there is only one track, none of the trains can move once they are in front of each other. A
similar situation occurs in operating systems when there are two or more processes that hold
some resources and wait for resources held by other(s). For example, in the above diagram,
Process 1 is holding Resource 1 and waiting for resource 2 which is acquired by process 2,
and process 2 is waiting for resource 1.
1.RESOURCES
In an operating system, a deadlock occurs when a process or thread enters a waiting state
because a requested system resource is held by another waiting process, which in turn is
waiting for another resource held by another waiting process.
These resources include devices, data records, files, and so forth. To make the discussion of
deadlocks as general as possible, we will refer to the objects granted as resources. A
resource can be a hardware device (e.g., a Blu-ray drive) or a piece of information (e.g., a
record in a database).
1.1.Preemptable and Nonpreemptable Resources
Preemptable resource is one that can be taken away from the process owning it with no ill
effects. Memory is an example of a preemptable resource. Consider, for example, a system
with 1 GB of user memory, one printer, and two 1-GB processes that each want to print
something.
Process A requests and gets the printer, then starts to compute the values to print. Before it
has finished the computation, it exceeds its time quantum and is swapped out to disk.
deadlocks involve nonpreemptable resources.
If the resource is not available when it is requested, the requesting process is forced to wait.
In some operating systems, the process is automatically blocked when a resource request
fails, and awakened when it becomes available. In other systems, the request fails with an
error code, and it is up to the calling process to wait a little while and try again.
1. Request: Firstly, the process requests the resource. In a case, if the request cannot be
granted immediately(e.g: resource is being used by any other process), then the requesting
process must wait until it can acquire the resource.
2. Use: The Process can operate on the resource ( e.g: if the resource is a printer then in that
case process can print on the printer)
For some kinds of resources, such as records in a database system, it is up to the user
processes rather than the system to manage resource usage themselves. One way of allowing
this is to associate a semaphore with each resource.
semaphores are all initialized to 1. Mutexes can be used equally well. The three steps listed
above are then implemented as a down on the semaphore to acquire the resource, the use of
the resource, and finally an up on the resource to release it. These steps are shown in Fig. 6-
1(a).
2.INTRODUCTION TO DEADLOCKS
A set of processes is deadlocked if each process in the set is waiting for an event that only
another process in the set can cause.
The number of processes and the number and kind of resources possessed and requested are
unimportant. This result holds for any kind of resource, including both hardware and
software. This kind of deadlock is called a resource deadlock.
4. Circular wait condition: There must be a circular list of two or more processes, each of
which is waiting for a resource held by the next member of the chain.
All four of these conditions must be present for a resource deadlock to occur. If one of them
is absent, no resource deadlock is possible
2.2.Deadlock Modeling
These four conditions can be modeled using directed graphs.
The graphs have two kinds of nodes: processes, shown as circles, and resources, shown as
squares.
A directed arc from a resource node (square) to a process node (circle) means that the
resource has previously been requested by, granted to, and is currently held by that process.
In Fig. 6-3(a), resource R is currently assigned to process A. A directed arc from a process to
a resource means that the process is currently blocked waiting for that resource.
In Fig. 6-3(c) we see a deadlock: process C is waiting for resource T, which is currently held
by process D. Process D is not about to release resource T because it is waiting for resource
U, held by C. Both processes will wait forever.
A cycle in the graph means that there is a deadlock involving the processes and resources in
the cycle (assuming that there is one resource of each kind). In this example, the cycle is C −
T − D − U − C.
Imagine that we have three processes, A, B, and C, and three resources, R, S, and T.
The requests and releases of the three processes are given in Fig. 6-4(a)–(c).
The operating system is free to run any unblocked process at any instant, so it could decide
to run A until A finished all its work, then run B to completion, and finally run C.
This ordering does not lead to any deadlocks (because there is no competition for resources)
but it also has no parallelism at all. In addition to requesting and releasing resources,
processes compute and do I/O.
When the processes are run sequentially, there is no possibility that while one process is
waiting for I/O, another can use the CPU.
Thus, running the processes strictly sequentially may not be optimal. On the other hand, if
none of the processes does any I/O at all, shortest job first is better than round robin, so
under some circumstances running all processes sequentially may be the best way.
Let us now suppose that the processes do both I/O and computing, so that round robin is a
reasonable scheduling algorithm.
The resource requests might occur in the order of Fig. 6-4(d). If these six requests are carried
out in that order, the six resulting resource graphs are asshown in Fig. 6-4(e)–(j).
After request 4 has been made, A blocks waiting for S, as shown in Fig. 6-4(h). In the next
two steps B and C also block, ultimately leading to a cycle and the deadlock of Fig. 6-4(j).
In general, four strategies are used for dealing with deadlocks.
1. Just ignore the problem. Maybe if you ignore it, it will ignore you.
2. Detection and recovery. Let them occur, detect them, and take action.
The Ostrich algorithm is based on the idea of preemptive resource allocation. This means
that when a process requests a resource, the operating system checks to see if the resource is
available.
It is straight forward technique that is easy to implement in most system and it can
effectively prevent deadlocks in system, where Resources are frequently shared among
multiple processes.
Deadlock detection and recovery is the process of detecting and resolving deadlocks in an
operating system.
A deadlock occurs when two or more processes are blocked, waiting for each other to
release the resources they need. This can lead to a system-wide stall, where no process can
make progress.
The state of which resources are currently owned and which ones are currently being
requested is as follows:
To be most effective, new checkpoints should not overwrite old ones but should be written
to new files, so as the process executes, a whole sequence accumulates. When a deadlock is
detected, it is easy to see which resources are needed.
To do the recovery, a process that owns a needed resource is rolled back to a point in time
before it acquired that resource by starting at one of its earlier checkpoints.
All the work done since the checkpoint is lost (e.g., output printed since the checkpoint must
be discarded, since it will be printed again). In effect, the process is reset to an earlier
moment when it did not have the resource, which is now assigned to one of the deadlocked
processes. If the restarted process tries to acquire the resource again, it will have to wait until
it becomes available
Killing all the processes involved in the deadlock. Killing process one by one. After killing
each process check for deadlock again and keep repeating the process till the system
recovers from deadlock Killing all the processes one by one helps a system to break circular
wait conditions.
1. Performance Overhead
2. Complexity .
5.DEADLOCK AVOIDANCE
Deadlock avoidance is another technique used in operating systems to deal with deadlocks.
Unlike deadlock prevention, which aims to eliminate the possibility of deadlocks, deadlock
avoidance focuses on dynamically detecting and avoiding situations that could lead to
deadlocks.
It involves analyzing the resource allocation state and resource requests made by processes
to determine if granting a request would potentially result in a deadlock. If a potential
deadlock is detected, the system can make decisions to avoid it by selectively granting or
denying resource requests.
The main algorithms for deadlock avoidance are based on the concept of safe states. Before
describing them, we will make a slight digression to look at the concept of safety in a
graphic and easy-to-understand way. Although the graphical approach does not translate
directly into a usable algorithm, it gives a good intuitive feel for the nature of the problem
In Fig. 6-8 we see a model for dealing with two processes and two resources, for example, a
printer and a plotter. The horizontal axis represents the number of instructions executed by
process A. The vertical axis represents the number of instructions executed by process B. At
I1 A requests a printer; at I2 it needs a plotter. The printer and plotter are released at I3 and
I4, respectively. Process B needs the plotter from I5 to I7 and the printer from I6 to I8.
Every point in the diagram represents a joint state of the two processes. Initially, the state is
at p, with neither process having executed any instructions.
If the scheduler chooses to run A first, we get to the point q, in which A has executed some
number of instructions, but B has executed none.
At point q the trajectory becomes vertical, indicating that the scheduler has chosen to run B.
With a single processor, all paths must be horizontal or vertical, never diagonal.
Furthermore, motion is always to the north or east, never to the south or west (because
processes cannot run backward in time, of course).
When A crosses the I1 line on the path from r to s, it requests and is granted the printer.
When B reaches point t, it requests the plotter. The regions that are shaded are especially
interesting.
The region with lines slanting from southwest to northeast represents both processes having
the printer.
The mutual exclusion rule makes it impossible to enter this region. Similarly, the region
shaded the other way represents both processes having the plotter and is equally impossible.
If the system ever enters the box bounded by I1 and I2 on the sides and I5 and I6 top and
bottom, it will eventually deadlock when it gets to the intersection of I2 and I6. At this point,
A is requesting the plotter and B is requesting the printer, an
At any instant of time, there is a current state consisting of E, A, C, and R. A state is said to
be safe if there is some scheduling order in which every process can run to completion even
if all of them suddenly request their maximum number of resources immediately. It is easiest
to illustrate this concept by an example using one resource. In Fig. 6-9(a) we have a state in
which A has three instances of the resource but may need as many as nine eventually. B
currently has two and may need four altogether, later. Similarly, C also has two but may
need an additional fiv e. A total of 10 instances of the resource exist, so with seven resources
already allocated, three there are still free
The state of Fig. 6-9(a) is safe because there exists a sequence of allocations that allows all
processes to complete.
Namely, the scheduler can simply run B exclusively, until it asks for and gets two more
instances of the resource, leading to the state of Fig. 6-9(b).
When B completes, we get the state of Fig. 6-9(c).
When C completes, we get Fig. 6-9(e). Now A can get the six instances of the resource it
needs and also complete.
Thus, the allocation decision that moved the system from Fig. 6-10(a) to Fig. 6-10(b) went
from a safe to an unsafe state. Running A or C next starting at Fig. 6-10(b) does not work
either.
In retrospect, A‟s request should not have been granted. It is worth noting that an unsafe
state is not a deadlocked state. Starting at Fig. 6-10(b), the system can run for a while. In
fact, one process can even complete.
Furthermore, it is possible that A might release a resource before asking for any more,
allowing C to complete and avoiding deadlock altogether. Thus, the difference between a
safe state and an unsafe state is that from a safe state the system can guarantee that all
processes will finish; from an unsafe state, no such guarantee can be given.
It is modeled on the way a small-town banker might deal with a group of customers to whom
he has granted lines of credit.
What the algorithm does is check to see if granting the request leads to an unsafe state. If so,
the request is denied. If granting the request leads to a safe state, it is carried out. In Fig. 6-
11(a) we see four customers, A, B, C, and D, each of whom has been granted a certain
number of credit units (e.g., 1 unit is 1K dollars).
The banker knows that not all customers will need their maximum credit immediately, so he
has reserved only 10 units rather than 22 to service them.
The customers go about their respective businesses, making loan requests from time to time
(i.e., asking for resources). At a certain moment, the situation is as shown in Fig. 6-11(b).
This state is safe because with two units left, the banker can delay any requests except C‟s,
thus letting C finish and release all four of his resources. With four units in hand, the banker
can let either D or B have the necessary units, and so on. Consider what would happen if a
request from B for one more unit were granted in Fig. 6-11(b). We would have situation Fig.
6-11(c),
which is unsafe. If all the customers suddenly asked for their maximum loans, the banker
could not satisfy any of them, and we would have a deadlock.
An unsafe state does not have to lead to deadlock, since a customer might not need the
entire credit line available, but the banker cannot count on this behavior.
The banker‟s algorithm considers each request as it occurs, seeing whether granting it leads
to a safe state. If it does, the request is granted; otherwise, it is postponed until later. To see
if a state is safe, the banker checks to see if he has enough resources to satisfy some
customer.
The algorithm for checking to see if a state is safe can now be stated.
1. Look for a row, R, whose unmet resource needs are all smaller than or equal to A. If no
such row exists, the system will eventually deadlock since no process can run to completion
(assuming processes keep all resources until they exit).
2. Assume the process of the chosen row requests all the resources it needs (which is
guaranteed to be possible) and finishes. Mark that process as terminated and add all of its
resources to the A vector.
3. Repeat steps 1 and 2 until either all processes are marked terminated (in which case the
initial state was safe) or no process is left whose resource needs can be met (in which case
the system was not safe).
6.DEADLOCK PREVENTION
Deadlock can be prevented by eliminating any of the four necessary conditions, which are
mutual exclusion, hold and wait, no preemption, and circular wait. Mutual exclusion, hold
and wait and no preemption cannot be violated practically. Circular wait can be feasibly
eliminated by assigning a priority to each resource. Let's see how we can prevent each of the
conditions.
Mutual section from the resource point of view is the fact that a resource can never be used
by more than one process simultaneously which is fair enough but that is the main reason
behind the deadlock. If a resource could have been used by more than one process at the
same time However, if we can be able to violate resources behaving in the mutually
exclusive manner then the deadlock can be prevented.
Spooling
For a device like printer, spooling can work. There is a memory associated with the printer
which stores jobs from each of the process into it. Later, Printer collects all the jobs and print
each one of them according to FCFS. By using this mechanism, the process doesn't have to
wait for the printer and it can continue whatever it was doing. Later, it collects the output
when it is produced.
Although, Spooling can be an effective approach to violate mutual exclusion but it suffers
from two kinds of problems.
2. After some point of time, there may arise a race condition between the processes to get
space in that spool.
We cannot force a resource to be used by more than one process at the same time since it
will not be fair enough and some serious problems may arise in the performance. Therefore,
we cannot violate mutual exclusion for a process practically
Hold and wait condition lies when a process holds a resource and waiting for some other
resource to complete its task. Deadlock occurs because there can be more than one process
which are holding one resource and waiting for other in the cyclic order.
However, we have to find out some mechanism by which a process either doesn't hold any
resource or doesn't wait. That means, a process must be assigned all the necessary resources
before the execution starts. A process must not wait for any resource once the execution has
been started.
This can be implemented practically if a process declares all the resources initially.
However, this sounds very practical but can't be done in the computer system because a
process can't determine necessary resources initially.
Process is the set of instructions which are executed by the CPU. Each of the instruction may
demand multiple resources at the multiple times. The need cannot be fixed by the OS.
2. Possibility of getting starved will be increases due to the fact that some process may hold
a resource for a very long time.
6.3 Attacking the No-Preemption Condition Deadlock arises due to the fact that a process
can't be stopped once it starts. However, if we take the resource away from the process
which is causing deadlock then we can prevent deadlock. This is not a good approach at all
since if we take a resource away which is being used by the process then all the work which
it has done till now can become inconsistent. Consider a printer is being used by any
process. If we take the printer away from that process and assign it to some other process
then all the data which has been printed can become inconsistent and ineffective and also the
fact that the process can't start printing again from where it has left which causes
performance inefficiency..
6.4 Attacking the Circular Wait Condition To violate circular wait, we can assign a
priority number to each of the resource. A process can't request for a lesser priority resource.
This ensures that not a single process can request a resource which is being utilized by some
other process and no cycle will be formed. Among all the methods, violating Circular wait is
the only approach that can be implemented practically
7. OTHER ISSUES
In many database systems, an operation that occurs frequently is requesting locks on several
records and then updating all the locked records. When multiple processes are running at the
same time, there is a real danger of deadlock. The approach often used is called two-phase
locking.
In the first phase, the process tries to lock all the records it needs, one at a time. If it
succeeds, it begins the second phase, performing its updates and releasing the locks. No real
work is done in the first phase.
If during the first phase, some record is needed that is already locked, the process just
releases all its locks and starts the first phase all over. In a certain sense, this approach is
similar to requesting all the resources needed in advance, or at least before anything
irreversible is done.
In some versions of two-phase locking, there is no release and restart if a locked record is
encountered during the first phase. In these versions, deadlock can occur.
7.3. Livelock
In some situations, a process tries to be polite by giving up the locks it already acquired
whenever it notices that it cannot obtain the next lock it needs. Then it waits a millisecond,
say, and tries again. In principle, this is good and should help to detect and avoid deadlock.
However, if the other process does the same thing at exactly the same time, they will be in
the situation of two people trying to pass each other on the street when both of them politely
step aside, and yet no progress is possible, because they keep stepping the same way at the
same time
OVERVIEW OF LINUX
Linux has several graphical interfaces, the focus here is on how Linux appears to a
programmer working in a shell window on X
Linux has been a popular choice for server operating systems due to its outstanding
reliability. It's incredibly secure, which makes it well-suited for mission-critical tasks.
Linux's robust open-source codebase and highly active development community mean bugs
can quickly be identified and patched.
There are several reasons why one might choose to use Linux:
Open-source: Linux is open-source software, meaning that the source code is freely
available for anyone to use, modify, and distribute. This allows for a large and active
community of developers to contribute to the development and maintenance of the operating
system.
Customizability: Linux is highly customizable, and users can easily install and configure
different software packages to suit their needs.
Stability and security: Linux is known for its stability and security, as it is less prone to
crashes and viruses than other operating systems.
Cost-effective: Linux is free to download and use, making it a cost-effective option for
individuals and businesses.
Linux Goals
As always an interactive system designed to handle multiple processes and multiple users at
the same time. It was designed by programmers, for programmers, to use in an environment
in which the majority of the users are relatively sophisticated and are engaged in (often quite
complex) software development projects.
Correctness means that the behavior of a system/component conforms to its specification.
Efficiency means that the system/component does not waste resources such as time and
memory.
This means that a system should have a small number of basic elements that can be
combined in an infinite variety of ways to suit the application.
One of the basic guidelines behind Linux is that every program should do just one thing and
do it well. Thus compilers do not produce listings, because other programs can do that better.
Finally, most programmers have a strong dislike for useless redundancy is a complete waste
of valuable hacking time.
Interfaces to Linux
A Linux system can be regarded as a kind of pyramid, as illustrated in Fig. 10-1. At the
bottom is the hardware, consisting of the CPU, memory, disks, a monitor and keyboard, and
other devices. Running on the bare hardware is the operating system. Its function is to
control the hardware and provide a system call interface to all the programs. These system
calls allow user programs to create and manage processes, files, and other resources.
Programs make system calls by putting the arguments in registers (or sometimes, on the
stack), and issuing trap instructions to switch from user mode to kernel mode. Since there is
no way to write a trap instruction in C, a library is provided, with one procedure per system
call. These procedures are written in assembly language but can be called from C. Each one
first puts its arguments in the proper place, then executes the trap instruction. Thus to
execute the read system call, a C program can call the read library procedure. As an aside, it
is the library interface, and not the system call interface, that is specified by POSIX. In other
words, POSIX tells which library procedures a conformant system must supply, what their
parameters are, what they must do, and what results they must return. It does not even
mention the actual system calls.
The shell
What is Shell?
A shell is a special user program that provides an interface for the user to use operating
system services. Shell accepts human-readable commands from users and converts them into
something which the kernel can understand. It is a command language interpreter that
executes commands read from input devices such as keyboards or from files. The shell gets
started when the user logs in or starts the terminal
Shell can be accessed by users using a command line interface. A special program called
Terminal in Linux/macOS, or Command Prompt in Windows OS is provided to type in the
human-readable commands such as “cat”, “ls” etc. and then it is being executed. The result
is then displayed on the terminal to the user. A terminal in Ubuntu 16.4 system looks like
this
In the above screenshot “ls” command with “-l” option is executed. It will list all the files in
the current working directory in a long listing format
Working with a command line shell is a bit difficult for beginners because it‟s hard to
memorize so many commands. It is very powerful; it allows users to store commands in a
file and execute them together. This way any repetitive task can be easily automated. These
files are usually called batch files in Windows and Shell Scripts in Linux/macOS systems.
Graphical Shells Graphical shells provide means for manipulating programs based on the
graphical user interface (GUI), by allowing for operations such as opening, closing, moving,
and resizing windows, as well as switching focus between windows. Window OS or Ubuntu
OS can be considered as a good example which provides GUI to the user for interacting with
the program. Users do not need to type in commands for every action. A typical GUI in the
Ubuntu system –
There are several shells are available for Linux systems like –
BASH (Bourne Again SHell) – It is the most widely used shell in Linux systems. It is used
as default login shell in Linux systems and in macOS. It can also be installed on Windows
OS.
CSH (C SHell) – The C shell‟s syntax and its usage are very similar to the C programming
language.
KSH (Korn SHell) – The Korn Shell was also the base for the POSIX Shell standard
specifications etc. Each shell does the same job but understands different commands and
provides different built-in functions.
The command-line (shell) user interface to Linux consists of a large number of standard
utility programs.
Roughly speaking, these programs can be divided into six categories, as follows:
1. File and directory manipulation commands.
2. Filters.
4. Text processing.
5. System administration.
6. Miscellaneous
Kernel structure
The kernel virtualizes the computer‟s common hardware resources to provide each process
with its own 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.
Linux Kernel is the heart of Linux operating systems. It is an open-source (source code
that can be used by anyone freely) software that is most popular and widely used in the
industry as well as on a personal use basis.
This is schematically represented below:
The Process Scheduler: This kernel subsystem is responsible for fairly distributing
the CPU time among all the processes running on the system simultaneously.
The Memory Management Unit: This kernel sub-unit is responsible for proper
distribution of the memory resources among the various processes running on the
system. The MMU does more than just simply provide separate virtual address spaces
for each of the processes.
The Virtual File System: This subsystem is responsible for providing a unified
interface to access stored data across different file systems and physical storage
media.
We can Install Google Chrome for Linux with a few simple keystrokes in the
terminal or it can easily be done through GUI also.
There are many ways available to install Chrome for the Linux Operating
system including manually and by using the terminal method. Let's see each
method and understand step-by-step
If you don't have access to a package manager or prefer to download and install
Google Chrome through a web browser, you can do so by following these steps:
1. Launch a web browser: Launch any available web browser on your
Linux system, such as Firefox or Chromium.
History of android
Android 1.0,1.1
Android 1.0 (API 1) was launched on the 23rd Of September 2008. It
was incorporated into the HTC Dream smartphone (aka T-mobile G1 in the
US). It thus became the first-ever Android device. The features it offered
included Google Maps, YouTube, an HTML browser, Gmail, camera,
Bluetooth, Wi-Fi, and many more.
Android 1.5
This version came up in late April 2009 and was the first to have
Google‟s dessert-themed naming scheme and be incorporated in the Samsung
Galaxy phone series. It was introduced with a lot of functionalities that we
take for granted today.
for example, some major updates included auto-rotation, third-party keyboard
support, support for widgets, video recording, enabling copy-paste for
browser, facility to upload videos on YouTube, check phone usage history,
etc.
Android 1.6
Just after a couple of months in September 2009, Donut was
released. One of its most significant features was the inclusion of CDMA-
based networks that made it possible for carriers across the globe to support it.
Earlier only GSM technologies were in use.
Gingerbread, released even before the later versions of Froyo, brought drastic
changes to the look and feel of smartphones.
Android Version 2.3.3 and further in the series Gingerbread (API 10).
Version 2.3.3 brought along some API improvements and bug fixes in
Feb 2011.
Android 3.0
To be installed on tablets and phones with larger screens only and had
functions that could not be managed on phones with smaller screens. The most
important function brought by this version was to eliminate the need for the
physical button and rather the introduction of virtual buttons for performing
the start, back, and menu functions.
. This version also enabled switching between tasks/applications easier.
Another significant feature included the ability to encrypt all the user data.
Android 3.1
This version released in May 2011 presented many other UI
refinements. Its foremost feature was support for joysticks, gamepads,
external keyboards, and pointing devices. It also had better connectivity for
USB accessories.
Android 4.0
the Face Unlock feature for smartphones was introduced with 4.0.
Other prominent features included the possibility to monitor the use of mobile
data and Wi-Fi, sliding gestures to reject notifications, tabs of a browser or
even tasks, integration of screenshot capture using the Power and Volume
button, real-time speech to text dictation, 2011 brought minor bug fixes to
certain devices.
Android 4.0.3 and 4.0.4)
Android 4.4
a user could access Google at any time and could work on phones with
a minimum RAM memory of 512MB. The phone app could automatically
prioritize user‟s contacts based on the numbers most frequently contacted.
Google Hangouts was introduced in this version that could keep all the user‟s
SMS and MMS messages together in the same app. Emoji was made also
available on Google Keyboard.
Android 5.1
Some notable features of the release included official support for multiple
SIM cards, the Device protection policy that kept the device locked in case of
theft/misplacement until the owner signs into their Google account, and the
introduction of High-definition voice calls, available between compatible 4G
LTE devices.
Android Version 6.0 Marshmallow (API 23)
features such as support for biometric fingerprint unlocking and USB type C
support, which reduced CPU speed while the display remains turned off to
enhance the battery life, a search bar for easy access to applications and option
to mark them as favorites,
Android 7.0
for example, the split-screen mode was introduced along with provision
for fast switching between applications. Google Now was replaced with Google
Assistant. The first phones to come with this version were Google Pixel, Pixel
XL, and LG V20.
Android 8.0
which was evident through the introduction of functionalities such
as Autofill, picture-in-picture mode (for example, the video calling window
in WhatsApp while working with some other app), and the Notification dots
through which user could quickly catch up with newer information.
With this version, a new logo and a different color scheme were announced.
Facilities such as Live Captions for all media, smarter replies to text
(automated text and actions suggestions), ‘Focus mode’ to block out
distractions by selecting certain apps to pause temporarily, replacement of
navigation buttons with the use of gestures, availability of the dark mode at the
system level, provision for more control over permissions for applications, the
introduction of support for foldable smartphones with flexible displays, and
capabilities to see device location, set screen time limits and have better
parental control over children‟s content were embedded.
Android Version 11
„The OS that gets to what’s important„ and it‟s pretty much justified.
Android 11 brings along capabilities to control conversations across multiple
messaging apps all in the same spot, it allows the user to digitally select
priorities for people they are conversing with and then show the most
important conversations at the top and on the lock screen. Another
distinguishing feature is the chat bubbles (similar to the Facebook messenger)
through which users can pin conversations from various messaging apps so
they always appear on their screens. The built-in screen recording feature has
been introduced finally that avoids the installation of an extra app to record the
screen.
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
3. Application runtime
Android Runtime environment contains components like core libraries and the
Dalvik virtual machine (DVM). 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 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 include various C/C++ core libraries and Java-based
libraries such as Media, Graphics, Surface Manager, OpenGL, etc., to support
Android development.
Linux Kernel is the heart of the android architecture. It manages all the
available drivers such as display, camera, Bluetooth, audio, memory, etc.,
required during the runtime.
The Linux Kernel will provide an abstraction layer between the device hardware
and the other android architecture components. It is responsible for the
management of memory, power, devices etc. The features of the Linux kernel
are:
o Security: The Linux kernel handles the security between the application
and the system.
o Memory Management: It efficiently handles memory management,
thereby providing the freedom to develop our apps.
o Process Management: It manages the process well, allocates resources
to processes whenever they need them.
o Network Stack: It effectively handles network communication.
o Driver Model: It ensures that the application works properly on the
device and hardware manufacturers responsible for building their drivers
into the Linux build.
Android Applications
Android provides an application model that is very different from the normal
command-line environment in the Linux shell or even applications launched
from a graphical user interface.
An application is not an executable file with a main entry point; it is a container
of everything that makes up that app: its code, graphical resources, declarations
about what it is to the system, and other data
An Android application by convention is a file with the apk extension, for
Android Package. This file is actually a normal zip archive, containing
everything about the application.
The important contents of an apk are:
1. A manifest describing what the application is, what it does, and how to run it.
The manifest must provide a package name for the application, a Java-style
scoped string (such as com.android.app.calculator), which uniquely identifies it.
2. Resources needed by the application, including strings it displays to the user,
XML data for layouts and other descriptions, graphical bitmaps, etc.
3. The code itself, which may be Dalvik bytecode as well as native library code.
4. Signing information, securely identifying the author
The package manager is the part of Android that keeps track of all application
packages. It parses every application‟s manifest, collecting and indexing the
information it finds in them. With that information, it then provides facilities for
clients to query it about the currently installed applications and retrieve relevant
information about them.
Activities - An activity is a part of the application that interacts directly with the
user through a user interface. When the user launches an application on their
device, this is actually an activity inside the application that has been designated
as such a main entry point. The application implements code in its activity that is
responsible for interacting with the user
Content Providers -Our last application component, the content provider, is the
primary mechanism that applications use to exchange data with each other. All
interactions with a content provider are through URIs using content: scheme; the
authority of the URI is used to find the correct content-provider implementation
to interact with
1. A share request that includes the URI of the data to be shared is created and is
submitted to the system.
2. The system asks the ContentResolver for the MIME type of the data behind that
URI; this works much like the query method we just discussed, but asks the
content provider to return a MIME-type string for the URI
3.The system finds all activities that can receive data of the identified
MIME type.
4. A user interface is shown for the user to select one of the possible recipients.
5. When one of these activities is selected, the system launches it.
6. The share-handling activity receives the URI of the data to be shared, retrieves
its data through ContentResolver, and performs its appropriate operation: creates
an email, stores it, etc
Another Applications
o Android applications are usually developed in the Java language using the
Android Software Development Kit. Once developed, Android
applications can be packaged easily and sold out either through a store
such as Google Play, SlideME, Opera Mobile Store, Mobango, F-
droid or the Amazon Appstore.
o Android powers hundreds of millions of mobile devices in more than 190
countries around the world. It's the largest installed base of any mobile
platform and growing fast. Every day more than 1 million new Android
devices are activated worldwide.
o
o An Android application by convention is a file with the apk extension, for
Android Package. This file is actually a normal zip archive, containing
everything about the application. The important contents of an apk are: 1.
A manifest describing what the application is, what it does, and how to
run it. The manifest must provide a package name for the application, a
Java-style scoped string (such as com.android.app.calculator), which
uniquely identifies it. 2. Resources needed by the application, including
strings it displays to the user, XML data for layouts and other
descriptions, graphical bitmaps, etc. 3. The code itself, which may be
Dalvik bytecode as well as native library code. 4. Signing information,
securely identifying the author. The key part of the application for our
purposes here is its manifest, which a
Linux Extensions
For the most part, Android includes a stock Linux kernel providing standard
Linux features. Most of the interesting aspects of Android as an operating system are in
how those existing Linux features are used. There are also, however, serveral
significant extensions to Linux that the Android system relies on. Wake Locks Power
management on mobile devices is different than on traditional computing systems, so
Android adds a new feature to Linux called wake locks (also called suspend blockers)
for managing how the system goes to sleep. On a traditional computing system, the
system can be in one of
two power states: running and ready for user input, or deeply asleep
and unableto continue
at the time the biggest and most powerful computer company in the world, was
developing a personal computer based the Intel 8088 microprocessor. Since the
mid-1970s, Microsoft had become the leading provider of the BASIC
programming language for 8-bit microcomputers based on the 8080 and Z-80.
When IBM approached Microsoft about licensing BASIC for the new IBM PC,
Microsoft readily agreed and suggested that IBM contact Digital Research to
license its CP/M operating system, since Microsoft was not then in the operating
system business. IBM did that, but the president of Digital Research, Gary
Kildall, was too busy to meet with IBM. This was probably the worst blunder in
all of business history, since had he licensed CP/M to IBM, Kildall would
probably have become the richest man on the planet. Rebuffed by Kildall, IBM
came back to Bill Gates, the cofounder of Microsoft, and asked for help again.
Within a short time, Microsoft bought a CP/M clone from a local company,
Seattle Computer Products, ported it to the IBM PC, and licensed it to IBM. It
was then renamed MS-DOS 1.0 (MicroSoft Disk Operating System) and
shipped with the first IBM PC in 1981. SEC.
Design Goals
Design Goals are statements a team makes about the quality of
experience theywould like a product to attain. Design goals are targets
for design work.
History of windows
Microsoft Windows commonly known as Windows, was introduced
by Microsoft on 20 November, 1985. Windows is proprietary and
closed source operating system. Windows uses Graphical User
Interface (GUI) to interact with users. Bill Gates and Paul Allen
founded Microsoft and Windows operating system. Windows is
supported on almost every computer platform
ARM, ARM-64, x86-64, IA-32 as it is most widely used operating
system and captures 90% of total share in personal computer (PC)
market. Journey of Microsoft Windows from first version to latest
version :
1. Windows 1.0 – In Nov 1985
2. Windows 2.0 – In Dec 1987
3. Windows 3.0 – In May 1990
4. Windows 95 – In Aug 1995
5. Windows 98 – In June 1998
6. Windows ME – In Sep 2000
7. Windows XP – In Oct 2001
8. Windows Vista – In Nov 2006
9. Windows 7 – In
July 2009
10.Windows 8.0 –
In Oct 2012
11.Windows 8.1 –
In Oct 2013
12.Windows 10 – In
July 2015
Here are some facts about Windows that may amaze you :
Study of latest data shows that there are almost 1.36 billion active
Windows users and that‟s nearly one and half times, the sum of
people living in North and South America.
Since 2009, sales of Windows 7 and Windows 8 units is
more than thewhole population of Europe.
Initially, Bill Gates was planning to name Windows as „Interface Manager‟.
According to Bill Gates, Windows 1.0 is „a unique software
designed for serious PC user‟. Windows 1.0 includes Paint,
Calculator, Notepad and Word processor.
Windows 1.0 is less than 1 MB in size and had 16-bit colour interface.
In order to make users familiar with odd input system of
Windows, Microsoft included games, Reversi that depend
on mouse button clickinstead of keyboard.
In 1988, Microsoft became the world‟s largest PC software
company on thebasis of sales.
Windows NT was known as „Portable System‟as it was designed
for normalusers as well as business related purpose.
There is significant advancement in Windows 95 as it provides
Start Menu,Taskbar and Close buttons.
On October 25, 2001, Microsoft launched Windows XP, which
became the best selling product of Microsoft in their software
development history.
„Windows Nashville‟, „Windows Cairo‟ and „Windows
Neptune‟, these arethe three unreleased versions of Windows.
With the success of Windows 7, Microsoft beats Apple in terms
of customersatisfaction.
In 2015, Microsoft released Windows 10 along with a
digital personalassistant, „CORTANA‟.
Windows 98 was the last windows operating system based on MS-DOS.
Microsoft mouse, launched in 1983, was the first hardware
product made byMicrosoft.