Assignments Flashcards
What are the three primary reasons for an Operating System?
Manage hardware and resources, Provide a user interface, Run and manage applications
privileged instructions
- switch from user to kernel mode
- set the value of a timer
- clear memory
- turn off interrupts
- modify entries in a device status table
- Access I/0 device
Give two reasons why caches are useful
-Caches are useful when two or more components need to exchange data, and the components perform transfers at differing speeds.
-A cache allows a device to run faster.
In order for a cache to be useful, cache _________ must be ensured so that every copy of the datum has a valid up-to-date value.
coherency
Rank the following storage systems fromslowesttofastest
- magnetic tapes
- optical disk
- hard drive disk
- nonvolitile memory
- main memory
- cache
- registers
What is the purpose of interrupts
to change the sequence of instructions executed on the processor.
Direct Memory Access (DMA) is used to offload the CPU when transferring data to and from high-speed I/O devices. How does the CPU coordinate with the device to initiate a DMA transfer?
- The CPU writes values such as the memory address, byte count, and transfer direction into special registers accessible by the DMA controller
- The CPU initiates the transfer, and the DMA controller manages the actual data transfer without requiring the CPU’s involvement.
How does an interrupt differ from a trap?
- interrupts are asynchronous, meaning they can occur at any time, while traps are synchronous and occur during the execution of specific instructions.
- An interrupt is triggered by external hardware events, while a trap is generated by a software or internal event.
What are some key challenges in designing operating systems for mobile devices compared to designing operating systems for traditional PCs?
- Mobile operating systems need to accommodate a wide variety of sensor inputs (such as GPS, accelerometers, and touchscreens) not typically found on traditional PCs.
- Mobile operating systems need to manage more constrained resources, such as battery life, memory, and processing power, compared to traditional PCs.
Match the arguments with whether they support or oppose including applications such as web browsers and mail programs in the operating system.
-Bundling applications ensures better integration with the OS : In favor
- Reduces flexibility and user choice: Opposed
- Simplifies installation and maintenance for users. In Favor
- Can lead to unfair competition for third-party developers: Opposed
- Increases the OS size and complexity, potentially reducing performance: Opposed
- Provides users with essential tools out of the box: In favor
How do clustered systems differ from multiprocessor systems?
Clustered systems are designed primarily for increasing reliability and scalability, whereas multiprocessor systems are primarily used to enhance processing power and performance through parallel processing.
- Clustered systems consist of multiple independent computers (nodes) connected via a network, while multiprocessor systems use multiple CPUs within a single computer sharing the same physical resources like memory and storage.
- In clustered systems, each node operates independently with its own resources, while in multiprocessor systems, CPUs share memory and input/output devices.
What is required for two machines in a cluster to cooperate in providing a highly available service?
-A shared storage system or data replication must be implemented to ensure that both machines have access to the same data and can continue functioning if one fails.
- There must be a mechanism for detecting failures and automatically transferring services from the failed machine to the operational one to maintain availability.
How does a trap to the operating system interact with the CPU’s bit mode, and what role does bit mode play in handling such traps?
A trap, which is a type of synchronous interrupt triggered by an exceptional condition or system call, is handled differently based on the CPU’s bit mode, where user mode and kernel mode operations are distinguished by the bit mode settings.
The services and functions provided by an operating system can be divided into two main categories. Which of the following correctly describes these two categories and explains how they differ?
User Services vs. Kernel Services:
User services provide functionalities like file management and user interfaces, while kernel services manage hardware resources such as CPU scheduling and memory management.
Operating systems use different methods for passing parameters during system calls. Which of the following are valid methods for passing parameters to the operating system?
Pass Parameters in Registers:
The parameters are stored in CPU registers, and the operating system retrieves them directly during the system call
- Pass Parameters on the Stack:
Parameters are pushed onto the system stack, and the operating system pops them off to retrieve the necessary data during the system call.
- Pass Parameters Using Memory Block:
The parameters are stored in a block of memory, and the address of this block is passed to the operating system. The OS accesses the block to retrieve the parameters.