OS WITH LINUX QUESTION BANK
Q1) What is PCB? Explain with diagram.
Q2) Explain process states and various schedulers.
Q3) What is interprocess communication? What are cooperating processes?
Q4) Differentiate between different types of os (multiprogramming,
multitasking, real time, distributed, multiprocessing).
Q5) Compare and Contrast monolithic and microkernel
Q6) Explain different operations on process. Explain services of operating
systems.
Q7) Explain the three modes of VI editor. How do you write, save and execute a
script in Vi?
Q8) What are necessary conditions for the deadlock and What do you mean by
circular wait condition in deadlock?
Q9) What are scheduling criteria? Given the following set of processes along
with their data.
Compute average waiting time and average turnaround time for each
process for preemptive SJF and Round Robin algorithm.
Processes CPU bursts Arrival time in ready
queue
P1 8 0
P2 5 1
P3 2 2
P4 4 2
Assume context switch overhead is 1-time units and the time quantum
for round robin is 2-time units.
Q10) Describe the role and importance of Critical Regions/ Sections.
Q11) What is an Operating System? Explain the components and architecture
of
OS using diagram.
Q12) List the differences between Internal Fragmentation and external
Fragmentation.
1
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies
OS WITH LINUX QUESTION BANK
Q13) What are semaphores? How it solves critical section problem?
Q14) Why does the page size is of 2n.
Q15) List the necessary and sufficient conditions of deadlock.
Q16) Differentiate between process and threads.
Q17) List the differences between preemption and non-preemption.
Q18) What is process synchronization?
Q19) How do you avoid deadlock? Explain the recovery process from
Deadlock?
Q20) Define Multiprogramming. Explain architecture of Linux and also
directory structure of Linux.
Q21) Discuss about safe state and usefulness of safety algorithm for Deadlock
avoidance.
Q22) Describe the state transition model in which few states resides in
secondary memory. Also describe the use of these states.
Q23) List the disadvantages of paged memory management techniques and
segmentation memory management techniques.
Q24) A variable partition memory system has given partition size – 30K, 50K,
10K, 5K, and 20K. A new process of 15K is to be loaded. Which partition
would be appropriate using first fit, best fit and worst fit techniques. Explain
your answer in detail.
Q25) What is buffering?
Q26) List the disadvantages of Index allocation strategy
Q27) Define thrashing.
Q28) List the differences between Linux Operating System and Windows XP
operating system in view of operating system’s resources.
2
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies
OS WITH LINUX QUESTION BANK
Q29) Write short note on :-
(a)Cryptography
(b) Block Multiplexing
(c) Belady’s Anomaly
(d) System Calls
Q30) What is an interrupt?
Q31) What are the distinctions between internal and external
fragmentation?
Q32) List three advantages of user level threads over kernel level threads.
Q33)
Q34) What are the differences among deadlock avoidance, detection and
prevention?
Q35)
Q36) What is a file control block?
Q37) What are different file attributes and file operations in a typical file
System?
Q38) A process contains eight virtual pages on disk and is assigned a fixed
allocation of four page frames in main memory. The following page
trace occurs
1,0,2,2,1,7,6,7,0,1,2,0,3,0,4,5,1,5,2,4,5,6,7,6,7,2,4,2,7,3,3,2,3
Show the successive page residing in the four frames using LRU
replacement policy. Compare the hit ratio in main memory.
Q39) Discuss the hardware support required to support demand paging?
Why is the principle of locality crucial to the use of virtual memory?
Q40) Explain the methods for deadlock prevention.
3
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies
OS WITH LINUX QUESTION BANK
Q41) Consider the following snapshot of system:
Allocation Max Available
ABCD ABCD ABCD
P0 0 0 1 2 0012 1520
P1 1 0 0 0 1750
P2 1 3 5 4 2356
P3 0 6 3 2 0652
P4 0 0 1 4 0656
Answer the following question using the Banker’s algorithm:
(i) What is the content of Need Matrix?
(ii) Is system in a safe state?
(iii) If a request from process P1 arrives for (0, 4, 2, 0) can the request be
granted immediately.
Q41) What is the Disk Structure? What are different Disk Management
Methods?
Q42) Explain RAID Structure.
Q43) List the advantages and disadvantages of sequential file access method
and
direct access method (or Relative access method)
Q44) Compare the different directory structure implementation in a file system.
Q45) Explain the disk allocation methods for a file system giving the
efficiencies
of each.
Q46) How free space is managed in a file system.
Q47) Explain difference between dedicated, shared and virtual devices.
Q48) What is belady anamoly and page size anamoly? Discuss with an
example.
Q49) How can semaphores be used as general synchronization tool.
4
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies
OS WITH LINUX QUESTION BANK
Q50) What advantages semaphore has as compared to hardware test and set
instructions?
LINUX COMMANDS
1) ALL COMMANDS DONE IN Practicals
LINUX QUESTIONS
Q 1 What is the role of free software foundation in the development of Linux? Who
developed the Linux kernel?
Q2 What exactly happens when you enter this sequence. ls > list.txt
Q3 Why is Unix more portable than other operating systems?
Q4 What will be the result of following command
( wc file1.txt ; ls –l file1.txt ) > newfile
Q 5 Briefly explain the features of man command
Q6 What do you understand by multiprogramming, multi user and multi tasking. Does
Unix/Linux support it?
Q7 What is tty command used for?
Q8 What is the difference between uname and hostname?
Q 9What is the difference between who and whoami command?
Q10 ‘whatis’ command is used for?
Q11 Differentiate between absolute and relative paths using a suitable example
Q12 Differentiate between man, apropos and info command
Q 13What is collating sequence? What is the sort order prescribed by the ASCII collating
sequence in Linux for naming file structures?
Q 14Explain the significance of aliases in Linux with a suitable example
Q 15What is the difference between hard links and soft links. Explain in detail including the
commands related to the concept.
5
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies
OS WITH LINUX QUESTION BANK
Q 16 Explain all the techniques to compress and decompress a file or group of files.
Hint- zip/unzip, gzip/gunzip, bzip2/bunzip2, tar
Q 17 What is meant by recursive behaviour of a command? Name four commands, along
with a suitable example of each that can operate recursively?
Q 18What is the difference between cat foo and cat > foo? Why do you have to use [Cntrl D]
in one and not in the other?
Q19 How do you use tar to add two files, foo.html and bar.html, to an archive and then
compress the archive? How will you reverse the entire process and extract the files in their
original uncompressed form?
Q20 How is chown different from chgrp on a BSD- based system when it comes to
renouncing ownership?
Q 21 What is the difference between chmod and umask. Explain in detail with example
Q 22 Explain briefly the output of ls –l command for a particular file and directory. Hint- 7
columns
Q 23Assuming that a file’s current permissions are rw-r-xr--, specify the chmod expesseion
required to change them to
1. Rwxrwxrwx 2) r—r---- 3) –r—r— 4) ----------
Using both relative(alphabetically) and absolute(numeric) of assigning permissions
Q 24Show the octal representation of these permissions rw-r----, --x-w-r--, rwxrxrw
Q 25What will the permissions string look like for these octal values?
1. 567 2) 623 3) 421
Q26 What is the difference between kernel and operating system. List the functions of
operating system
Q27Explain the differences between ext2,3 and 4 in detail.
Q28 Explain the booting process of linux o.s in detail.
Q29 What is init? What is it used for?
Q30 What are run levels? What is it used for?
Q31 Explain file system structure in detail. Hint- inode, superblock, bootblock, datablock
Q32 What are the basic linux principles
Q33 List advantages and disadvantages of linux.
Q34 List features of linux
6
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies
OS WITH LINUX QUESTION BANK
Q35List differences between windows and linux
Q36 List differences between linux and unix
Q37 How is file security carried out in linux? Hint- types of user, access permissions, access
operators, chmod, umask , chown, chgrp
Q 38 What is a file system? What are the various types of file system.Discuss the various file
attributes on ext2 file system
Q39 Differenciate between ext2, 3 and 4 file systems
Q40 What do you understand by interrupt handling
Q41 What is system call in linux ?
Q42 Write a shell program to display the user who logged into the system.
Q43Write a shell script to calculate the factorial value.
Q44 Write a program that takes a filename along the command line and prints its size
Q45 How will you add and delete a new user in Linux?
Q 46 Which two commands you can use to delete the directories
Q47 Write a shell script which displays name of directories in PATH in one line each
Q 48 What is a pipe? Why do you require nameless pipe.
Q49 Write a shell program to print all files that have read permission only.
Q 50 Write a shell program to accept any three numbers from the command line and print the
largest number
Q51 Wap to add the contents of one file to another
Q52 Wap to print the last five lines from the file
Q53 Write a shell program to print the number of users that are logged in
Q54 What is the difference between inode structure and file structure
Q55 What is the difference between proc and ext2 file systems?
7
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies
OS WITH LINUX QUESTION BANK
8
Ms. Prerna Ajmani
Assistant Professor
School of Information Technology
Vivekananda Institute of Professional Studies