Operating System: Thanks for your answers. Eva is designing an Internet-of-Thing
ID: 3853375 • Letter: O
Question
Operating System:
Thanks for your answers.
Eva is designing an Internet-of-Things (loT) service for Taipei city. The system is called Web of Things, which is designed to measure the vehicle flows on roads and pedestrian flows on sidewalk so as to minimize the waiting time for vehicle and pedestrian on the intersection subject to the safety constraint. In the meantime, Mayor Ke asked Eva to use minimum budget to design and deploy the systems to 2, 500 intersections in Taipei City. TaipeiBox is the device to be installed on the intersections. Eva has to choose the best configuration of hardware and software platforms between Arduino MEGA2560 and Intel Edison. (a) On Intel Edison, Eva can install Linux to manage physical and logical resources on the platforms, which has one dual-core Atom processor, 1GB memory, and 4GB storage. Suppose that one process requires at least 100MB memory. When there are 10 processes in the system, the system can still start another new process without showing 'out of memory'. Please illustrate the reason to allow the process to use more memory than the memory installed on the device, including name of the mechanism and how a memory address in a process is translated into a memory address on the device. (b) The memory space of a process, generated by C compiler, are divided into several segments. Please describes the segmentation mechanism, including their names and the data to be stored in each segment. (c) On Arduino MEGA2560 device, there are 256KB Flash and 8KB SRAM. Suppose that each function requires 50KB for binary code and variables. Can EVA deploy 10 functions to the device? If yes, please illustrate how this can be done. If not, please explain it.Explanation / Answer
9(a) Here Eva is using a device called Taipei box in the intersections to monitor the flow of pedestrians and vehicles which will help to design the IOT services. Now there are two options present for configuration of hardware i.e. Intel EDISON or Arduino Mega 2560.
Now, if the Intel Edison compute model is used for making the Taipei box there are certain advantages
Using intel Edison a Linux system can be used for OS interface It has an Arduino Uno compatible board and the most popular a development system for wearable devices[2] and Internet of Things devices . The architecture has the following configuration
1 GB RAM and 4 GB flash memory, Dual-core Intel Atom™ processor with clock speed 500 MHz , interfaces of 40 multiplexed GPIO It has a development environment of Open-source , and compatible with language like C/C++, Python, Node.js, HTML5, JavaScript.
Now, as the storage is almost 4 GB so multi work can be done at a time. As in the device there are several options that can be used to increase the memory like the Micro USB device connector OR via mechanical switch dedicated for standard size USB host Type-A connector. It has a useful Intel® IoT Analytics Platform which have the following properties ,
It have a seamless Device-toDevice and Device-to-Cloud communication ability and to run rules on the data stream which trigger alerts based on advanced analytics system. The inbuild foundational tools for collecting, storing, and processing data can be send to cloud .
In the Intel edison system there is a supporting virtual memory where the physical address is the main address which have used mostly to differentiate from a virtual address. Basically in this system computers uses a (MMU) unit which helps to translate memory addresses, the virtual and physical addresses to an address before and after the translation process performed by the MMU, Using the MMU unit or virtual memory addressing the translation can be done
9(b)
Memory segmentation is aprocess to make the division of primary memory into segments or sections. Using the process, a reference to the memory location can be done which includes a value that identifies the segment and an unique memory location within that segment. Segments are also used as an object of compiled programs when they linked with an image and is loaded into memory.
For C compiler a typical memory can be segmented using 5 segments.
1. Text segment , 2. Initialized data segment , 3. Uninitialized data segment
4. Stack segment and 5. Heap segment .
Now the process of segmengtation during the process can be defined by
This is also called as code segment or just text. The object file or memory, and the executable instructions get stored in this segment It can be placed after the heap or stack to prevent heaps and stack overflow and overwriting . Basically , this segment is fully sharable so only a single segment is enough for frequently execution of the programs, the C compiler, text segment is sometimes work as read-only, to prevent a program from accidentall modification.
Initialized data segment or the Data Segment. is a part of virtual address memory of a C program, this segment contains all the global variables and static variables which have used in the code.As the variables can be change or alter any time so the segment is not read only. It is classified into two types into initialized read-only area and initialized read-write area.
Uninitialized data segment, or the “bss” segment, the name derived from an assembler operator named as “block started by symbol.” Here the data is initialized by the kernel system to arithmetic 0 and before program execution.
After the end of data segment it initialized and this also contains only those global and static variables that are initialized to zero or don’t have an initialization.
Like int i or Int j where there is no initialization should be under BSS segment
4. Stack:
This segment is connected with the heap segment but work on the opposite way; It have the program stack, a LIFO structure and basically located in the higher parts of memory. the “stack pointer” register located at the top of the stack; and controls the stack memory addressing process by the push and pop technique. Here variables are stored automatically,each time a function is called. The recursive functions in C uses this mechanism. Each time a recursive function calls, a new stack frame get started .
5. Heap:
It is the segment where dynamic memory allocation usually takes place. It is connected with the stack segment and begins at the end of the BSS segment and grows to larger addresses.The malloc, realloc, and free functions work in this segment ,this segment have all the shared libraries and dynamically loaded modules .
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.