Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore SM_Assignment_4_Group_E

SM_Assignment_4_Group_E

Published by Yashvardhan Baid, 2021-03-01 11:20:25

Description: SM_Assignment_4_Group_E

Search

Read the Text Version

  SYSTEM MANAGEMENT​ | ASSIGNMENT  Handling Multitasking  __________________________________________________________________________________  MADE BY: GROUP-E  ________________________________________________________________________________________________________    Objective:  In this assignment we have mainly discussed the requirement and handling of multiple processes (multitasking) in operating systems (Android & Windows). ---------------------------------------------------------------------------    Need of Multitasking  _______________________________________________________________________    Multitasking, in an operating system, is allowing a user to perform more than one computer task (such as the operation of an application program) at a time. The operating system is able to keep track of where you are in these tasks and go from one to the other without losing information. Usually, modern multitasking OSs also provide memory isolation between processes and support different security levels, allowing OS code to do things user code cannot. A Multitasking Operating System would be an OS that allows for the simultaneous execution of multiple (more than 1) processes. Advantages of Multitasking Operating System: Time Shareable In which, all tasks are allocated a specific piece of time, so they do not need waiting time for the CPU. ________________________________________________________________________________________________________ 

      2    Manage Several Users This operating system is more comfortable for handling the multiple users concurrently, and several programs can run smoothly without degradation of the system's performance. Secured Memory Multitasking operating system has well defined memory management, because this operating system does not provide any types of permissions of unwanted programs to wasting the memory. Great Virtual Memory Multitasking operating system contains the best virtual memory system. Due to virtual memory, any program does not need long waiting time for completion of their tasks, if this problem occurs then those programs are transferred to virtual memory. Background Processing Multitasking operating system creates the better environment to execute the background programs. These background programs are not transparent for normal users, but these programs help to run other programs smoothly such as firewall, antivirus software, and more. Good Reliability Multitasking operating systems provide several flexibilities for multiple users, and they are more satisfied with them. On which, every user can operate single or multiple programs smoothly. Thus we can see, multitasking is such a beneficial trait of modern operating systems. ________________________________________________________________________

      3      Multitasking on Android  _______________________________________________________________________    By now we know that Android is based on Linux. As such, each application runs in its own process (with a unique PID): this allows the app to live in an isolated environment, where it cannot be hindered by other applications/processes. Typically, when you want to start an application, Android creates a process, spawns the main thread and starts running the main Activity. What we probably don’t know is that we can specify some components of our app to run on a different process than the one that was used to start the app. In the example shown, we are specifying that the MusicService must be executed in a separate “music” process: What good is it, then? In the introduction, we mentioned that each Android app has a memory budget for its execution that cannot be exceeded. To be precise, that limit is enforced on a per-process basis. In other words, each process of an application will have a dedicated memory budget! (not to mention different rules for its termination, which is even more cool) ________________________________________________________________________ Let’s see whether this approach is going to be a good thing or a bad thing: ________________________________________________________________________

      4    What’s cool about having multiple processes? As we just mentioned, a separate process can take advantage of its own RAM budget, allowing the main process to have more space for its resources. In addition, processes that run different components are treated differently by the OS. This means that, in conditions where the system is running low on available memory, not all of them are to be killed. Consider this: your music player is running in the background and the music is playing; suddenly, the system needs to free some memory . Since the service that plays the music runs on another process, it is extremely likely that the OS is going to kill the main process first (the one that runs mainly your app UI), leaving the music playing in the other process. On a final note, this looks good for the end user as well! Because each of your app’s processes will have its own entry in the RAM usage screen of the Application Manager, and chances are that one or more of them are going to appear in the “Cached” section (which means they are inactive).

      5    What’s bad about having multiple processes? First of all, processes are meant to be isolated by design (as a security feature), which means that every process will have its own instance of Dalvik VM. In turn, this means that you won’t be able to share data across those instances, at least not in the traditional sense. For example, static fields will have their own value for each process, and not a single one as you are inclined to believe. And this extends to every state of the application. Does this mean that no inter-communication is possible between two separate processes? No, actually it is possible, and there are several ways of doing that. Most notably, Intents can “travel” across processes, and so can Handlers and Messengers. You can also rely on AIDL (Android Interface Definition Language) and Binder, which is what you usually do when you’re declaring a bound service ________________________________________________________________________

      6    Multitasking on Windows  ________________________________________________________________________ Multitasking is when multiple jobs are executed by the CPU simultaneously by switching between them. Switches occur so frequently that the users may interact with each program while it is them. Switches occur so frequently that the users may interact with each program while it is running. An OS does the following activities related to multitasking − ● The user gives instructions to the operating system or to a program directly, and receives The user gives instructions to the operating system or to a program directly, and receives an immediate response. ● The OS handles multitasking in the way that it can handle multiple operations/executes The OS handles multitasking in the way that it can handle multiple operations/executes multiple programs at a time. ● Multitasking Operating Systems are also known as Time-sharing systems. ● These Operating Systems were developed to provide interactive use of a computer system at a reasonable cost. ● A time-shared operating system uses the concept of CPU scheduling and A time-shared operating system uses the concept of CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared CPU. ● Each user has at least one separate program in memory.

      7    ● A program that is loaded into memory and is executing is commonly referred to as a process . ● When a process executes, it typically executes for only a very short time before it either finishes or needs to perform I/O. ● Since interactive I/O typically runs at slower speeds, it may take a long time to complete. During this time, a CPU can be utilized by another process. ● The operating system allows the users to share the computer simultaneously. Since each operating system allows the users to share the computer simultaneously. Since each action or command in a time-shared system tends to be short, only a little CPU time is needed for each user.

      8    ● As the system switches CPU rapidly from one user/program to the next, each user is given the impression that he/she has his/her own CPU, whereas actually one CPU is being the impression that he/she has his/her own CPU, whereas actually one CPU is being shared among many users. ____________________________________________________      

      9      MADE BY:  _____________________________________________________________________    LIT2020013: YASHVARDHAN BAID  LIT2020014: ROHAN AGARWAL  LIT2020015: PARMEET SINGH CHAWLA  LCS2020013: NISCHAL GOYAL  LCS2020014: AYUSH JAIN  LCS2020015: AYUSH RAI  LCI2020013: VATSAL SAVALIYA  LCI2020014: ANKUR GUPTA  LCI2020015: MANN  _____________________________________________________________________     


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook