Summary

This document is a midterm reviewer for COSC 80, covering key concepts such as operating systems, processors, and processes. It includes multiple choice and enumeration questions, designed to help prepare students for the exam.

Full Transcript

**COSC 80 -- MIDTERM REVIEWER** **EXAM TOTAL ITEMS: 100** **TEST I: MULTIPLE CHOICE (10pts)** **Windows OS** - It is a widely used operating system for personal computers, desktops, and laptops, known for its user-friendly interface and compatibility with a broad range of software, with popular v...

**COSC 80 -- MIDTERM REVIEWER** **EXAM TOTAL ITEMS: 100** **TEST I: MULTIPLE CHOICE (10pts)** **Windows OS** - It is a widely used operating system for personal computers, desktops, and laptops, known for its user-friendly interface and compatibility with a broad range of software, with popular versions including Windows 10 and Windows 11. **Mac OS** - It was Developed by Apple Inc. and it is an operating system exclusively for Apple devices such as MacBooks and iMacs, appreciated for its sleek design, high security, and integration with other Apple products, with versions like macOS Monterey and macOS Ventura. **Linux OS** - It is an open-source operating system maintained by a community, is popular among developers, servers, and system administrators due to its customizability and security, with well-known distributions such as Ubuntu, Fedora, and Debian. **Android OS** - It was developed by Google, is the most widely used mobile operating system, known for its open-source nature, extensive app ecosystem, and customization, found in smartphones and tablets, with versions like Android 12 and Android 13. **iOS** - It was developed by Apple Inc. and it is a secure and high-performance operating system used exclusively on Apple mobile devices such as iPhones and iPads, featuring tight integration with Apple\'s ecosystem, with versions including iOS 15 and iOS 16. **Unix** - It was originally developed by AT&T Bell Labs, is a multi-user, multitasking operating system known for its security and stability, widely used in research and enterprise environments, and it has inspired derivatives like AIX and Solaris. **Chrome OS** - A lightweight, cloud-centric operating system developed by google designed for Chromebooks, focusing on web-based applications and simplicity for users, with regular updates as part of its cloud infrastructure. **Solaris** - Developed by Sun Microsystems (now Oracle), is an enterprise-class operating system known for its scalability, security, and performance in high-end servers and large-scale computing environments. **Fedora** - A Linux-based operating system developed by Red Hat, is favored by developers and system administrators for its focus on open-source software, cutting-edge features, and robust security. **Embedded Linux** - It is a version of Linux used in embedded systems such as smart TVs, routers, and various IoT devices due to its adaptability and efficiency. **TEST II: ENUMERATION (10 pts)** **PROCESSOR** A processor, also known as a central processing unit (CPU), is the brain of a computer. It carries out instructions from programs and performs calculations to run various tasks. The processor processes data and controls the other components of the computer. It handles operations such as basic arithmetic, logic, input/output (I/O), and control operations, all of which are necessary for running applications and the operating system. **PROCESS STATE** A process is an instance of a running program, and it goes through various states during its lifetime: **NEW** - The process is being created **READY** -- The process is ready to run and waiting for CPU time. **RUNNING** - The process is currently being executed by the CPU. **WAITING (Blocked)** - The process is waiting for some event (like I/O operations) to complete. **TERMINATED** - The process has finished execution. **PROCESS CREATION AND TERMINATION** A process can terminate normally (by completing its execution) or abnormally (due to an error or external intervention). After termination, the OS deallocates resources associated with the process. A process can be created when: A user starts a program. An existing process creates a new process (via a system call like fork () in Unix). The OS itself needs to create a system process. **PROCESS THREADS** A thread is the smallest unit of execution within a process. A process can have one or more threads (multithreading), where each thread performs a specific task. All threads within a process share the same memory space but execute independently. Each thread has its own stack and program counter, but threads within the same process share resources like memory. Single-threaded processes - Only one thread, executing one task at a time. Multi-threaded processes - Multiple threads within the same process, which allows parallelism and efficient CPU usage. **PROCESS SCHEDULER** A process scheduler is responsible for deciding which process or thread gets to run on the CPU at any given time. There are three types: Long-Term Scheduler (Job Scheduler) - Decides which processes should be admitted into the ready queue. It controls the degree of multiprogramming (number of processes in memory). Short-Term Scheduler (CPU Scheduler) - Selects which process from the ready queue will be executed next by the CPU. This happens frequently, as processes run for short bursts of time. Medium-Term Scheduler - Temporarily removes processes from memory and places them on disk (swapping) to improve the performance and free up memory for more important processes. **PREEMPTIVE AND NON-PREEMPTIVE PROCESS** Preemptive allows interruption, providing better response times for higher-priority tasks while non-preemptive ensures that processes run to completion without interference. Preemptive Scheduling - The OS can interrupt a process that's currently running and switch the CPU to another process. This ensures that high-priority processes can run even if the current process hasn't finished yet. Example: Round Robin and Priority Scheduling. Non-Preemptive Scheduling - Once a process gets the CPU, it runs until it either voluntarily releases the CPU (by waiting or terminating) or it finishes execution. The OS does not interrupt it. Example: First-Come, First-Served (FCFS). **TEST III: CPU SCHEDULING ALGORITHM (80 pts)** **PRACTICE FIRST-COME FIRST SERVE AND SHORTEST JOB FIRST (NON-PREEMPTIVE PRIORITY SCHEDULING IS NOT INCLUDED IN THE EXAM)**

Use Quizgecko on...
Browser
Browser