Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech IV REAL-TIME SYSTEMS Previous Question Paper (September - 2020 - R16)
Answer any Five Questions. All Questions Carry Equal Marks.
Main
Discuss briefly on various commands used for process management in UNIX.
Answer
In UNIX-based systems, process management involves monitoring, controlling, and terminating processes. The following commands are essential for these tasks:
- ps: Displays information about active processes. Common flags include
ps -effor a full listing of all processes andps auxfor user-specific and system-wide process details. - top: Provides a dynamic, real-time view of the system's running processes, including CPU usage, memory consumption, and uptime. It is useful for identifying resource-heavy processes.
- kill: Sends a signal to a process, typically to terminate it. The command
kill [PID]sends a SIGTERM signal, whilekill -9 [PID]sends a SIGKILL signal to force immediate termination. - killall / pkill: These commands allow users to terminate processes by name rather than by Process ID (PID), which is useful for stopping multiple instances of a program.
- nice / renice: Used to manage process priority.
nicestarts a process with a specific priority level, whilerenicealters the priority of an already running process. Priority ranges from -20 (highest) to 19 (lowest). - jobs: Lists the processes running in the background of the current shell session.
- fg / bg: Used to move a background process to the foreground (
fg) or resume a suspended process in the background (bg). - nohup: Runs a command immune to hangups, meaning the process continues to run even after the user logs out or the terminal is closed.
- wait: Pauses the execution of a script or shell until a specified background process completes.
Define a semaphore. Discuss different types of semaphores supported by RTOS kernel.
Answer
A semaphore is a protected variable or abstract data type used in real-time operating systems to manage synchronization and mutual exclusion among concurrent tasks. It acts as a signaling mechanism, allowing tasks to communicate their state or coordinate access to shared resources without busy-waiting.
The RTOS kernel typically supports the following types of semaphores:
- Binary Semaphores: These act as a simple flag with only two states, 0 and 1. They are primarily used for mutual exclusion (locking a resource) or for task synchronization, where one task signals another that an event has occurred.
- Counting Semaphores: These maintain a counter that tracks the number of available resources. The counter is incremented when a resource is released and decremented when a resource is acquired. If the counter reaches zero, any task attempting to acquire the resource is blocked until the count becomes positive.
- Mutex (Mutual Exclusion Semaphore): A specialized binary semaphore that includes a priority inheritance mechanism to prevent priority inversion. Only the task that successfully acquired the mutex is permitted to release it, making it ideal for protecting critical sections of code.
Operations on semaphores are typically performed using two atomic primitives:
Define a signal. State its importance.
Answer
Sign in to view the complete answer paper.
Give a detail description of signal control block and explain various operations of it.
Answer
Sign in to view the complete answer paper.
Describe in detail about spurious interrupts and how to handle them.
Answer
Sign in to view the complete answer paper.
Enumerate the steps in servicing a Timer Interrupt.
Answer
Sign in to view the complete answer paper.
Draw the block diagram of Automatic Chocolate Vending Machine System (ACVM) and explain its functional block diagram and uses.
Answer
Sign in to view the complete answer paper.
Discuss briefly on various commands used for Text processing in UNIX.
Answer
Sign in to view the complete answer paper.
Explain how Round-Robin scheduling work with an illustrative example in RTOS.
Answer
Sign in to view the complete answer paper.
Explain typical operations and uses of Pipe object with an illustrative example.
Answer
Sign in to view the complete answer paper.