0
0
Operating Systemsknowledge~30 mins

OS types (batch, time-sharing, real-time, distributed) in Operating Systems - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding OS Types: Batch, Time-Sharing, Real-Time, and Distributed
📖 Scenario: You are learning about different types of operating systems used in computers and devices. Each type has its own way of managing tasks and users.
🎯 Goal: Build a simple data structure that lists four types of operating systems with a short description for each. Then, add a filter to select OS types based on a keyword. Finally, create a summary list of OS types that match the filter.
📋 What You'll Learn
Create a dictionary named os_types with keys as OS type names and values as their descriptions.
Create a variable named filter_keyword to hold a word to filter OS types.
Use a dictionary comprehension to create a new dictionary filtered_os containing only OS types whose descriptions include the filter_keyword.
Create a list named filtered_os_names containing only the names of the filtered OS types.
💡 Why This Matters
🌍 Real World
Understanding different operating system types helps in choosing the right OS for specific tasks like managing multiple users, handling real-time data, or coordinating multiple computers.
💼 Career
Knowledge of OS types is important for IT professionals, system administrators, and software developers to optimize system performance and resource management.
Progress0 / 4 steps
1
Create the OS types dictionary
Create a dictionary called os_types with these exact entries: 'Batch' with description 'Processes batches of jobs without user interaction', 'Time-Sharing' with description 'Allows multiple users to share system resources simultaneously', 'Real-Time' with description 'Processes data and events within strict time constraints', and 'Distributed' with description 'Manages a group of independent computers as a single system'.
Operating Systems
Need a hint?

Use curly braces {} to create the dictionary and separate each key-value pair with a comma.

2
Add a filter keyword
Create a variable called filter_keyword and set it to the string 'time' to filter OS types whose descriptions contain this word.
Operating Systems
Need a hint?

Assign the string 'time' to the variable filter_keyword.

3
Filter OS types by keyword
Use a dictionary comprehension to create a new dictionary called filtered_os that includes only the OS types from os_types whose descriptions contain the filter_keyword. Use filter_keyword.lower() and description.lower() to make the search case-insensitive.
Operating Systems
Need a hint?

Use a dictionary comprehension with for os, desc in os_types.items() and check if filter_keyword.lower() is in desc.lower().

4
Create a list of filtered OS names
Create a list called filtered_os_names that contains only the keys (OS type names) from the filtered_os dictionary.
Operating Systems
Need a hint?

Use list() and filtered_os.keys() to get the list of OS names.