Operating System Study Material CSCI 3341

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

CPU works for one time slice on, say, Process P1, 3 cases can happen:

1. P1 needs more time to be finished but CPU does not have time for P1 and wants to work with the next process, P2. Context Switch happens to go from P1 to P2. 2. P1 finished at the end of time slice. P1 will leave the system. 3. P1 finished before the slice time is up from the point that P1 is finished, time slice for execution of P2 starts.

OS Evolution

1. Signup Scheme: Users signed up at computer centers to rent computer time, specifying their required duration. 2. Hiring Operators: Skilled individuals were employed to efficiently set up computer systems for users, increasing overall computer usage. 3. Batch Processing: Gathering similar tasks (e.g., all Fortran programs) and executing them together to save setup time. 4. Job Control Language: A standardized language that allowed users to specify their computing needs clearly. 5. Automatic Job Sequencing: An automated process that transitions from one program to the next, initially managed by a software called a resident monitor.

Client-Server Systems

A client-server system involves a client (user's computer) sending requests to a server, which then processes the request and sends back the data. Client software on the user's side and server software on the server's side facilitate the communication between the client and the server.

What is OS?

A collection of programs and data that is in charge of managing computer resources, and supporting virtual characteristics of the computer.

Device Controller

A hardware module that permits connection of I/O devices to a computer. One controller per kind.(Mouse device controller, Keyboard device controller, etc.)

The concept of a layered OS structure and its advantages and disadvantages

A layered OS structure involves building the OS in layers, with each layer adding more functionality. This structure is easier to debug and expand but can be inefficient due to the need to traverse multiple layers.

Loosely vs tightly coupled systems

A loosely coupled system consists of connected usually by a telephone line and they do not share system resources. ex: Parallel Systems In contrast, a tightly coupled system share the system clock, CPU bus, memory, and sometimes peripherals. ex: Distributed Systems and Clustered Systems

Multiprocessor Systems

A multiprocessor system has multiple CPUs or processors. Multiple CPUs in a single chip are more integrated and might have basic functionalities, whereas traditional multiprocessor systems have separate chips for each CPU.

Multiprogramming vs Multiuser Systems

A multiprogramming system has more than one process in RAM at any given time. A system becomes multiuser when multiple users use it, and their programs result in multiple processes in RAM

Difference between Process, Program, and Job

A program is something you write, like code on a piece of paper. When it sits on the hard drive, it's a program. When a program is loaded into RAM for execution, it becomes a process. A job is a general term used for both.

Racing Condition

A racing condition means there's no guarantee that the execution of the interrupt in progress will be successful. It's important to avoid racing conditions during interrupt handling to ensure the correct and reliable operation of the system.

Resident Monitor

A resident monitor is a part of the operating system that gets loaded into RAM during the booting of the computer. It's in charge of job sequencing, ensuring that tasks are executed in the correct order. includes JCL Interpreter, Job Sequencer, Device Drivers, and Interrupt and Trap Vectors.

Device Driver

A software module that hides the details of an I/O device from OS

Definition of a system call and how it serves as an interface between processes and the operating system

A system call is a process by which a process requests a service from the operating system. It serves as an interface between processes and the OS.

Time Slices and Quantum Time

A time slice or quantum time refers to a segment of the CPU lifecycle. For instance, if the CPU lifecycle is one minute, it can be divided into smaller segments, such as eight equal sizes, where each segment is called a time slice or quantum time. CPU time is divided among processes by breaking down the CPU lifecycle into time slices. Each process gets a designated time slice to execute. For example, the CPU might work with eight processes, each getting one of the eight time slices

What is an interrupt?

An electronic signal issued by a computer resource to get the attention of OS.

What is Computer Resource?

Any piece of Software or Hardware ex: Memory, CPU, Java Compiler, etc.

Interrupts and the CPU

At the end of each machine cycle, the CPU checks to see if there is an interrupt request. If there is, the current process is interrupted, and the CPU handles the interrupt. The significance of the interrupt vector is that it points to the address of the beginning of a program that is ready to handle the interrupt.

Job Sequencer

Automates the job sequencing process

The role of base and limit registers in memory protection

Base and limit registers are used to ensure memory protection. They define the boundaries of memory spaces, ensuring that processes do not access unauthorized areas of memory.

The role of base and limit registers in ensuring memory protection

Base and limit registers define the boundaries of memory spaces, ensuring that processes do not access unauthorized areas of memory.

Parallel Systems New Trends:

Classic Technology (Multiprocessor Systems): multiple physically separate processing units (one CPU per chip). Extra circuity is needed for the CPUs to communicate with each other)

Complier vs. Assembler

Compiler: Translates text (source code) into binary for the computer to execute. It partially converts the code to machine language. whereas, When the source code is written in assembly language, it's not called a compiler but an assembler. It translates assembly language into machine code.

Definition of Context Switching

Context switching is a process that includes three steps. First, it involves saving the current status of the CPU. Second, it handles the interrupt by assigning the program counter (PC) the address of the interrupt. Finally, after the interrupt is handled, the CPU returns to the process it had in hand prior to the interrupt, restoring the saved registers and continuing from where it left off.

Direct Memory Access (DMA)

DMA is a process that uses a small CPU inside the device controller. This small CPU's primary role is to transfer the content of the buffer in the device controller directly to the RAM, without interrupting the main CPU's activities. This process improves the speed of I/O operations by preventing the need for the main CPU to handle buffer transfers.

What is a memory cell?

Every 2 adjacent bytes

Examples of system calls in various operating systems

Examples given include system calls in UNIX, Windows 7, FreeBSD, and Linux, with each having a varying number of system calls.

General-Purpose vs Special-Purpose Registers

General-purpose registers are used for general operations, while special-purpose registers have specific functions, such as holding an instruction.

Real-Time Systems (Hard vs Soft)

Hard real-time systems guarantee that the computer's response will be delivered within a specific time frame. Soft real-time systems do their best to provide a response within a certain period but can't guarantee it.

I/O Structure

Hardware: Device and Device controller Software: Device Driver and Kernel I/O Subsystem

The historical context and purpose of virtual machines

Historically, virtual machines were software designed to provide the illusion that each user has their own virtual CPU and memory. The goal was to provide perfect protection and isolation.

I/O Devices and Controllers

I/O devices communicate with the CPU through device controllers, which have specific registers reserved for operations like read and write. The device driver is a piece of software that communicates with the operating system, while the device controller is a piece of hardware.

Asynchronous I/O Operations

In asynchronous I/O operations, as soon as a program requires a read operation, the CPU does not wait for that process to complete its read. Instead, the CPU moves on to work with another process. This means that if a process requires an I/O operation, the operating system will leave that process and work on another one. If multiple processes require read operations, the CPU will handle them sequentially, leading to multiple processes waiting for their read or write operations. This is because the device controller cannot match the speed of the CPU, and data coming from I/O devices is slow.

PC systems

Individual computer for one user like a desktop

The difference between interpreters and compilers in the context of JVM

Interpreters convert bytecode into native machine language one byte at a time, while compilers convert the entire bytecode at once.

JCL Interpreter

Interprets the JCL codes.

Interrupt vs Trap

Interrupt: An electronic signal issued by a computer hardware resource to get the attention of the operating system whereas, Trap: An electronic signal issued by a computer software resource to get the attention of the operating system

Why is job sequencing important?

It's important because it optimizes the use of computer resources by ensuring that tasks are executed in an efficient sequence.

JCL (Job Control Language)

JCL is a language used to express the needs of a program to the operator. It's a way for users to specify how their programs should be executed on a computer system. The term "job" in this context is a trademark patented by IBM.

The components of a Java Virtual Machine (JVM) and its role in ensuring platform independence

JVM includes components like class loader and class verifier. It ensures that Java bytecode can run on any platform without compromising the security or reliability of the underlying hardware.

Machine Instructions

Machine instructions are converted to binary, which is the language the CPU understands. These binary instructions are then stored in RAM.

The difference between mechanism (how a feature is built) and policy (how a feature is used)

Mechanism refers to how a feature is built in the operating system, while policy dictates how that feature is used.

Memory-Mapped I/O

Memory-mapped I/O is a technique where a part of the RAM is mapped onto the registers of the device controller. This means that when the CPU writes to that specific part of the RAM, it appears to the device controller as if the data is written directly to its registers. This technique speeds up I/O operations because the CPU writes to the RAM instead of the slower device registers.

Modules in the Linux Kernel

Modules in the Linux kernel are programs that the operating system raises a copy of from the hard drive. These modules are loaded into a designated space in memory.

Definition and purpose of operating system services

Operating system services are provisions of the OS that support the convenience of the user and the efficiency of the computer system. They provide means for program execution, I/O operations, communication, and error detection.

OS Kernel

Part of the OS that loaded into RAM during the booting of the computer

The concept of privileged operations and monitor mode

Privileged operations are those that must be executed by the operating system. When executing privileged instructions, the system goes into monitor mode.

What is Job Sequencing?

Process of finishing the engagement of the system from an ended job and starting the engagement of the system with a new job.

What are the two Special-Purpose registers?

Program Counter Register Instruction Register

What are the 3 main categories of System Programs?

Program Development Aids, System Utilities, Application Programs

Memory Types

RAM (Random Access Memory): RAM is a temporary or volatile storage space inside the computer where data and programs are stored. It has a fixed access time, meaning the time it takes to access data from RAM is consistent regardless of the data's location. ROM (Read-Only Memory): ROM is a type of memory where data is stored permanently. Once data or a program is stored in ROM, it cannot be easily altered. ROM is used for storing firmware or software that boots up the computer.

Interrupts and Commands

Read and write commands in the context of I/O devices are executed based on specific registers in the device controller reserved for these operations. For example, a specific register value might indicate a read operation. Device controllers play a crucial role in handling read and write operations by interfacing between the I/O device and the CPU, ensuring data is correctly transferred and processed.

Memory and Registers

Registers are memory cells within the CPU that are extremely fast. There are two types of registers: general-purpose and special-purpose. General-purpose registers act like scratch paper, used for temporary memory space during calculations. Special-purpose registers are designed for specific tasks within the CPU. Registers are crucial in CPU operations because they provide fast access to frequently used data.

Other routines

Reside on the hard disk and a copy of any of the routines that is needed will be temporarily loaded into RAM (in a predefined area within the Kernel).

Who's in charge of job sequencing?

Resident Monitor

Distinction between services for user convenience and system efficiency

Services for user convenience include program execution, I/O operations, communication, and error detection. Services for system efficiency include resource allocation, accounting, and protection.

Parallel Systems

Several CPUS under one box. Each CPU has its own set of registers and cache memory. However, they share the RAM

Distributed Systems

Several Computers (nodes) are loosely coupled via a telephone line or other connectivity means for the communications purposes. If some of the nodes are multi-process systems (tightly coupled) then we have a clustered system, The need for having the tightly coupled nodes in a distributed system is to share memory

Why do we name the signal issued by a resource an "interrupt"?

Signal coming from a computer resource to OS eventually cause a interruption in current CPU to execute the corresponding remedy to that signal because that interruption, therefore, we call that signal "interrupt".

Recent Trends in the CPU design (Multicore Systems)

Single chip with multiple CPUs (the CPUs are known as cores)

What are System Utilities?

Software for implementing popular functions such as Copy, Delete, Sort, etc.

What are Application Programs?

Software like Microsoft Word, PowerPoint, spreadsheets, and other applications.

What is a Program Development Aid?

Software that helps users develop programs, write them, and execute them. Examples include Text editors, Compilers, Assembler, Macro Processors, Loaders/Linkers and Debugging Aids.

Clustered Systems Modes of Operation

Symmetric Clustering: a. each node work on its own task. b. nodes monitor each other Asymmetric Clustering: a. one node is in "Hot-standby mode" and its function is to monitor the other nodes. b. other nodes work on their task. If a node fails, them the node in "Hot-Standby mode" assumes the task of the failed node.

Parallel Systems Mode of Operations

Symmetric: CPU are considered as peers and therefore, each CPU performs all tasks including OS functions, user processes, etc. Asymmetric: (Master/Slave Technique): One CPU is in the role of "master" and the rest are in the role of "slaves". Master controls the entire system and it schedules and allocates work to the Slave CPUs. Each slave CPU either looks to the Master Computer for instruction or it has a predefined task

Differences between system calls and system programs

System calls are individual requests made by processes to the OS, while system programs are larger and can involve many system calls. System programs serve as an interface between the user and the OS.

Coupled Systems

Systems in which computers are connected to each other. ex: tightly and loosely coupled

Linux Kernel Components

The Linux kernel, a modern version of the resident monitor, consists of three main parts: process management, resource management, and device driver interrupt handlers.

The address of a memory cell is

The address of the first byte in the cell

Booting Process

The booting process involves initializing the computer system using a program called BIOS (Basic Input Output System), which is stored on a ROM chip inside the computer. This program initializes all aspects of the system, loads the operating system kernel into RAM, and runs it. In some systems, a copy of the BIOS program is loaded into RAM to speed up the booting process, known as shadowing.

Device Status Table

The device status table is used to keep track of all the I/O requests because I/O devices are much slower than the CPU. When there are multiple I/O requests, the device status table helps manage these requests by creating a linked list for each device. This linked list keeps track of all the commands waiting for every device, ensuring that the are processed in order.

Machine Cycle Steps

The machine cycle consists of three main steps: fetching, decoding, and executing. During the fetch step, the instruction is loaded into the instruction register. In the decode step, the CPU understands the meaning of the binary instruction. Finally, in the execute step, the CPU performs the action specified by the instruction.

CPU Architecture

The main components of a CPU include the Arithmetic Logic Unit (ALU), general-purpose and special-purpose registers, and cache memory.

Device Drivers

The operating system handles device drivers by copying them from the hard drive into memory. Device drivers are essential as they allow the operating system to communicate with hardware devices.

The role of the operating system in read and write operations

The operating system is responsible for executing read and write operations. For instance, when a Java program wants to read or write, the operating system injects its own set of code for the execution of these operations, considering them as privileged operations.

What is the purpose of an Operating System?

The operating system manages all the resources of a computer. Initially, when computers were first introduced, there was a scheme of sign-up where users would reserve time to use the computer. This evolved into the concept of an operating system to improve efficiency and usability.

How operating systems provide protection for I/O, memory, and CPU

The operating system services provide protection mechanisms for I/O, memory, and CPU. Privileged operations, such as read and write, are executed by the operating system. The system uses base and limit registers to ensure memory protection.

Role of the PC (Program Counter)

The program counter (PC) always carries the address of the next instruction to be executed. It keeps track of where the CPU is in its current task and points to the next instruction that should be executed.

How these registers prevent unauthorized access to certain memory areas

The registers set boundaries for memory access. If a process tries to access memory outside these boundaries, it will be denied, ensuring protection.

When does a resource need to get the attention of OS?

The resource either a) finished its task or b) an error encountered

Third Generation Languages

Third-generation languages are high-level programming languages. Examples given include Java and Python.

The registers set boundaries for memory access. If a process tries to access memory outside these boundaries, it will be denied, ensuring protection.

Timers interrupt the CPU after a set duration, ensuring that no single process monopolizes the CPU. This helps in managing the execution time of processes.

The distinction between user goals and system goals in OS design

User goals focus on ease of use, learning, and safety, while system goals emphasize ease of design, implementation, maintenance, flexibility, reliability, and error-free operation.

What is Virtual Characteristics?

Virtual characteristics refer to the attributes of a computer that, in reality, do not exist. For example, when you work with a computer and think that your computer knows English, even though it doesn't, that illusion is a virtual characteristic.

Examples of operating systems that use a layered structure

Windows NT is an example of an OS that initially used a layered structure.

Remedies, Array

______________ are kept in the OS and the address of their first bytes are kept in an array (vector)

What are System Programs?

a collection of programs that provide convenience for the user.

Ready queue

a queue of processes waiting to be executed

Program Counter Register

always carry the address of the memory cell in which the next statement for execution is resided

instruction Register

always carry the current statement ready to be executed

In Multithreading Systems,

each core works one thread and they share their cache memories, further, CPU feeds each core with necessary input.

How an I/O Operation takes place?

either by synchronous I/O by ready bit or Asynchronous I/O by interrupt signal by device controller

Core

is a CPU with basic functionality, it own registers and cache memory

What is a Shell?

is a command interpreter for the user to communicate to the OS kernel

Clustered System

is a more general form of a distributed system for this reason. The two terms are used interchangeably.

What is the Machine Cycle?

is a process by which a machine instruction is executed. This process is made of 3 steps, fetch, decode and execute.

What is a Remedy?

is a small program and its execution is considered the response of the Resident Monitor to the issued interrupt

Improvement of I/O Operation

memory mapped I/O DMA

Time Sharing

one unit of CPU time is shared among several processes

If the computer resource is a software, then the interrupt is called a

trap


Ensembles d'études connexes

Final Exam (Health and Life insurance)

View Set

Chapter Two- Health Care Syetems. Government Agencies.

View Set

Developmental Psychology Final Exam

View Set

Nursing Process - Acid/Base Balance: Lec 9

View Set

Global Business final ( ch 8, 9, 10)

View Set

SY0-601 SEC+ Social Engineering Techniques & Attack Types

View Set

Chapter 19- Lower Respiratory Disorders

View Set

BCOM 3113 Verbs, Adverbs, and Adjectives

View Set