30 Questions
What allows users to run several programs at once on a single-processor computer?
Time-sharing
In a multiprocessor system, what enables threads or tasks to actually run at the same time?
Concurrency
What provides the illusion that several processes are executing 'at once'?
Time-sharing
What is the term for each execution of the same set of instructions as a completely separate instantiation of the program?
Instance
On a multi-core system, what runs a particular thread or task?
Core-specific processor
What is required for the running task to relinquish the CPU in a time-sharing system?
Hardware interrupt
What is a program in the context of system resources and execution?
A set of machine code instructions and data stored on disk
How can a process be distinguished from a program?
A program is a passive entity, whereas a process is a computer program in action
What is the smallest unit of processing that can be scheduled by an operating system?
Thread of execution
How do multiple threads differ from multiple processes in terms of resource sharing?
Multiple threads share resources such as memory within the same process, while different processes do not share these resources
In the context of computer architecture, what defines multithreading?
The ability of a CPU or core to execute multiple processes or threads concurrently
How does multithreading generally occur on a single processor?
By time-division multiplexing, where the processor switches between different threads
What prevents direct communication between independent processes in modern operating systems?
Mediated and controlled inter-process communication functionality
In the context of processes in an operating system, what does each individual process run in?
Virtual address space
What happens if one process crashes in a multiprocessing operating system like Linux?
It does not cause another process to crash
Which part of a process includes the program counter, CPU's registers, and process stacks?
The current executing program
How are processes prevented from interacting with each other except through secure mechanisms?
Through separate virtual address spaces
What system resources does a process utilize during its lifetime?
CPUs to run instructions and physical memory to hold data
What is the responsibility of the Scheduler in CPU allocation?
Planning the allocation strategy
Which type of waiting process in Linux can be interrupted by signals?
Interruptible waiting process
What happens when a process is terminated in Linux?
The process remains in the system as a zombie
What causes a process to be in a blocked state?
Waiting for an event or resource
Which component of the OS does the actual allocation and context switch?
Dispatcher
What defines a stopped/terminated process in Linux?
Has exhausted allocated CPU time
What is a Zombie process in the context of computer systems?
A process that is halted but can be restarted
Which feature describes Unix as an operating system?
Portable and multi-user in a time-sharing configuration
What is a key characteristic of Linux in terms of user access?
It allows multiple users to be logged in at the same time
What does a context switch involve in computer systems?
Reassigning the CPU from one task to another
Why is Linux considered great according to the text?
Built by volunteer programmers over the Internet
In which state will a process be when it is termed a Zombie process?
Halted but still has a data structure entry in memory
Study Notes
Process Management
- Context switching allows multiple tasks to run simultaneously, creating the illusion of concurrent execution.
- On a multiprocessor or multi-core system, threads or tasks can run at the same time, with each processor or core running a particular thread or task.
Time-Sharing
- Time-sharing allows processes to switch between being executed and waiting to be executed.
- This rapid switching provides the illusion that several processes are executing at once.
- Time-sharing systems are designed to allow several programs to execute apparently simultaneously.
OS Components
- The OS has two components for allocating the CPU: the Scheduler and the Dispatcher.
- The Scheduler is responsible for strategy and planning of allocation of the CPU.
- The Dispatcher does actual allocation and context switching.
Process States
- A process can be in one of the following states:
- Running: the current process in the system.
- Ready: waiting to be assigned to one of the system's CPUs.
- Waiting: waiting for an event or resource.
- Blocked: blocked due to various reasons such as exhausting CPU time or waiting for an event.
- Stopped/Terminated: terminated or stopped, either by completing execution or by being killed.
Benefits of Process Management
- Responsiveness
- Faster execution
- Less resource-intensive
- Better system utilization
- Simplified sharing and communication
- Parallelization
Unix and Linux
- Unix is a computer operating system developed in 1969 by AT&T employees.
- Unix is designed to be portable, multi-tasking, and multi-user in a time-sharing configuration.
- Linux is developed and maintained by a worldwide team of volunteer programmers.
- Linux is great for many reasons, including being multi-user, allowing multiple users to be logged in to a single computer at one time.
Process and Threads
- A process can be thought of as a computer program in action.
- Several processes may be associated with the same program.
- A thread of execution is the smallest unit of processing that can be scheduled by an operating system.
- Multiple threads can exist within the same process and share resources such as memory.
Multithreading
- Multithreading is the ability of a CPU or a single core in a multi-core processor to execute multiple processes or threads concurrently.
- Multithreading generally occurs by time-division multiplexing (as in multitasking) on a single processor.
- Processes are separate tasks each with their own rights and responsibilities, and are isolated from each other.
Learn about the relationship between programs, processes, and threads in operating systems. Understand how a program is different from a process and how multiple processes can be associated with the same program. Explore the concept of threads in computer programming.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free