Professional Documents
Culture Documents
13
Code No.: R42049/R10
IV B.Tech II Semester Regular/Supplementary Examinations
April - 2015
Set-3
Solutions
REAL TIME OPERATING SYSTEMS
( Common to Electronics & Communication Engineering, Electronics & Instrumentation Engineering and Electronics &
Communication Engineering )
Time: 3 Hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry equal marks
---
1. (a) Define the table for kernel services in an operating system with functions and actions. [8] (Unit-I, Topic No. 1.1)
(b) What are the aspects to be considered during the preliminary design of RTOS for multi-tasking support?
[7] (Unit-I, Topic No.1.2)
2. (a) Discuss briefly scheduling algorithms in VX works. [8] (Unit-I, Topic No.1.4)
(b) Write about the programming concepts of above RTOS with relevant examples. [7] (Unit-II, Topic No.2.2.6)
3. (a) How are the real time features implemented in windows CE? [8] (Unit- III, Topic No. 3.1)
(b) Explain the inheritance protocol implementation in RT Linux. [7] (Unit-III, Topic No.3.2)
4. (a) Explain the design of embedded system and coding for an automatic chocolate Vending Machine Using Mucos.
[8] (Unit-IV, Topic No.4.3)
(b) Write the coding steps for sending application layer byte streams on a TCP/IP network using Vx works.
[7] (Unit-IV, Topic No.4.3)
5. (a) Write the design issues of embedded system in automobile. [8] (Unit-V, Topic No.5.4)
(b) Discuss about the design of embedded system in mobile phone software for key inputs. [7] (Unit-V, Topic No.5.1)
6. (a) How is the target image creation for Window XP embedded done? [8] (Unit-VI, Topic No.6.3)
(b) Explain the steps in porting RTOS on a microcontroller based development board. [7] (Unit-VI, Topic No.6.4)
7. (a) Write an overview of shell programming concepts in Linux. [8] (Unit-VII, Topic No. 7.2)
(b) Explain the tools used in system programming. [7] (Unit-VII, Topic No. 7.3)
8. (a) Explain the function of the following registers and their offset address of Ethernet controller used in embedded Linux.
(i) Hardware address registers
(ii) Transmit states of descriptors
(iii) Transmit start address of description
(iv) Command register. [8]
(b) Write a case study of appliance control by RT Linux system. [7] (Unit-VIII, Topic No. 8.6)
WARNING : Xerox/Photocopying of this book is a CRIMINAL act. Anyone found guilty is LIABLE to face LEGAL proceedings.
S.14 Real Time Operating Systems (April-2015, Set-3) JNTU-Kakinada
WARNING : Xerox/Photocopying of this book is a CRIMINAL act. Anyone found guilty is LIABLE to face LEGAL proceedings.
Real Time Operating Systems (April-2015, Set-3) JNTU-Kakinada S.15
The powerful development tools are used in Vx works (b) Explain the inheritance protocol imple-
that enable the user to access it in a easy and efficient way. Vx mentation in RT Linux.
works supports ‘Device Software Optimization’. Answer : April-15, Set-3, Q3(b) M[7]
This OS is especially used in mars pathfinder. It supports Inheritance Protocol
both scheduling (preemptive and round-robin) algorithm in
Inheritance protocol solves the priority inversion
which the tasks are assigned by 256 priority levels.
problem. It causes a lower priority task to inherit a higher priority
List of Vx Works Interrupt Service Functions
task which is blocked on a resource locked by a lower priority
1. intLock ( ) – Disables interrupt task. This will automatically cut down the blocking time.
2. intUnlock ( ) – Enables interrupt Implementation
3. intVecSet ( ) – Sets vector interrupt Consider a system with three tasks, task_A(1st priority),
4. intVecGet ( ) – Gets the vector interrupt task_B(2nd priority) and task_C(3rd priority) in which task_C and
5. int Count ( ) – Counts number of interrupts task_A try to access same resource during the execution process.
6. int Connect ( ) – Connects a C-Function to interrupt Suppose if task_A is accessing a shared resource then
vector. task_C can preempt it(task_A) before finishing access to shared
7. int Vec Base Get( ) – Gets base address of interrupt vector. resource. If task_C is also in need of same resource then it first
8. int Context ( ) – Returns true when calling function is waits for the completion of task_A . Once task_A gets completed
ISR. it(task_C) gets unblocked and proceeds to acquire the resource.
List of Vx works Interprocess Communication Functions Task_A inherits the priority of task_C since it is of
1. SemBcreate ( ) – Creates binary semaphore higher priority thereby preventing task_B from preempting
2. Sem Mcreate ( ) – Creates mutex semaphore task_A. Task_A can continue its execution until it acquires the
3. Sem C Create ( ) – Creates counting semaphore. shared resource. After acquiring the shared resource, task_A
4. Sem Delete ( ) – Deletes semaphore can resume its original priority thereby allowing task_C to
5. Sem Take ( ) – Takes a semaphore. continue its execution.
6. Sem Give ( ) – Releases semaphore Q4. (a) Explain the design of embedded system
and coding for an Automatic Chocolate
7. Sem Flash ( ) – Resumes blocked tasks.
Vending Machine using Mucos.
8. msg Q Create ( ) – Initializes a queue for the messages
Answer : April-15, Set-3, Q4(a) M[8]
9. msg Q Delete ( ) –Deletes msg queue
The various components present in ACVM are,
10. Msg Q Send ( ) – Sends msg into queue
11. msg Q Receive ( ) – Receives msg from queue 1. Keypad interface on top of machine
12. Pipe Dev Create ( ) - Creates a pipe device. 2. LCD display in order to display the menu list, text and
Q3. (a) How are the real time features implemented pictograms.
in widows CE? 3. Slot to insert a coin and coin sorter
Answer : April-15, Set-3, Q3(a) M[8] 4. Slot to deliver the chocolates to the customer
Basically RTOS was designed to implement modularty, 5. Internet connection port for remote accessing of the
standardized communication and synchronization between device.
modules. These modules are modeled using windows CE processes. The function ACVMperforms the following ACVM.
Windows CE is an operating system that is mainly used in 1. It displays GUIs and menu
applications like media players and hand held devices. It has a
2. It displays ‘welcome’ and ‘thank you’ messages with
scalable 32bit that can be used in various embedded applications.
time and date
It has a size of 400 Kbytes. It can hold 256 priority levels per
process and can implement preemptive priority 3. A timer starts after receiving first coin and waits for 30
scheduling.Windows CE when used as an RTOS provides internet sec until it gets sufficient amount
browsing and services to the systems that interface to the Internet. 4. It display a query, if coins inserted are insufficient and it
Windows CE was selected for real time OS due to the returns them if query is not answered within time.
following features, The design aspects of ACVM include,
1. It can shift between a PDA and a real time computer and 1. Power dissipation
a regular computer.
2. Performance
2. Its API is compatible with windows NT.
3. Process deadlines
3. Its time dependent functions display temporal resolution
of one millisecond 4. User interfaces
4. It provides high security for memory thereby making it 5. Engineering cost
impossible for data modification. 6. Manufacturing cost
WARNING : Xerox/Photocopying of this book is a CRIMINAL act. Anyone found guilty is LIABLE to face LEGAL proceedings.
S.16 Real Time Operating Systems (April-2015, Set-3) JNTU-Kakinada
Figure (i) illustrates the various ports used in an Automatic Chocolate Vending Machine (ACVM)
Port-3 Port-Collect
Figure (i)
The embedded software is developed by MUCOs RTOS, the synchronization steps in ACVM are
1. Task-read ports
2. Task-collect
3. Task-refund
4. Task-excess refund
5. Method display Time Date( ).
Figure (ii) illustrates the basic system of ACVM
Coins Inlet
LCD Three
Line Display
Mechanical Coin Sorter
Keypad
2: Input Rs 2
1: Input Rs.1 5: Input Rs5
USB Wireless
:Port_1 :Port_2 :Port_5 MODEM MODEM
:Port-Deliver Chocolate/
Conins
Collect
Bowl
(a)
Figure (ii)
(b) Write the coding steps for sending application layer byte streams on a TCP/IP Network Using Vx
works.
Answer : April-15, Set-3, Q4(b) M[7]
For answer refer April-15, Set-1, Q4(b).
Q5. (a) Write the design issues of embedded system in automobile.
Answer : April-15, Set-3, Q5(a) M[8]
For answer refer Unit-V, Q10.
(b) Discuss about the design of embedded system in mobile phone software for key inputs.
Answer : April-15, Set-3, Q5(b) M[7]
For answer refer Unit-V, Q18, Q20.
Q6. (a) How is the target image creation for window XP embedded done?
Answer : April-15, Set-3, Q6(a) M[8]
For answer refer Unit-VI, Q3.
WARNING : Xerox/Photocopying of this book is a CRIMINAL act. Anyone found guilty is LIABLE to face LEGAL proceedings.
Real Time Operating Systems (April-2015, Set-3) JNTU-Kakinada S.17
(b) Explain the steps in porting RTOS on a Debugger performs many functions, some of them are,
microcontroller based development board.
(a) It creates breakpoints to stop the execution of software.
Answer : April-15, Set-3, Q6(b) M[7]
(b) It also creates con ditional breakpoints which helps in
The following steps need to be follow while porting the
stopping the software execu ti on if any problem is
RTOS-Microc/os-II on ATmega 128-based development board.
occurred during execution.
1. Download the processor-specific code for the desired
processor from the web site. (c) It can load, trace out or can perform stepping on target.
2. Download processor-independent code which consists (d) It can be used for modifying the RAM data, but not the
of C-program related to core OS, tasks, semaphores, ROM contents.
mailboxes, mutexes ,queues, timers and flags.
Debuggers run the code to be tested on a simulator
3. By using AVRGCC and AVR studio cross-plat form (known as Instruction Set Simulator (ISS). They use the
development tools, compile the code. development environment to run the code. The code is executed
4. Program the flash memory by running serial device instruction by instruction in a step-wise manner.
programmer on studio -AVR
Debuggers provide the facility for the programmers to
5. Select target device as ATmega 128 specify break points in the code. When a break point is reached
6. Select I/O port setup and set the parameters as parallel the execution of code is paused, so that the programmer can
port with AVRISP API. verify the status of various registers, flags, variables and memory
7. Open program content file and select the hex file in the locations. If everything is as expected, the programmer can
list shown. resume the execution.
8. Erase internal flash of ATmega 128 by using the erase Additionally, some debugger are capable of modifying
option and choose the program option program the the program slate while it is under execution, instead of just
device. observing the execution. Some debugger are capable of by
passing through a crash or logical error.
Q7. (a)
Write an overview of shell programming
concepts in Linux. There are several debuggers available in UNIX and
Answer : April-15, Set-3, Q7(a) M[8] LINUX platforms. One of the most popular debuggers program
for LINUX is ‘gdb’. When comparing with the compiler, the
For answer refer Unit-VII, Q9, Q10.
debugger requires additional informant on (for debugging
(b) Explain the tools used in system purpose) about the program. It generates a large amount of
programming. code. The scope of it is enormous.
Answer : April-15, Set-3, Q7(b) M[7]
Q8. (a) Explain the function of the following
The primary tools used in system programming are, registers and their offset address of
1. Shell Ethernet controller used in embedded
2. Text editor Linux.
3. Debugger. (i) Hardware address registers
1. Shell (ii) Transmit states of descriptors
For answer refer Unit-VII, Q8, Topic: Shell.
(iii) Transmit start address of description
2. Text Editor
(iv) Command register.
A text editor is a ultility program that allows the user to
enter (or) write, code, modify it, store it to a file and load it from Answer : April-15, Set-3, Q8(a) M[8]
a file. Text editor is similar to that of a word processor. However
Unsolved.
a text editor is designed with some additional features that are
beyond a typical word processor. The main purpose of (b) Write a case study of Appliances control
developing a text editor is to support programming. The programs by RT Linux system.
written into a text editor are stored as a files on disks with an
extension. The assembler programs can then use these programs. Answer : April-15, Set-3, Q8(b) M[7]
Linux/unxi operating system provides a text editor which For answer refer Unit-VIII, Q9.
can be accessed through the command vi, thus it is called as vi
editor.
3. Debugger
A program that enables the user to load the object code
program into system memory, execute and troubleshoot the
program is called as debugger.
WARNING : Xerox/Photocopying of this book is a CRIMINAL act. Anyone found guilty is LIABLE to face LEGAL proceedings.