1. INSTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE
GROUP MEMBERS ID NUMBER
1.MOGES EYOB COSCW 0027 | 12
2.BETSEGAW MOGES COSCW 0011 |
12
3.ASHENAFI GALCHA COSCW 0008 |
12
4.TIGABU WADA COSCW 0045 |
11
PROJECT TITLE:- ANDROID OS
2. CHAPTER 3
PROCESS/CPU
SCHEDULING
Introduction to android OS Scheduling
Scheduling Techniques in android OS
Scheduling algorithms in android OS
Process Behavior Vis-à-vis Scheduling
in android OS
3. INTRODUCTION
OPERATING System is considered as efficient when its
throughput rate is high.
Task scheduling, memory management are the few aspects
which makes it possible to increase the response time of
operating systems.
Mobile operating systems are the embedded devices
which are designed for the specific use and are expected to
meet the specific time deadlines for completing the tasks.
For this, the response time of the important tasks is most
important which can be achieved using the priority based
task scheduling. This paper puts forth the idea of applying
the pre-emptive based task scheduling for SMS application.
SMS is the technology that enables the sending and
receiving of messages over the network via exchange of
text files
4. INTRODUCTION
Now-a-days, SMS files are extended to carry binary data
viz. ringtones, pictures, business cards, etc.
Thus developing a technique which will separate important
SMS files into a different priority inbox from the default one
helps in better search and better storage space utilization.
This idea has been implemented taking into account the
working of Gmail’s Priority Inbox.
In this setting a user can separate out the mails present in
the mail’s in-box in different categories viz. starred, unread,
important and read.
Thus this separating of mails helps in better categorization
of the bulky mails present in the in-box. In this project the
idea is to define High priority to required contacts from the
contact list. Defining High priority will enable the application
to flash the important SMS on the active screen thereby
5. Scheduling Techniques in android OS
Android process scheduling
In Linux system, processes are divided into real-time
processes and ordinary processes. The priority range of
real-time processes is 0-99, and that of ordinary processes
is 100-139. Moreover, the scheduling strategies of the two
processes are also different. Android system is developed
on the basis of Linux system, which makes full use of some
features of Linux system, some of which can even be used
as development templates. This article analyzes how
Android system uses Linux process scheduling strategy to
manage process priority. See Android 9.0 for the source
code.
Real time process is only a very small part of Android
system, which is used for data transmission process related
to hardware devices.
Ordinary processes have two priority adjustment interfaces:
Android. OS. Process. Setthreadpriority() and Java. Lang.
6. Scheduling Techniques in android OS
The default priority of Android applications is thread?
Priority? Default, which corresponds to a value of 120 in the
Linux kernel.
Android system does not want to adjust the priority of
application development at will, but there is no limitation in
the code. Its purpose is to hope that the application process
will not affect the operation of the system.
It seems that the priority division in Android is mainly used
by framework. When creating a service thread, priority can
be set according to the level, while when starting an
application, it is the default priority.
Android system may dynamically adjust the priority as
required, for example, when the application starts, adjust
the UI thread and render thread of foreground application to
– 10.
7. Scheduling algorithms in android OS
Android operating system uses O (1) scheduling algorithm
as it is based on Linux Kernel2.6.
Therefore the scheduler is names as Completely Fair
Scheduler as the processes canschedule within a constant
amount of time, regardless of how many processes are
runningon the operating system .
Pre-emptive task scheduling involves interrupting the
lowpriority tasks when high priority tasks are present in the
queue.
This scheduling isparticularly used for mobile operating
system as the CPU utilization is medium,turnaround time
and response time is high. Mobile phones are required to
meet specifictime deadlines for the tasks to occur.
8. Scheduling algorithms in android OS
An O(1) scheduler (pronounced "O of 1 scheduler", "Big O
of 1 scheduler", or "constant time scheduler") is a kernel
scheduling design that can schedule processes within a
constant amount of time, regardless of how many
processes are running on the operating system.
This is an improvement over previously used O(n)
schedulers, which schedule processes in an amount of time
that scales linearly based on the amounts of inputs.
In the realm of real-time operating systems, deterministic
execution is key, and an O(1) scheduler is able to provide
scheduling services with a fixed upper-bound on execution
times.
The O(1) scheduler was used in Linux releases 2.6.0 thru
2.6.22 (2003-2007), at which point it was superseded by
the Completely Fair Scheduler
9. Algorithm
1. Start the SMS application
2. Register incoming SMS
3. SMS received by BroadcastReceiver
4. Check the contact number for priority
if High priority, then
Flash SMS on the active
screen and take
backup in PriorityManager
inbox
else
redirect to inbox.
Fig: Flowchart for the proposed techniqu
11. CHAPTER 4
INTER PROCESS
COMMUNICATIONS
Introduction to inter-process communication
android OS
Synchronization android OS
Protocols and API for Process Communication
android OS
Producer-Consumer problem in android OS
Conflict Resolution in android OS
+ Any Related Information Regarding IPC
android OS
12. INTRODUCTION
Inter-Process Communication is a necessary and
indispensable feature for every Operating System in order
to let processes communicate with each other. That means,
if Process A needs to communicate with Process B
(synchronize, share data, .. ), the OS must provide
capabilities to do that.
IPC is inter-process communication. It describes the
mechanisms used by different types of android components
to communicate with one another.
1 Intents are messages which components can send and
receive. It is a universal mechanism of passing data
between processes
2) Bundles are entities of data that is passed through. It is
similar to the serialization of an object, but much faster on
android. Bundle can be read from intent via the getExtras()
method.
13. Synchronization android OS
Synchronized method is a method which can be used
by only one thread at a time. Other threads will be
waiting until the method will be released.
You should have only serious reasons to declare
method as synchronized because such method
decreases the productivity.
The classic case of synchronized method usage is
when several threads are using same resources i.e.
change state of some object and it is needed to make
sure only one thread performs it at a time, otherwise it
will cause inconsistency.
Also make sure to make synchronized method as
small as possible, ideally reduce it to contain only
operations which can manipulate common resources.
14. Synchronization android OS
For example the class Reporter has common resource
fileWriter. It writes to file some messages with information
about authors
class Reporter{
private FileWriter fileWriter;
public synchronized void addRecord(String author, String
message) throws IOException {
fileWriter.write("n<<<<<<<<<<>>>>>>>>>>n");
fileWriter.write("Message written by:" + author + "n");
fileWriter.write("Message content:" + message);
}
public Reporter(FileWriter fileWriter) {
this.fileWriter = fileWriter;
}
}