operating systems Flashcards

(28 cards)

1
Q

What are the key services an operating system provides?

A

• User Interface (CLI, GUI, Batch)
• Program execution
• I/O operations
• File-system manipulation
• Communication
• Error detection
• Resource allocation
• Accounting
• Protection and Security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What types of user interfaces do operating systems typically offer?

A

• Command-Line Interface (CLI)
• Batch interface
• Graphical User Interface (GUI)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is program execution in the context of OS services?

A

• The ability to load and run programs in memory
• Handle normal and abnormal termination
• Manage resources for execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the operating system do in terms of I/O operations?

A

• Provides an interface to I/O devices
• Facilitates data exchange with files and peripherals
• Prevents direct device manipulation by users

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does an OS facilitate file-system manipulation?

A

• Allows creation, deletion, reading, and writing of files
• Manages directories and permissions
• Provides search and metadata access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe how OS handles communication between processes.

A

• Shared memory or message passing
• Inter-process or inter-system communication
• Handled via OS for data integrity and synchronization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is error detection in operating systems?

A

• Identifying and handling hardware/software errors
• Includes power failure, memory issues, invalid instructions
• OS may terminate or recover processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is resource allocation in OS?

A

• Distribution of CPU time, memory, and I/O devices
• Done for concurrent users/processes
• May involve specific or general allocation algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the role of the command interpreter or shell?

A

• Accepts user commands and executes them
• May be part of the kernel or user-level system program
• Examples include BASH, cmd.exe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do batch files relate to OS?

A

• Scripts containing CLI commands
• Automate tasks
• Used in system diagnostics, automation, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the three major APIs for system calls.

A

• Win32 API (Windows)
• POSIX API (UNIX-based)
• Java API (Java VM)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How are system calls typically invoked?

A

• Programs use API functions
• System call number passed to OS kernel
• Kernel executes the call and returns status/result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some common types of system calls?

A

• Process control
• File manipulation
• Device management
• Information maintenance
• Communication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are system programs?

A

• Utilities that provide a programming environment
• Examples: File managers, compilers, loaders, device drivers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a process in operating systems?

A

• A program in execution
• Needs resources like memory, CPU, files
• Can be user or system process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a process composed of?

A

• Text: Program code
• Stack: Temporary data
• Data: Global variables
• Heap: Dynamically allocated memory

17
Q

What are the different states of a process?

A

• New
• Running
• Waiting
• Ready
• Terminated

18
Q

What is the Process Control Block (PCB)?

A

• Data structure storing information about a process:
- Process state, program counter, CPU registers
- Scheduling info, memory info, I/O status

19
Q

When is the PCB updated?

A

• Whenever a process changes state
• During interrupts, scheduling, or completion of tasks

20
Q

What are the three major process scheduling queues?

A

• Job queue: All processes in system
• Ready queue: Processes in memory ready to execute
• Device queue: Processes waiting for I/O devices

21
Q

What does the short-term scheduler do?

A

• Chooses next process to run
• Runs frequently (e.g., every few ms)
• Allocates CPU to processes

22
Q

What is the role of the long-term scheduler?

A

• Decides which processes to bring into ready queue
• Runs less frequently
• Controls multiprogramming level

23
Q

Differentiate between I/O-bound and CPU-bound processes.

A

• I/O-bound: More time in I/O, short CPU bursts
• CPU-bound: Long CPU usage, few I/O operations

24
Q

Where does the operating system sit in the architecture?

A

Between system/application programs and computer hardware

25
What are some system/application programs in the diagram?
Compiler, assembler, text editor, database system
26
Which layer handles file systems and communication?
Services layer under system calls
27
What components make up a PCB?
State, process number, PC, registers, memory limits, open files
28
Why is the PCB essential for scheduling?
Stores process-specific data needed to resume execution