0% found this document useful (0 votes)
2 views

Operating_System_and_Linux_Questions

An operating system (OS) is software that interfaces between hardware and users, managing resources and services. Key concepts include CPU scheduling methods like FCFS and SJF, deadlock handling techniques, virtual memory, file permissions in Linux, and the use of commands for backup and process management. The document also covers the VI editor, environment variables, KILL commands, wildcards, and grep commands.

Uploaded by

mishranike03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Operating_System_and_Linux_Questions

An operating system (OS) is software that interfaces between hardware and users, managing resources and services. Key concepts include CPU scheduling methods like FCFS and SJF, deadlock handling techniques, virtual memory, file permissions in Linux, and the use of commands for backup and process management. The document also covers the VI editor, environment variables, KILL commands, wildcards, and grep commands.

Uploaded by

mishranike03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Operating System and Linux - Long Answers for College Exam

1. What do you understand by Operating System? Draw the difference between

Multi-processing and Multi-tasking systems.

An operating system (OS) is system software that acts as an interface between computer hardware

and the user. It manages hardware resources and provides services for computer programs,

including process management, memory management, and file system management.

Multi-processing vs Multi-tasking:

- Multi-processing: Uses multiple CPUs; true parallel execution; high performance.

- Multi-tasking: One CPU; tasks managed in time slices; enhances responsiveness.

2. What is CPU scheduling? Describe FCFS and SJF with preemption and non-preemption

CPU scheduling algorithms in detail.

CPU scheduling selects a process from the ready queue to run on the CPU.

FCFS: Non-preemptive. Simple but can lead to long waiting times.

SJF: Shortest job first. Preemptive (SRTF) and non-preemptive versions. Lower average waiting

time but risk of starvation.

3. Define deadlock. Explain different methods of handling deadlocks in detail.

Deadlock is when processes wait indefinitely for resources. Methods:

- Prevention: Eliminate deadlock conditions.

- Avoidance: Use Banker's Algorithm.

- Detection & Recovery: Detect and kill processes or preempt resources.

- Ignore: Used in systems where deadlock is rare.

4. What is virtual memory? Explain any two page replacement algorithms with suitable

examples.
Virtual memory allows execution of processes not fully in memory. Uses disk as extended RAM.

Page Replacement Algorithms:

- FIFO: Removes oldest page.

- LRU: Removes least recently used page.

5. How can you change permissions of files and directories in Linux? Also discuss the file

and directory handling commands.

Use chmod command. Example: chmod 755 file.txt

File commands:

ls, cd, mkdir, touch, rm, cp, mv, rmdir

6. What do you mean by Redirection and Piping? Explain its uses in Linux with examples.

Redirection changes input/output: >, <, >>

Piping: Output of one command becomes input to another.

Example: ls -l | grep ".txt"

7(a). What is backup? How backup can be taken in Linux?

Backup is creating data copies for recovery. Tools: cp, tar, rsync.

Example: tar -cvf backup.tar /home/user/

7(b). Who is super user? Explain the duties of super users with commands of LINUX.

Super user (root) has full privileges. Duties: manage users, files, processes.

Commands: sudo, useradd, passwd, chown

8. What do you mean by VI Editor? Explain features & working of VI Editor.

VI is a text editor with three modes: command, insert, and last line.
Commands: i (insert), :wq (save and quit), / (search)

9. Define Kernel

The core of OS; manages hardware and system calls.

10. Environment variables in Linux

Variables that define user environment. Example: PATH, HOME

11. Define KILL commands.

Used to terminate processes. kill PID, kill -9 PID

12. Wildcards

* matches any, ? matches one, [] matches any in set

13. Grep commands

Used to search text. Example: grep 'main' file.c

You might also like