St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad DEPARTMENT OF INFORMATION TECHNOLOGY Academic year

Similar documents
INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

UNIT I Linux Utilities

UNIT I Linux Utilities and Working with Bash

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur QUESTION BANK

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

CSC209 Review. Yeah! We made it!

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) DUNDIGAL, HYDERABAD

PROGRAMME: COMPUTER SCIENCE & ENGINEERING COURSE: Operating System Lab SEMESTER: VI CREDITS: 2

CL020 - Advanced Linux and UNIX Programming

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING

ST.MARTIN'S ENGINEERING COLLEGE Dhulapally,Secunderabad-014

INSTITUTE OF AERONAUTICAL ENGINEERING

MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD QUESTION BANK

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE) UNIT I OPERATING SYSTEMS

Advanced Programming in the UNIX Environment W. Richard Stevens

PESIT Bangalore South Campus

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR / ODD SEMESTER

Department of Computer Science and Technology, UTU 2014

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

PROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2.

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Lecture 17. Log into Linux. Copy two subdirectories in /home/hwang/cs375/lecture17/ $ cp r /home/hwang/cs375/lecture17/*.

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC-2017

Design Overview of the FreeBSD Kernel CIS 657

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

LINUX INTERNALS & NETWORKING Weekend Workshop

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

NETWORK PROGRAMMING AND MANAGEMENT 1 KINGS DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK

INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

DEPARTMENT OF COMPUTER APPLICATIONS SRM INSTITUTE OF SCIENCE AND TECHNOLOGY SRM NAGAR, KATTANKALATHUR

TUTORIAL QUESTION BANK

(MCQZ-CS604 Operating Systems)

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Overview. Over the next four weeks, we will look at these topics: Building Blocks. Advanced Authentication Issues.

Unix Processes. What is a Process?

Software Development & Education Center

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

Operating System Structure

Interprocess Communication. Originally multiple approaches Today more standard some differences between distributions still exist

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS

Processor : Intel Pentium D3.0 GigaHtz

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year

Pipes and FIFOs. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Department of Computer Science and Technology

Linux System Administration

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Problem Set: Processes

CPS 310 first midterm exam, 2/26/2014

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo

Building blocks for Unix power tools

Exam Guide COMPSCI 386

Operating Systems. Review ENCE 360

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

Advanced Unix Concepts. Satyajit Rai

Babu Madhav Institute of Information Technology, UTU

CS 385 Operating Systems Fall 2011 Homework Assignment 5 Process Synchronization and Communications

APPLIED INFORMATICS Processes. Bash characteristics. Command type. Aliases.

MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534

Process. Program Vs. process. During execution, the process may be in one of the following states

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Operating System Labs. Yuanbin Wu

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Process Management! Goals of this Lecture!

SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized)

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476

W4118 Operating Systems. Junfeng Yang

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

PROCESSES. Jo, Heeseung

Processes. Jo, Heeseung

bash, part 3 Chris GauthierDickey

Interprocess Communication Mechanisms

shared storage These mechanisms have already been covered. examples: shared virtual memory message based signals

CS2028 -UNIX INTERNALS

CS631 - Advanced Programming in the UNIX Environment Interprocess Communication I

Name of chapter & details

Chap 4, 5: Process. Dongkun Shin, SKKU

INSTITUTE OF AERONAUTICAL ENGINEERING (AUTONOMOUS)

Midterm Exam CPS 210: Operating Systems Spring 2013

Module A: The FreeBSD System

Module A: The FreeBSD System

Process Control. Philipp Koehn. 23 April 2018

Operating Systems. II. Processes

Processes. CS439: Principles of Computer Systems January 30, 2019

Processes and Threads

Process Management 1

Transcription:

St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad-000 DEPARTMENT OF INFORMATION TECHNOLOGY Academic year 0-0 QUESTION BANK Course Name : LINUX PROGRAMMING Course Code : A0 Class : III B. Tech I Semester Branch : Information Technology Year : 0- Course Coordinator : Mrs.M.Divya Sai, Assistant Professor,IT Course Faculty : Mrs.M.Divya Sai, Assistant Professor,IT OBJECTIVES To meet the challenge of ensuring excellence in engineering education, the issue of quality needs to be addressed, debated and taken forward in a systematic manner. Accreditation is the principal means of quality assurance in higher education. The major emphasis of accreditation process is to measure the outcomes of the program that is being accredited. In line with this, Faculty of Institute of Aeronautical Engineering, Hyderabad has taken a lead in incorporating philosophy of outcome based education in the process of problem solving and career development. So, all students of the institute should understand the depth and approach of course to be taught through this question bank, which will enhance learner s learning process. S. No QUESTION UNIT- Blooms Taxonomy Level Course Outcome Linux Utilities and Shell Programming. List the advantages of Linux Programming?. List all unix operating system releases?. Explain which command is used to get details of any command?. Discuss how do you display last 8 lines of the employee.txt file contents?. Write a command to find all the files modified in less than days and print the record count of each.. Explain significance of 'tee' command.. Explain which character is used to search a pattern in the beginning of each line using grep command? 8 Given a file, replace all occurrence of word "ABC" with "DEF" from th line till end in only those lines that contains word "MNO". 9. Give examples for command substitution. 0. Explain how can you set the read, write permissions to all users on every file which is created in the current session?. Explain which operator is used for piping? P a g e

S. No QUESTION Blooms Taxonomy Level Course Outcome. Discuss how will you emulate wc -l using awk?. Distinguish symbolic link and hard link Apply. Explain how to print the 0th line in a file using sed?. Explain how will you find the total disk space used by a specific user?. Explain briefly about shells available in Unix.. Define Unix shell. Explain shell environment. 8. How to remove duplicate lines from a file using sort? Remember 9. Write a shell script to dis lay first n numbers of Fibonacci series. Apply 0. List shell responsibilities in Linux?. Define shell script in Linux System?. Discuss standard streams in Linux S. No QUESTION Blooms Taxonomy Course Level Outcome. Explain the salient features of Unix operating system.. Discuss elaborately the unix kernel architecture with neat block diagram.. Discuss file attributes? Explain how to change basic file permissions with examples.. Explain the grep command with the help of an example. Mention some options that are permitted to use with it and the purpose of these options.. Discuss the permissions that are associated with Unix files on their creation? example, show any two different ways of changing these permissions to required values.. Differentiate between Hardlinks and symbolic links with an example Apply. Create a file file, display the column from to, and file consists of roll number, name, designation, department, salary and date of joining, each field is separated with pipe ( ). 8 Write an awk program to print the fields and of a file that is passed as a command line argument. The file contains lines of information that is separated by "," as dellimer. The awk program must print at the end the average of all th field data. 9. Write a command to display the lines which ends with letter t and starts with c and total Characters. 0. Give an example and explain following commands : cat, cp, rm, wc. Create a file-file employee which stores ename, epid, designation, salary. Write a command to display the details ename, epid, and salary whose designation is Manager of given file-file.. Create file file and store 0 lines of content. Write a command to display content in descending order of given file-file.. Create file file and store names of students. Analyze and display the content in descending order and also display number of lines in file.. Analyze and search for manager in employee file and display all details of employee.. Write a shell script to create a menu, which displays the list of files, current date, process status and current users of the system.. Write a shell program to read two non-negative numbers from command line argument $ and $ and compute $ to the power of $. For example $$. Write a shell script to read starting number and ending number and display prime numbers in between two numbers using shell script. For eg. to 0 is,, 9 Apply Apply Analyze Analyze P a g e

S. No QUESTION Blooms Taxonomy Course Level Outcome 8. Define shell script? How shell programs are executed? Write a note on read statement. 9. Draw a neat diagram and explain the relationship between the kernel and shell of the UNIX Operating system. 0. CAT command is used to display content of file, Write a C program to implement CAT Command using system calls.. Write in detail the features of test command.. Write briefly about case control structure in sh with examples. Write briefly about " " operator in sh.. Discuss the command expansion features provided in sh with examples. Illustrate different methods of providing input values to a shell script and Apply explain.. Write a program to read a value 0, b value and positive integer value n from standard input stream. Display Fibonacci series to standard output stream Apply using shell script.. Write a shell script to read a file name and convert the content of a file to uppercase letters Apply. Write a program to read Positive integer number num and find sum of individual digits using shell script. (eg. =9). Apply 8. Write a shell script to create a file which consists of 0 lines and display all the lines in between and 8 line. Apply UNIT-II FILE AND DIRECTORY SYSTEM CALLS. Define file descriptor and file pointer?. Define the use of sticky flag?. Explain the meaning of. and.. with respect to directory?. Write parameter which limits the use of number of files that can be opened by a user process?. Illustrate different types of locks can apply on file. Apply. Discuss the two components of the directory file?. Discuss to count the number of directories in the directory tree /home/mca0? 8 Illustrate calloc( ) and malloc( ) functions? Apply 9. Discuss setjmp( ) and longjmp( ) functions? 0. Define the structure used to set lock on a specified region of a file.. Explain about realloc() system call with syntax.. Define deadlock with example?. Explain the differences between fgets, gets system call.. What is fcntl function? What is the purpose of using it? Remember. What is the difference between internal and external commands? Remember. Write the syntax of fflush system call give an example. Apply. What are fflush and fseek functions? Explain. Remember 8. Write the syntax of creat function. Apply 9. Differentiate between stat, fstat and lstat functions Remember 0. Write about unlink system call and give an example. Apply P a g e

. Write a c program to read a directory and display all the files in the given directory.. Explain the following functions with syntax: (a) stat() (b) read() (c) open() (d) fstat(). List and briefly describe the functionalities of standard i/o library.. Discuss the characters that are used as wild cards by the shell. Explain their meaning and illustrate their usage. Write a note on character class.. Explain about memory management functions malloc(), calloc(), realloc(), free() with suitable example.. Write a C program for wc command using system calls or library functions.. Display line number before each line of file - file. Analyze and Implement nl command in C language. Analyze 8 Write a C Program to simulate mv command. Apply 9. Write a C Program to simulate ls command. Apply 0. Write a C program to simulate cp command. Apply. Display line number before each line of file - file. Analyze and Implement nl command in C language. Analyze UNIT-III PROCESS AND SIGNALS. Explain process ID of init process?. Discuss return values of the fork( ) function call?. Illustrate difference between fork() and vfork()? Apply. Define daemon processes?. Define Zombie process? How can we know the status of zombie process?. Write the difference between reliable and unreliable signals.. Illustrate the difference between zombie process and orphan process? Apply 8 Explain the use of wait() and waitpid() functions. 9. Explain signal() function and how to handle signal? 0. Distinguish between alarm(), sleep(), pause() functions? Apply. Explain how to terminate process normally or abnormally?. What is a process. Remember. Write the syntax of following functions. Explain each argument. * kill raise alarm exit Apply. Explain difference between threads and process.. Write the system calls for process termination in detail. Apply. Write a program to find sum of odd numbers by child process and sum of even numbers by parent processes of given range numbers using fork function.. Explain difference between zombie processes and orphan process with example.. Explain the function of following signals i) SIGQUIT ii) SIGCHLD iii) SIGHUP. (a) Write in detail about the interrupted system calls.. Suppose a process does not wish to block until its children terminate. How can it ensure that child processes are cleaned up when they terminate? P a g e

. Define region lock? What are the rules about the specification of the region to be locked or unlocked?. Write about F GETLK, F SETLK and F SETLKW 8 Explain how fcntl API can be used for file and record locking 9. Write a note on process table and process scheduling. 0. Write the difference between pause(), sleep(), abort() function systems calls.. What is a deadlock? Discuss the reasons for the deadlock.. Write about the kill and raise functions.. Write a C program to illustrate exec( ) function. Apply. Define Signals. What do you mean by Unreliable Signals? Explain.. Explain the following with example: (a) Process Creation (b) Process Termination (c) Signal function (d) Reliable signals.. Signal handlers are used to catch the signal and do some action after catching signal. So, catch signal SIGINT and call function to solve and display fibonacci series of given number.. Write a program to create a new process (using fork()) and find Armstrong number by child process, sum of individual digits of given number by parent process in c language. 8. Write a program to create a new process (using fork()) and find factorial of given number by child process, sum of n numbers of given number by parent process in c language. UNIT-IV INTER PROCESS COMMUNICATION (Same Host) Apply Apply Apply. Define Inter Process Communication (IPC) in Linux System?. Write few Inter Process Communication mechanisms.. Discuss which is best Inter Process Communication for exchange information? Why?. Explain the use of FIFO file?. Define mknod( ) function in UNIX?. Illustrate difference between pipe and named pipe? Apply. Define message queue. 8 Draw the structure of message queue for storing messages in message queues. 9. Discuss limits on messages queue. 0. Explain how to create and remove messages from message queue?. Define semaphore?. Explain the use of semctl() function and write various operations on semaphore?. Explain the use of binary semaphore?. Explain semop() function with arguments in semaphores. Write about popen, pclose library functions. Apply. Define FIFOs? How they are different from pipes? Give an example application where FIFO can be used.. Write a program to read message hello from process and write to fifo file. P a g e

Read message from fifo file written by process and display to output terminal by process. Implement one way communication using fifos.. Write a c program to send and receive message using pipes. Implement two way communication using pipes.. Describe pipe? Discuss the parent and child processes.. Distinguish between pipes and named pipe. Apply. Write a program to read a value n from standard input at sender side and send to receiver to find reverse of given number, Receiver receives the number n and finds reverse of given number and sends result to sender. Implement two way communication using pipe s.. Illustrate difference between pipes and message queues IPC. Apply 8 Write a c program to send messages by sender and read messages by receiver using same message queue id. Implement one way communication using message queues. 9. Explain about the Message Queue structures in the Kernel with an example, and explain in detail about the process of Reading a Message from the Queue. 0. Write a c program to send and receive message using pipes. Implement two way communication using pipes.. Read message HELLO at sender side and send to receiver through pipe. Receiver reads and display at receiver side. Analyze and Implement one way communication using fifos. Analyze. Write a program demonstrating, handling of sum of n integers done by a child process and send result to the parent process using fifos. Parent read result from fifo and display to the standard output stream. Apply. Write three messages to new message queue and give its priority / type of message number in sequence, 9, by sender. At receiver side only read whose message has priority / type is 9. Apply. Analyze and Create employee file with field eid, ename, designation, salary each field is separated with pipe( ). Display part of information i.e eid, salary of all employees using unix commands. ii. Count and display of employee in employee file using unix command iii. Search for manager in employee file and display all details ofemployee. Analyze. Explain about the Kernel data structure for a semaphore set. Write about the semaphore adjustment on exit. Explain about the importance of SEM UNDO.. Define semaphores? What is their purpose? List and explain the APIs used to create and control the semaphores. UNIT-V INTER PROCESS COMMUNICATION USING SOCKETS. Write the advantage of shared memory.. Explain how to handle shared memory in IPC.. Discuss how to attach and detach to shared memory.. Explain shmctl() function with arguments in shared memory.. Discuss how to control shared memory with semaphores?. Define socket and write the proto type of socket system call.. Explain the use of bind() in socket programming 8 Discuss which protocol is used by TELNET programme? 9. Discuss wellknown ports. 0. Write primitive is used by server for waiting the client connection requests.. Draw the structure of TCP/IP for exchange information between client and server.. List the attributes in socket address functions P a g e

. Define connect primitive. Discuss accept() function.. Define internet IPV socket address structure.. Distinguish between IPV and IPV. Apply Explain return type of listen() function? 8. Write about getsockopt, setsockopt functions Apply. Define Shared memory? What are the various functions implemented in shared memory. Explain in brief about each function.. Explain how to control, attach and detach a shared memory segment.. Explain which function is required to establish and disconnect the connection between client and server using socket primitives?. List and briefly discuss the ports and addresses supported by socket address function.. Explain each Elementary Socket Functions illustrate in TCP/IP socket API.. Write a program to design a UDP client-server application which takes file name as input in client side and transfers the file to the server.. Define socket? With the help of socket write a simple client / server application for verifying user authenticity. 8 Explain in detail about byte ordering and manipulation functions. 9. Write a program to design a TCP client server application which takes IP address, Port number and string to be echoed as command line inputs in client application and implements echo service. 0. Write a program to implement TCP client server application in which client takes an integer value from the command line and sends to the server. Server returns the factorial of the received integer value to the client.. List well-known ports? List some well-known ports.. Write a program to implement UDP client server application in which client takes an file name from the command line and sends to the server. Server returns the content of received file to the client.. Write a C program to illustrate the process of creating socket, initializing the socket address structure and establishing a connection from client to the server. Assume the server IP address as 0.0.. and port number = 8000. The client Apply after establishing a connection should send Hello World message and wait for a reply of reverse of same string.. Read a value n from standard input at sender side and send to receiver to find power(n,), Receiver receives the number n and finds power(n,) and sends result to sender. Analyze and Implement two way communication using UDP Analyze Prepared By: Mrs. M. Divya Sai HOD, IT P a g e