APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : SEMESTER 6

Subject : Embedded System

Year : 2018

Term : MARCH

Scheme : 2015 Full Time

Course Code : EC 308

Page:68





PDF Text (Beta):

ae memory blocks at a memory addre
1. ೫೫೫೫೫8 − ⋅ ⋅∙ ⇊⋅∣⋮⋯⊾−∏⋯∘≤∥∁⋯∙⋂⊑∖⋅↿≖⋅↿∁∸∎ ∙
"PE numBlocks, MEMTYPE blockSize. unsigned byte *memEm) is an स ‏ا ہے‎ ಕಾಟ ಕಾ,

vega with ‏چو‎ 9 tion, Which partitions
y from an address Paruttons in the blocks. The cre ini ing of the iti
2 7 bales the OS ‏ةجو عد‎ ಮುಂಬ ೮೭೩೦೦೧ and ininalizing of the memory partitions

: The function *OS\ 3 ⊽−
മമ. if ee created, the hates ‏سس‎ Nt LL ‏سس‎ ത്ത

Task parameters passing PI: MEMTYPE is the data type according to the memory, whether 16-bit or 32-bit
CPU memory addresses are there. For example. 16-bit in 6811011 and 8051. (i) *memAddr is pointer for the
aemory-starting address of the blocks. (11) numBlocks is the number of blocks into which the memory must be
‏۵۵ہ ایج‎ (must be 2 or more). (111) The blockSize is the memory size in bytes in each block. (iv) *memEnr is a
[೫೩ of the address to hold ட்ட codes. At the address *memEnr the following global error code variables
change from false to true. OS_NO_ERR = true when creation succeeds. OS_ MEM. INVALID_BLKS = true.
when at least two blocks are not passed as arguments. (५) OS_MEM_INVALID_PART= ‏بعلم‎ when memory
foe partition 15 not available. (vi) OS_MEM_INVALID_SIZE= true. when block size is smaller than a pointer

Example 9.14 show's the creation of four blocks of memory each block being of 1 KB. Let memory start
address be 0௩8000.

Example 9.14

1. * Definition in Pre-Processor for a 16-bit unsigned number, MEMTYPE to define number of blocks
which can be between 0 and 65535 and to define the number of bytes that store at a block. Maximum
sumber of bytes at a block can be 65535. */

typedef unsigned short MEMTYPE;
‏۴۔3‎ Codes for main function or for a task function */

4.F Codes for creating the blocks of memory*/

MemAddr = 0x8000:

மிட =4;

9௦00௨ = 1024; /* Each block is of 11:48 memory */
(*memAddr, numBlocks, blockSize, *memErr):

5./* Other Codes for the function. */

17 End of the function */

Function void *OSMemGet (OS_MEM *memCBPointer,

2. Gettin memory ⋅
ting a memory block at a + address + block from the partitions created earlier.

1 ‏اد‎ ९4 ஆ ‏می 5 سم مو‎ a pointer to the memory control block for the partitions.
ध ज for the control block of a memory partition.

Sk parameters passing PJ: (1) Passes 3 pointer as argument
function

(iv) ∙ ⋅∙⋯∁⋯⊟∏∞ that later it returns one of the
The OSMemGet ( ) passes the error code pointer ന +50

Similar Question Papers