Unit-1 Os
Unit-1 Os
1
2. Time-Sharing Operating System: Allows multiple users to share CPU time.
Example: Unix servers. Use: Multi-user environments.
3. Real-Time Operating System (RTOS): Ensures tasks meet strict deadlines.
Example: Air traffic control. Types: Hard and soft real-time.
4. Distributed Operating System: Manages networked computers as a single sys-
tem. Example: Googles cloud infrastructure. Use: Cloud computing.
5. Multiprogramming Operating System: Runs multiple programs concurrently.
Example: Browser and music player on a PC. Use: Desktops.
6. Multiprocessing Operating System: Uses multiple CPUs for parallel execution.
Example: Windows on multi-core PCs. Use: High-performance systems.
7. Embedded Operating System: Designed for specific hardware. Example: FreeR-
TOS in smartwatches. Use: IoT devices.
8. Mobile Operating System: Optimized for mobile devices. Example: Android,
iOS. Use: Smartphones.
plane flight control. Soft real-time: Video call with minor lag.
2
• Fair Scheduling: Uses round-robin. Example: Unix servers.
2. Real-Time Operating System:
• Deterministic Timing: Meets strict deadlines.
• Priority-Based Scheduling: Critical tasks run first.
• Reliability: Consistent performance.
• Minimal Overhead: Lightweight design. Example: Car ABS systems.
3. Distributed Operating System:
• Resource Sharing: Shares resources across networked computers.
• Transparency: Appears as a single system.
• Scalability: Easily expandable.
• Fault Tolerance: Continues if some nodes fail. Example: Google cloud.
Example: Interactive: Booking a flight online. Batch: Processing monthly utility bills.
3
Aspect Multiprogramming System Time-Sharing System
Definition Multiple programs run concur- Multiple users share CPU time
rently in memory. slices.
Goal Maximize CPU utilization. Quick response for users.
User Interaction May or may not involve interac- Highly interactive.
tion.
Example Browser, antivirus, music player Unix server with multiple users.
on PC.
Scheduling Switches when a program waits. Fixed time slices.
Focus Resource efficiency. User responsiveness.
4
Q.10. Explain the Term: Multi-threading
Multi-threading divides a process into multiple threads running concurrently, sharing
resources. Example: A browser with threads for loading pages and playing videos. Fea-
tures: Thread-safe, concurrent execution. Advantages: Faster tasks, efficient resource
use. Disadvantages: Complex programming, potential crashes.
5
Advantages:
• Modularity: Easy to design and maintain.
• Abstraction: Hides complex details.
• Debugging: Issues isolated to layers.
• Reusability: Layers reusable in other systems.
Disadvantages:
• Performance Overhead: Inter-layer communication delays.
• Complex Design: Defining layer boundaries is hard.
• Inflexibility: Adding features affects multiple layers.
• Dependency: Lower-layer faults impact all above.
Example: THE Operating System (Dijkstra).
6
5. User Interface: Provides GUI/CLI. Example: Clicking folder icons.
6. Security: Protects via authentication. Example: Login passwords.
7. Networking: Manages network connections. Example: Wi-Fi access.
8. Error Handling: Resolves system errors. Example: Printer error messages.
7
Q.19. Explain in Detail About Monolithic and Micro-
kernel System
• Monolithic Kernel: Includes all services in one module. Example: Linux. Ad-
vantages: Fast, efficient. Disadvantages: Complex, less reliable.
• Microkernel: Minimal kernel with services in user mode. Example: QNX. Advan-
tages: Reliable, modular. Disadvantages: Slower, complex communication.
Comparison:
8
2. exec(): Replaces process memory with a new program. Example: Running ‘grep‘
in a child process.
3. wait(): Parent waits for child termination. Example: Shell waiting for command
completion.
4. exit(): Terminates process. Example: Program ending with ‘exit(0)‘.
Example: Process Switch: Alt-tabbing apps. Mode Switch: File access via kernel.