Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech IV REAL-TIME SYSTEMS Previous Question Paper (September - 2020 - R16)

B.Tech | IV | II | R16 | September - 2020

Answer PaperPaper Code: 138EKMaximum Marks: 75Time: 2 Hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

1

Discuss briefly on various commands used for process management in UNIX.

15 marks

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 -ef for a full listing of all processes and ps aux for 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, while kill -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. nice starts a process with a specific priority level, while renice alters 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.
2

Define a semaphore. Discuss different types of semaphores supported by RTOS kernel.

15 marks

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:

Wait (or P/Pend): Decrements the semaphore value if it is greater than zero; otherwise, the task is blocked.
Signal (or V/Post): Increments the semaphore value and unblocks a waiting task if any exist.
315 marks
a

Define a signal. State its importance.

5 marks

Answer

Sign in to view the complete answer paper.

b

Give a detail description of signal control block and explain various operations of it.

10 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Describe in detail about spurious interrupts and how to handle them.

7 marks

Answer

Sign in to view the complete answer paper.

b

Enumerate the steps in servicing a Timer Interrupt.

8 marks

Answer

Sign in to view the complete answer paper.

5

Draw the block diagram of Automatic Chocolate Vending Machine System (ACVM) and explain its functional block diagram and uses.

15 marks

Answer

Sign in to view the complete answer paper.

6

Discuss briefly on various commands used for Text processing in UNIX.

15 marks

Answer

Sign in to view the complete answer paper.

7

Explain how Round-Robin scheduling work with an illustrative example in RTOS.

15 marks

Answer

Sign in to view the complete answer paper.

8

Explain typical operations and uses of Pipe object with an illustrative example.

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of REAL-TIME SYSTEMS from Jawaharlal Nehru Technological University Hyderabad for B.Tech IT IV II, September - 2020, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in REAL-TIME SYSTEMS

Loading Question Papers

Fetching data from database...