JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech IV Year REAL TIME SYSTEMS Previous Question Paper (July/August - 2022 - R18)
Answer any five questions. All questions carry equal marks.
Main
Explain any five file I/O system calls with their functions and examples.
Answer
File I/O system calls are the interface between user-level applications and the operating system kernel, allowing processes to perform operations on files. The following are five essential system calls:
- open(): Used to establish a connection between a file and a process. It returns a file descriptor, which is a non-negative integer used for subsequent operations. Example: fd = open("file.txt", O_RDONLY);
- read(): Reads a specified number of bytes from the file associated with the file descriptor into a buffer. It returns the number of bytes actually read. Example: n = read(fd, buffer, 1024);
- write(): Writes data from a buffer into the file associated with the file descriptor. It returns the number of bytes successfully written. Example: n = write(fd, "Hello", 5);
- lseek(): Repositions the file offset of the open file description associated with the file descriptor, allowing for random access or non-sequential reading/writing. Example: lseek(fd, 10, SEEK_SET);
- close(): Terminates the association between the file descriptor and the file, releasing the resources held by the kernel for that file. Example: close(fd);
Explain any three text processing commands with examples.
Answer
Text processing commands are essential for manipulating and analyzing data within files. Three common commands are:
- grep: Searches for a specific pattern or string within a file and prints the matching lines. Example: grep 'error' logfile.txtsearches for all occurrences of 'error' in logfile.txt.
- sed: A stream editor used for parsing and transforming text, such as substituting strings. Example: sed 's/old/new/g' file.txtreplaces all instances of 'old' with 'new' in file.txt.
- awk: A powerful pattern scanning and processing language used for data extraction and reporting. Example: awk '{print $1}' data.txtprints only the first column of each line in data.txt.
Discuss about any three file manipulation commands with their functions and examples.
Answer
Sign in to view the complete answer paper.
What is a Scheduler and discuss about its services.
Answer
Sign in to view the complete answer paper.
What are the different types of scheduling strategies used in RTOS? Explain briefly.
Answer
Sign in to view the complete answer paper.
Define a task? What are the various operations performed on a task? Discuss.
Answer
Sign in to view the complete answer paper.
Discuss about multiple tasks and their synchronization model using semaphores.
Answer
Sign in to view the complete answer paper.
Explain the I/O subsystem with RTOS examples.
Answer
Sign in to view the complete answer paper.
Write briefly about signals.
Answer
Sign in to view the complete answer paper.
List out the various function calls for managing signals and explain briefly.
Answer
Sign in to view the complete answer paper.
What is an exception? How to handle an exception? Explain the process of handling exception.
Answer
Sign in to view the complete answer paper.
Explain the interrupts, spurious interrupts with examples.
Answer
Sign in to view the complete answer paper.
Give an overview of RT Linux.
Answer
Sign in to view the complete answer paper.
Explain the case study of Appliance Control by RT Linux System.
Answer
Sign in to view the complete answer paper.