20 Questions
What is the main purpose of an Operating System?
To manage physical and virtual resources
Which of the following is NOT a reason why an Operating System is more convenient than raw hardware?
Less secure
In computer-system operation, what is the role of each device controller?
In charge of a specific device type
Which resources are typically managed by an Operating System?
Input and output devices
What is the primary function of an OS interface in relation to physical machine interface?
Provides a virtual machine on top of hardware
What is the main function of Device controller in an OS?
To perform I/O operations between device and local buffer of controller
What is the primary difference between a Program and a Process in an OS?
A Program is a unit of work within the system while a Process is a program in execution
In the context of an OS, what does the term 'Concurrency' refer to?
How parallel activities are created and controlled
What is the significance of having multiple threads in a single process in an OS environment?
It speeds up the execution of instructions
Why is Process termination important in an Operating System?
To reclaim reusable resources for other processes' use
Which of the following is NOT a key responsibility of the Process Management component in an operating system?
Allocating and managing physical memory for application programs
In a multi-threaded process, how many program counters would typically be required?
As many as the number of threads in the process
Which of the following is NOT considered a major issue in the design of modern operating systems?
Implementing a graphical user interface (GUI)
Which of the following is NOT a typical resource managed by the operating system's Process Management component?
Network bandwidth
Which of the following is NOT a key function of the Device Controller in an operating system?
Executing the instructions of application programs directly
Which of the following statements accurately describes the relationship between the Operating System (OS) and hardware?
The OS provides a virtual machine abstraction layer on top of the hardware.
In the context of an OS managing resources, which of the following is NOT a resource that typically needs to be managed?
Application-level software components
In the context of computer-system operation, what is the primary role of device controllers?
To control and coordinate the operation of a specific type of device.
Which of the following statements best describes the role of an Operating System in providing a well-behaved environment for users?
Defining a set of logical resources and operations on those resources.
In the context of an Operating System, what is the primary purpose of providing mechanisms and policies for the control of resources?
To ensure fair and efficient allocation of resources among different users and programs.
Study Notes
Definition of Operating System
- An Operating System (OS) provides a virtual machine on top of the hardware, making it more convenient than the raw hardware interface
- An OS is “All of the code you didn’t write”
Convenience of OS
- Simpler
- More reliable
- More secure
- More portable
- More efficient
What do Operating Systems Do?
- Manage physical and virtual resources
- Provide users with a well-behaved environment
- Define a set of logical resources (objects) and a set of well-defined operations on those resources (interface)
- Provide mechanisms and policies for the control of resources
- Control how different users and programs interact
Resources to be Managed
- CPU(s)
- Memory
- Storage Devices (disks, tapes, etc.)
- Input Devices (keyboard, mouse, cameras, etc.)
- Output Devices (printers, displays, speakers, etc.)
- Networks
Computer-System Operation
- I/O (Input/Output) devices and the CPU can execute concurrently
- Each device controller is in charge of a particular device type
- Each device controller has a local buffer
- CPU moves data from main memory to local buffers
- CPU also moves data to main memory from local buffers
- Main memory = RAM
- I/O is from the device to local buffer of controller
- Device controller informs CPU that it has finished its operation by causing an interrupt
What’s in an OS?
- Logical Structure
- Windowing & Graphics
- Virtual Memory
- File System
- Memory Management
- Networking
- Access Control
- Process Management
- Generic I/O
- Device Drivers
- Naming
- Interrupts
- Cache
- Physical Memory
- Hardware Devices
- Applications
- OS Interface
- Physical Machine Interface
- Machine Independent Services
- Machine Dependent Services
- Quake
- Word Processor
- System Utils
- Shells
- Windowing & Graphics
Major Issues in Operating Systems
1
- Structure: how is an OS organised?
- Sharing: how are resources shared among users?
- Naming: how are resources named by users or programs
- Protection: how is one user/program protected from another
- Security: how to authenticate, control access, and secure privacy
- Performance: why is it so slow?
- Reliability & Fault Tolerance: how do we deal with failures?
- Extensibility: how do we add new features?
2
- Communication: how can we exchange information?
- Concurrency: how are apparently parallel activities created and controlled?
- Scale & Growth: what happens as demands & resources increase?
- Persistence: how to make data outlast the processes that created them
- Compatibility: can we ever do anything new?
- Distribution: accessing the world of information
- Accounting: who pays the bills, and how do we control resource usage?
A Component View of an OS
Four Managers in an OS
Process Management 1 of 3
- Distinguish between a Program and a Process
- A process is a program in execution
- It is a unit of work within the system
- Sometimes called a job
- A Program is a passive entity, whereas a Process is an active entity
- Process needs resources to accomplish its task:
- CPU, memory, I/O, files
- Initialization data
Process Management 2 of 3
- Process termination requires reclaim of any reusable resources, so that other processes can use them
- The OS assists with this
- Process which has a single “flow” or thread of execution is called a “single-threaded”
- We have one program counter, specifying the memory location of next instruction to execute
- Single-threaded Process executes instructions sequentially:
- one instruction at a time (starting with the first), until completion
Process Management 3 of 3
- Multi-threaded process has a multiple “flows” or threads of execution
- One program counter per thread; for eg: 4 threads in a process needs 4 program counters
- A thread’s program counter specifies memory location of next instruction to execute in that thread
- Sometimes, we say “Thread Counter”
This quiz explains the definition and functions of an Operating System (OS), highlighting its role in managing physical and virtual resources. Learn why an OS is considered as a virtual machine on top of hardware, offering a more convenient interface for users.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free