Operating Systems Test 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What are POSIX APIs

A Standard set of system calls implemented by all Operating Systems in a similar way

What is an operating system and what does it do?

A body of software that is responsible for making it easy to run programs (even allowing you to seemingly run many at the same time), allowing programs to share memory, enabling programs to interact with devices, and other fun stuff like that. That body of software is called the operating system (OS), as it is in charge of making sure the system operates correctly and efficiently in an easy-to-use manner.

What is a system call?

A call into a function in the OS Code Runs with more privileges than normal function calls Can do sensitive operations such as allocating memory and access to hardware

What is a memory address?

A memory address is a reference to a specific memory location used at various levels by software and hardware. Memory addresses are fixed-length sequences of digits conventionally displayed and manipulated as unsigned integers

What is a register?

A processor register (CPU register) is one of a small set of data holding places that are part of the computer

What is a stack pointer?

A stack pointer is a small register that stores the address of the last program request in a stack. A stack is a specialized buffer which stores data from the top down. As new requests come in, they "push down" the older ones

How does OS hard drive virtualization differ from CPU & memory virtualization?

CPU Virtualization: Each process has the illusion that it has complete CPU Memory Virtualization: Each process has the illusion that it has dedicated memory space. A virtual hard drive file is a container file that acts similar to a physical hard drive. Like a physical hard drive, a virtual hard drive file contains a file system, and it can contain an operating system, applications and data. Virtual hard drive files are normally attached to virtual machines (VMs), and function as system or data drives for the VM. In some cases, however, virtual hard drive files are used for archival purposes because of the file's portability.

What is contained in the Process Control Block (PCB)?

Contains information about each process • Process Identifier • Process State • Pointers to other related processes (Parent-Child) • CPU Context of a process (Saved State ) • Pointers to memory • Pointers to open files

Why might you want to be able to create/destroy/suspend a process?

Create - Have your own virtualized resources If a process is stuck running infinitely or is trying to manipulate data that is not supposed to, you may want to destroy/suspend this process

What is memory virtualization and why would we want this?

Each process accesses its own private virtual address space (sometimes just called its address space), which the OS somehow maps onto the physical memory of the machine. A memory reference within one running program does not affect the address space of other processes (or the OS itself); as far as the running program is concerned, it has physical memory all to itself. The reality, however, is that physical memory is a shared resource, managed by the operating system.

What if the CPU was not virtualized?

If the CPU was not virtualized, you could only run one program at a time

How does running multiple programs at the same time increase CPU efficiency?

More of the CPU is being utilized at the same time, speeding up processes.

What are the non-transitional states of a process?

New: Created, yet to run Dead: Terminated

What are policies and mechanisms?

OS uses a CPU scheduler to know what process to run: Intelligence in the form of policies: Which process to run Low-level machinery in the form of mechanisms: How to 'context-switch' between processes

What are the transitional states of a process?

Running: Process is running on a processor. Ready: Process is ready to run but for some reason the OS has chosen not to run it at this given moment. Blocked: When waiting for some event to happen

How does an OS provide access to its features?

The OS provides a standard library for its application

What is a process? What does it represent? What does it abstract?

The abstraction provided by the OS of a running program is something is called a process. Abstractions provide an interface to application programmers that separates policy—what the interface commits to accomplishing—​from mechanism—how the interface is implemented.

What happens if you write a C program that writes past the end of an array? Can this affect other programs?

The compiled program may end up writing those numbers to the memory locations past array . This usually causes it to crash some of the time, but not always. This can affect other programs that need to access memory location.

What is virtualization?

The primary way the OS does this is through a general technique that we call virtualization. That is, the OS takes a physical resource (such as the processor, or memory, or a disk) and transforms it into a more general, powerful, and easy-to-use virtual form of itself. Thus, we sometimes refer to the operating system as a virtual machine

How does time sharing provide virtualization?

Time sharing is a basic technique used by an OS to share a resource. By allowing the resource to be used for a little while by one entity, and then a little while by another, and so forth, the resource in question (e.g., the CPU, or a network link) can be shared by many, allowing virtualization to take place.

As a programmer, why don't you have to worry about changes done on Process APIs?

User programs don't need to interact directly with the system calls

What are the process-related system calls?

fork()

How do programming language libraries access OS code?

system calls

What illusion does a virtualized CPU provide?

the illusion that the system has a very large number of virtual CPUs. Turning a single CPU (or a small set of them) into a seemingly infinite number of CPUs and thus allowing many programs to seemingly run at once is what we call virtualizing the CPU

What is a stack?

a stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and. pop, which removes the most recently added element that was not yet removed

What is a heap?

In computer science, a heap is a specialized tree-based data structure which is essentially an almost complete tree that satisfies the heap property

What is an instruction pointer?

Instruction pointer, also known as the Program counter, is a processor register that indicates the current address of the program being executed.


Set pelajaran terkait

TYPE 1 DIABETES/KETOACIDOSIS/INSPIDUS/SIADH

View Set

Lesson 7: Implementing Authentication Controls

View Set

CompTIA Network+ N10-007: Ports and Protocols and the OSI Model

View Set

YoYoSciencefromthemetallichoodyah

View Set