Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Keywords Definition
Storage-device hierarchy
Timer
We must ensure that the operating system maintains control over
the CPU.
The operating system sets the counter. Every time the clock ticks,
the counter is decremented.
https://en.wikipedia.org/wiki/Direct_memory_access
Symmetric multiprocessing architecture
• https://en.wikipedia.org/wiki/Symmetric_multiprocessing
Symmetric multiprocessing architecture
https://en.wikipedia.org/wiki/Com
puter_cluster
Computer Cluster
Keywords Definition
Transition from user to kernel mode
Process States
• https://www.javamex.com/tutorials/threads/how_threads_work.shtml
Memory Management
The operating system is responsible for the following
activities in connection with memory management:
[1] "A Survey of Techniques for Architecting TLBs", Concurrency and Computation:
Practice and Experience, 2016.
• https://en.wikipedia.org/wiki/Translation_lookaside_buffer
Pages (Virtual Memory &
Physical Memory)
Relationship between pages addressed by
virtual addresses and the pages in physical
memory, within a simple address space
scheme. Physical memory can contain pages
belonging to many processes. Pages can
be held on disk if seldomly used, or if physical
memory is full. In the diagram above, some
pages are not in physical memory.
https://en.wikipedia.org/wiki/Page_table
• By Traced by User:Stannered, original by
en:User:Dysprosia - en:Image:Virtual address space
and physical address space relationship.png, BSD,
https://commons.wikimedia.org/w/index.php?
curid=1895627
Translation Lookaside Buffer
• The TLB stores the recent translations of virtual memory to physical
memory and can be called an address-translation cache. A TLB may
reside between the CPU and the CPU cache, between CPU cache and
the main memory or between the different levels of the multi-level
cache. The majority of desktop, laptop, and server processors include
one or more TLBs in the memory-management hardware.
• https://en.wikipedia.org/wiki/Translation_lookaside_buffer
Steps In a Translation
Lookaside Buffer
https://en.wikipedia.org/wiki/Translation_lookaside_buffer
The von Neumann execution cycle at work
Central Processing Unit - CPU 2
3
0010 R1 PC
sum
0011 R2
0101 R3 I 5
1, 2, 3, 4
Control Unit
Main Memory
CPU: Memory
Data Bus
Address Bus
Control Bus
• https://www.slideshare.net/DamianGordon1/operating-systems-file-management
File Management
• https://www.slideshare.net/DamianGordon1/operating-systems-file-management
Cache Memory
Principle:
Spooling allows programs to "hand off" work to be done by the peripheral and then proceed to
other tasks, or do not begin until input has been transcribed. A dedicated program, the spooler,
maintains an orderly sequence of jobs for the peripheral and feeds it data at its own rate.
https://en.wikipedia.org/wiki/Spooling
The I/O Subsystem
• In computing, input/output or I/O (or, informally, io or IO) is the
communication between an information processing system, such as a
computer, and the outside world, possibly a human or another
information processing system. Inputs are the signals or data received
by the system and outputs are the signals or data sent from it. The
term can also be used as part of an action; to "perform I/O" is to
perform an input or output operation.
https://en.wikipedia.org/wiki/Input/output
The I/O Subsystem
• I/O devices are the pieces of hardware used by a human (or other
system) to communicate with a computer. For instance, a keyboard or
computer mouse is an input device for a computer, while monitors
and printers are output devices. Devices for communication between
computers, such as modems and network cards, typically perform
both input and output operations.
https://en.wikipedia.org/wiki/Input/output#Interface
The I/O subsystem
• http://slideplayer.com/slide/6358677/
The I/O subsystem
Knowledge Recall
Protection
Protection, is any mechanism for controlling the
access of processes or users to the resources defined
by a computer system.
• https://en.wikipedia.org/wiki/System_Integrity_Protection
Access Matrix
https://www2.cs.uic.edu/~jbell/
CourseNotes/OperatingSystems/
14_Protection.html
Access Matrix
Knowledge Recall
Linked Lists
• Linked lists are among the simplest and most common data structures. The
principal benefit of a linked list over a conventional array is that the list
elements can easily be inserted or removed without reallocation or
reorganization of the entire structure because the data items need not be
stored contiguously in memory or on disk, while an array has to be declared in
the source code, before compiling and running the program. Linked lists allow
insertion and removal of nodes at any point in the list, and can do so with a
constant number of operations if the link previous to the link being added or
removed is maintained during list traversal.
• On the other hand, simple linked lists by themselves do not allow random
access to the data, or any form of efficient indexing.
https://en.wikipedia.org/wiki/Linked_list
Linked Lists
• Linux uses a number of software engineering techniques to link together its data
structures. On a lot of occasions it uses linked or chained data structures. If each data
structure describes a single instance or occurrence of something, for example a
process (identified by a PID non negative integer, The default maximum value of
PIDs is 32,767 - http://www.linfo.org/pid.html) or a network device (which is
identified by the OS using a number - http://www.homesaustin.com/Documents/
DeviceDrivers.pdf), the kernel must be able to find all of the instances. In a linked list
a root pointer contains the address of the first data structure, or element, in the list,
then each subsequent data structure contains a pointer to the next element in the
list. The last element's next pointer would be 0 or NULL to show that it is the end of
the list. In a doubly linked list each element contains both a pointer to the next
element in the list but also a pointer to the previous element in the list. Using doubly
linked lists makes it easier to add or remove elements from the middle of list,
although you do need more memory accesses. This is a typical operating system
trade off: memory accesses versus CPU cycles.
http://www.linux-tutorial.info/modules.php?name=MContent&pageid=257
Kernel Data
Structures
The kernel maintains three important
tables/structures for managing open
files for process: the process table, the
file table, and the v-node/i-node info.
• http://slideplayer.com/slide/8806909/
Queues
• https://www.slideshare.net/imdadmanik/03-processes
Queues
• https://www.tutorialspoint.com/operating_system/os_process_scheduling.htm
Circular
Lists
• http://pages.cs.wisc.edu/~verno
n/cs367/notes/4.LINKED-
LIST.html
Advantages:
1. If we are at a node, then we can go to any node. But in linear linked list it is not possible to
go to previous node. 2. It saves time when we have to go to the first node from the last node. It
can be done in single step because there is no need to traverse the in between nodes. But in
double linked list, we will have to go through in between nodes.
http://www.xpode.com/ShowArticle.aspx?ArticleId=296
Stack and Heap
Stack is used for static memory allocation and Heap for
dynamic memory allocation, both stored in the
computer's RAM.
http://net-informations.com/faq/net/stack-heap.htm
• https://gabrieletolomei.wordpress.com/miscellanea/operating-systems/in-memory-layout/
Kernel Data Structures:
Lists, Stacks, and Queues
Kernel Data Structures:
Lists, Stacks, and Queues
Kernel Data Structures:
Lists, Stacks, and Queues
A stack is a sequentially ordered data structure that uses the last in, first
out (LIFO) principle for adding and removing items, meaning that the last item
placed onto a stack is the first item removed. The operations for inserting and
removing items from a stack are known as push and pop, respectively.
http://www.idc-
online.com/technical_references/pdfs/information_technology/Memory_Management_with_
Bitmaps_and_Linked_List.pdf
Bitmaps
A bitmap is a string of n binary digits that can be used to represent the status of
n items. For example, suppose we have several resources, and the availability
of each resource is indicated by the value of a binary digit:
0 means that the resource is available, while 1 indicates that it is unavailable (or vice-versa).
The value of the ith position in the bitmap is associated with the ith resource. As an
example, consider the bitmap shown below:
001011101
Knowledge Recall
Computing Environments
Two operating systems currently dominate mobile computing:
Apple iOS and Google Android. iOS was designed to run on
Apple iPhone and iPad mobile devices. Android powers
smartphones and tablet computers available from many
manufacturers.
Instead, all nodes within the system are considered peers, and
each may act as either a client or a server, depending on
whether it is requesting or providing a service.
Peer-to-Peer Computing
Skype is an example of peer-to-peer computing.
It allows clients to
make voice calls and video calls and to send text messages over the Internet
using a technology known as voice over IP (VoIP).
https://en.wikipedia.org/wiki/Hypervisor
• https://pubs.vmware.com/vsphere-50/index.jsp?topic=
%2Fcom.vmware.vsphere.introduction.doc_50%2FGUID-7EE617A2-4A10-424F-BAE2-56CA6692A93F.html
Virtualization
At the base is the host, the underlying hardware system that runs the virtual machines.
The virtual machine manager (VMM) (also known as a hypervisor) creates and runs virtual
machines by providing an interface that is identical to the host.
Each guest process is provided with a virtual copy of the host (see Figure in the next slide).
A single physical machine can thus run multiple operating systems concurrently, each in its
own virtual machine.
Virtualization
Cloud
Computing
and
Knowledge Recall