This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
An operating system, also known as OS, is a set of software that is designed to manage hardware resources in a computer and provide several common maintenance tools and services for computer programs (TechTerms, 27 January 2012). An operating system is essential software that is required to drive the hardware, and deliver basic functionality for application programs to function. An operating system provide basic tasks similar to controlling the I/O of the computer, such as recognizing input from the keyboard and mouse, supplying display output to the display peripherals, managing computer resources, tasks, hard drive activities and keeping track of file transfer within the computer itself. On the other hand, "Computer Architecture is the science and art of selecting and interconnecting hardware components to create computers that meet functional, performance and cost goals. Computer architecture is not about using computers to design buildings." (Jayneel Gandhi, n.d.). The basic component in computer system architecture includes the Central Processing Unit (CPU), Random Access Memory (RAM), Input and Output Devices (I/O).
In times of a modern era, there are several factors that could affect the users' experience on a computer, which is mainly on performance sectors; a single bit of architecture alterations will cause revolutions in the computing world. Apart from the capabilities of particular system hardware, the operating system is also the vital factor that will highly affect and influence the overall performance of a system and the experience of users'. With operating system resources management and computer system architecture in mind, this assignment is aimed to investigate the memory management techniques of the Operating System of my choice, which is Android Operating System, and to conduct a comprehensive research on microprocessors of desktop machines, servers and laptops.
2.0 Section 1: Introduction to Android OS
Android is a Linux based OS; the world's most popular mobile OS for smartphones. Android is a software stack that is designed for mobile platform that comprises an operating system, key applications and middleware. Based on the Linux OS with 2.6.x kernel, it is a stripped down version that is able to handle most of the task smoothly such as I/O, memory management and many more. Android OS is capable of providing entertainments and productivity, with the support of almost up to 600,000 apps which are available in its application store named Google Play.
Android is able to function exactly the same as the conventional desktop PCs and laptop PCs such as accessing and replying E-mails, browsing the internet, watching YouTube videos, playing intensive 3D games and many other tasks. All these are achievable by employing a similar concept with the conventional PC operating system; utilizing central processing unit and memory to run an application. Other than that, Android is a multitasking operating system, where many applications could run at the same time. With that being said, Android system comprises a build-in memory management in the operating system itself, designed to manage the random access memory which is available in the smartphone, to serve every applications which is executed by the users.
2.1 Android Memory Management (MinFree)
Android may be an operating system which is based on the popular Linux OS, utilizing same concept as the PC operating system itself, and implementing Linux kernel 2.6.x source as well, but then the memory management which is deployed in Android itself is slightly unusual and differs from Linux memory management. Just like the popular Java ME (Mobile Edition) or .NET, Android utilizes its own custom-tailored virtual machine and runtime to manage the way applications uses the memory which is available in the device itself. To top things up, Android's runtime also manages the process lifetimes, aimed to ensure that application is responsive at all times by stopping and killing low priority and inactive processes to make way for a higher priority process.
For the possibility of managing the memory in Android operating system, Android employed Dalvik Virtual Machine, a managed runtime designed specifically for the Android OS Project, which is used by the applications and some system processes (Android, n.d.). Dalvik is responsible in executing applications which is requested by the user, allowing applications to run with a smallest possible memory foot-print in mind, thus enables multiple applications to run in the same time, lag-free.
2.1.1 Dalvik Virtual Machine
"Dalvik is a virtual machine that runs applications and code written in Java,Â a standard Java compiler turns source code (written as text files) into Bytecode, then compiled into a .dex file that the Dalvik VM can read and use" (Hildenbrand J., 5th January 2012). With the implementation of the Dalvik virtual machine to execute applications, the application can be executed with a minimal memory allocation, and it also creates an abstraction layer for the developers of applications that they do not need to worry about the hardware limitations in the many devices out in the market while developing the applications.
2.1.2 Dalvik VM Memory Management Mechanism
During the initial start-up of the Android operating system, core system processes and the frequently used applications by the user will be loaded in to the random access memory of the mobile device. Apart from the core system processes which will need to be running all the time as long as the device is powered on, the rest of the lower priority applications will be kept idle in the memory itself. This technique is deployed with an aim of enabling a faster and more efficient application executing speed, whether it is a newly launch or a re-launch. As time goes by, applications demand for more memory, and when new application is executed by the system or users, the memory management is in charge of making space for the new application to be loaded in to the memory. The memory management will then start to terminate and kill the unused processes according to the priority as follows:
Figure : System Process Priority in Android OS
As shown in the figure, processes are categorized in to three (3) category; Critical Priority, High Priority and Low Priority. According to Android Developers, when there is a need for more memory, Android's system places each running process into an "importance hierarchy" based on the components running in the process (Android Developers, n.d.). Processes which are categorized under the lowest priority will be terminated first, and when there is a higher demand of memory, it will eliminate the higher priority processes as well.
2.2 Drawbacks of Android's Memory Management
The concept of fully-utilising the memory available in Android mobile devices is definitely a wonderful idea, ensuring the system is able to launch application at top notch speed, making everything as fast as possible. But then, there are several drawbacks in the implementation of this memory management that will affect the user's overall experience on the mobile devices running Android's operating system.
Sluggish User Interface
A test was done on a Samsung Galaxy S III on the free memory amount during an initial start-up. When the phone was first booted-up, several frequent used applications are loaded in to the memory, leaving 302MB of memory free for user's use. After some time and apps are launched, the free memory is only about 112MB. When the free memory falls below 200MB, the user interface starts to turn sluggish, affecting the user's overall experience.
Applications Launch Delay
The main objective of Android memory management of pre-loading frequent-used applications in to the memory beforehand is to enable a faster launching speed. But when time goes by, application demands for more memory, it causes the system to run out of free memory. In this condition, when a new application which is not pre-loaded in to the memory is launched, it requires a longer time to launch; the memory manager needs to kill processes and make space for the new application, thus causing delays.
2.3 Solutions to Overcome Android's Memory Management Issue
Android integrates a memory management which is named "MinFree". Based on the drawbacks of the memory management, there is a solution that could solve the problem, while retaining the benefits of the manager itself. As explained that Android categorize the application based on the importance hierarchy, each process category contains a value that the memory management will start killing processes when the free memory goes below that set value.
Figure : Default Android Minfree Value
As shown in figure 2, the minfree will only start terminating empty application when the free memory is below the set value of 72MB. Since most of the smartphones that is equipped with 1GB of RAM gets sluggish when there is only 100-200MB of free memory, the value should be set higher.
Figure : Tweaked Minfree Value
As shown in figure 3, the value for each process had been increased, thus enabling the minfree to start killing applications at a much earlier stage, enabling the user interface to be responsive and smooth all the time, and also retaining the benefit of the original concept; fast application launching speed.
3.0 Section 2: Introduction to Microprocessors
"The microprocessor chip is an electronic device that is a computer's central processing unit (CPU) aka the brains of your computer" (Bellis M., n.d.). A microprocessor is an integrated chip that contains a circuit that processes all tasks which is given to it. The microprocessor is a chip that is programmable, multipurpose, and clock-driven, register based electronic device that is capable of in taking binary data as an input, and provide output as a result after a processing based on the instruction given in the memory. The content in a microprocessor is billions of transistors, where they are interconnected through the circuit which is made out of copper, working together to execute and process data, enabling a wide variety of processing functions. In the world of processors, there are four (4) types of processor which is available in the current market; embedded processor, desktop processor, mobile processor, and server processor.
3.1 Major Trends Affecting Microprocessor's Performance
3.2 Processor Design Goal Difference for Laptop PC, Desktop PC, Server & Embedded Systems
In the world of central processing unit, there are four (4) types of processors which are currently widely used around the globe; each type was designed for different platforms with different concept in mind and different usage perspective.
3.2.1 Laptop PC/Mobile Processor
A typical mobile processor has a similar design goal when it is compared with the embedded processors; mobile processor features low power consumption to increase battery performance on a laptop PC. While that being said, a mobile processor is a stripped down version of desktop processors in terms of size and performance. Laptop processors are designed in a slimmer and smaller form-factor compared to desktop processor. Other than that, mobile processors are designed to run in a much lower voltage, offering several speed steps to switch intervals when processor is not being used.
3.2.2 Desktop PC Processor
Desktop processors are designed to be more powerful due to the fact that there are no design constraints. Desktop processors are designed without a concern of power consumption (though the power consumption should be in a reasonable value); therefore it is able to deliver huge processing power, enabling all tasks to be processed within a short period of time. Other than that, desktop processors are able to have larger form-factor than other processors, thus providing the possibilities of manufacturing a processor chip with more transistors, providing more processing power to the end-user.
3.2.3 Server Processor
Server processors are designed to work as long as 24 hours a day and constantly receiving workloads. Apart from that, server processors usually have more cores and cache than desktop processors in a same class, enabling tasks to be completed as fast as possible since its providing service to multiple users at a time. On top of that, since server processors need to be kept running at all times, they are designed to tolerate high temperatures while still being able to perform its tasks efficiently. Besides the performance difference, server processors do come with additional features which is only found in server processors; Error Code Correction (ECC), a self-correcting error technology, and multi processors on a single server motherboard, where multiple server processors are able to be mounted on a single motherboard to increase performance.
3.2.4 Embedded System Processor
An embedded processor is a type of microprocessor which is used in embedded systems such as routers and electronic scientific calculators; microprocessor which is designed to perform a specific task. The design form factor is usually smaller than the other type of processors, and consumes less power. There are two (2) types of embedded processors; the ordinary microprocessors, and microcontrollers. The design goal of an embedded system processor is to achieve minimum power consumption, while ensuring the heat produced is within reasonable range. Other than that, embedded processors are also designed to achieve multiple peripherals integration on to the single chipset.
Reference (Section 1)