Você está na página 1de 10

Tutorial 01

Exercise 01: (operating systems)


1. Understanding fundamental concepts:

1. A system: is a set of components that cooperate to achieve a function or


objective.
2. An operating system: is a set of modules that cooperate for the good
management and use of computer resources.
3. the modules: divide into
1. primary: the kernel
process management module
memory management module
interrupt handling module
file system module
2. secondary:
drivers
networking module
security and protection module
the shell
4. difference between system software and application software:
system software is designed to enable the good exploitation of computer
resources. without system software , the computer won't operate as it
should. it runs a computer's hardware and provides a platform for
applications to run on top of.
application software fulfills a specific need for users or performs tasks,
they can be accessed directly.
5. classifying operating systems: they're classified into system software,
because the operating system is the core system software that manages the
computer hardware and provides essential services to enable the execution of
application software.
6. three concrete types of OS and their comparison:
none of them is perfect, they compete with one another.
all of them are multi-tasking systems, i.e. they allow multiple programs to be
executed simultaneously.

METRIC MS WINDOWS LINUX MACOS


reliability(probability of Least reliable Moderate Most
crashing/h) reliable
UX (user experience) Good Variable Excellent
UI Customizable Variable Intuitive
performance Variable Good Excellent
security Closed-source, most Open-source Closed-
people use windows source
so attacks are more
developed for
windows
maintainability Moderate Good Excellent
(updates,bug-
fixes,community)
accessibility to source Limited Full Limited
code
license Proprietary GPL/MIT/BSD Proprietary

7. the process of booting up an OS:


the kernel needs to be located,loaded into the memory, executed to
launch the os , (booting the system = loading the kernel)
1. power on -> CPU executes BIOS (micro-program) -> BIOS initializes
hardware components + invokes bootstrap loader
2. bootstrap loader looks for bootloader program -> bootloader starts
execution looking for a kernel to load (asks user in dual boot)
3. bootstrap loader loads kernel into memory and executes it (system is
running/ has booted)
4. bootloader performs diagnostics and determines the state of hardware
and devices.
8. powering up a system with multiple OSs: a process called the "boot
sequence" is initiated. During this process, the computer's firmware, such as
BIOS or UEFI, is the first to be executed. The firmware then locates the
bootloader, which is responsible for loading the operating system. Typically,
the bootloader (such as GRUB for Linux or the Windows Boot Manager for
Windows) presents a menu to the user, allowing them to select which
operating system they want to boot into. Once the user makes a selection,
the bootloader loads the corresponding operating system kernel into memory,
and the selected operating system begins its boot process.
9. BIOS and UEFI:
BIOS (Basic Input/Output System): BIOS is a firmware interface
used to initialize hardware during the booting process and provide
runtime services for the operating system. It is stored on a ROM chip on
the computer's motherboard and is responsible for performing basic
system checks, detecting and initializing hardware components, and
loading the bootloader into memory. BIOS is considered system software
because it is essential for the computer's functioning and is independent
of any particular operating system.
UEFI (Unified Extensible Firmware Interface): UEFI is a more
modern firmware interface designed to replace the traditional BIOS.
UEFI offers several advantages over BIOS, including support for larger
disk sizes, faster boot times, improved security features, and a more
versatile interface. UEFI firmware is stored on a flash memory chip on
the motherboard and provides similar functionalities to BIOS but with
more advanced capabilities. Like BIOS, UEFI is also considered system
software as it is integral to the computer's boot process and independent
of any specific operating system.

2. Types of operating systems: (with respect to


memory)

1. concepts of:
Multiprogramming: This concept involves having multiple programs
running concurrently on a computer system. The CPU switches rapidly
between these programs, giving the illusion that they are all running
simultaneously. However, in reality, the CPU is executing instructions
from each program in short bursts.
Single-tasking: In a single-tasking operating system, only one program
can run at a time. The CPU devotes all its resources to executing that
single program until it completes or is interrupted.
Multi-tasking: Multi-tasking refers to the ability of an operating
system to run multiple programs simultaneously. This can be achieved
through time-sharing, where the CPU switches between different
programs to give the appearance of parallel execution.
Multi-processing: Multi-processing involves using multiple CPUs or
CPU cores to execute multiple processes concurrently. Each CPU or
core can work on a separate program or task simultaneously, increasing
overall system performance.
Multi-threading: Multi-threading allows a single process to execute
multiple threads concurrently. Threads are lighter weight than processes
and share resources within the same process. This allows for more
efficient utilization of CPU resources and can improve responsiveness in
applications.
2. time-sharing systems: Time-sharing systems allow multiple users to
interact with a computer system simultaneously by dividing the CPU time
among multiple processes or users. Each user or process is allocated a time
slice during which they can execute their tasks. This gives the illusion of
concurrent execution to each user, even though the CPU is actually rapidly
switching between tasks.
3. relating the concepts to everyday use os:
Windows: Windows operating systems, such as Windows 10, utilize
multi-tasking, multi-processing, and multi-threading extensively. Users
can run multiple programs simultaneously, and Windows efficiently
schedules tasks to utilize available CPU resources. Additionally, modern
versions of Windows support multi-core processors, allowing for multi-
processing capabilities. However, the specifics of time-sharing might not
be directly visible to the end-user as it's managed by the operating
system's kernel.
Linux: Linux distributions, like Ubuntu or Fedora, are known for their
robust support for multi-tasking, multi-processing, and multi-threading.
Linux can efficiently manage system resources, allowing users to run
numerous processes concurrently. Time-sharing is a fundamental concept
in Linux systems, enabling multiple users to interact with the system
simultaneously via terminals or remote connections.
macOS: macOS, the operating system used on Apple Mac computers,
also leverages multi-tasking, multi-processing, and multi-threading to
provide a seamless user experience. Users can run multiple applications
concurrently, and macOS efficiently manages system resources to ensure
responsiveness. Time-sharing capabilities allow multiple users to log in
and use the system simultaneously, typical in enterprise or educational
environments.
4. completing the table:

OPERATING EXAMPLE(2/2) BRIEF DESCRIPTION


SYSTEM
Desktop OS Windows 11, designed for personal computers and
macOS Big Sur workstations. They provide a
graphical user interface (GUI) and
support a wide range of applications
for general-purpose computing tasks.
Real-time OS VxWorks, QNX designed to execute tasks with
precise timing constraints. They
guarantee timely responses to events,
making them suitable for
applications where timing is critical,
such as fire alarms.
Embedded OS Embedded Linux, lightweight and optimized for use in
FreeRTOS embedded systems with limited
resources, such as microcontrollers,
IoT devices, and consumer
electronics. They provide the
necessary functionalities to control
hardware components and run
specific applications.
Mobile OS Android, iOS designed for smartphones, tablets,
and other mobile devices. They are
optimized for touch-screen interfaces,
mobility, and connectivity to wireless
networks. typically support app
ecosystems and provide features like
location services, multimedia
support, and mobile payments.
Distributed OS Amoeba, Plan 9 designed to manage a network of
interconnected computers and
coordinate their resources and
services. They enable seamless
communication and resource sharing
across multiple nodes in a distributed
computing environment.
OPERATING EXAMPLE(2/2) BRIEF DESCRIPTION
SYSTEM
Network OS Cisco IOS, Juniper specialized OSs used in networking
Junos equipment, such as routers, switches,
and firewalls. They provide
functionalities for network
management, routing, switching, and
security. they are optimized for high
performance and reliability in
handling network traffic.
Virtualization OS VMware ESXi, hypervisors, enable the creation and
Microsoft Hyper-V management of virtual machines
(VMs) on physical hardware. They
provide virtualization services,
resource allocation, and isolation for
running multiple OS instances
simultaneously on a single physical
machine.
Clustered OS Google designed to manage clusters of
Kubernetes, interconnected computers or servers
Apache Mesos as a single system. They provide
functionalities for resource
scheduling, load balancing, fault
tolerance, and scalability in
distributed computing environments,
such as cloud computing platforms
and data centers.

5. types of os used in:


Laptop:Desktop Operating System like Windows, macOS, or Linux.
Web-server:Server Operating System like Linux distributions (e.g.,
Ubuntu Server, CentOS) or Windows Server.
Smartphone: Mobile Operating System such as Android (Google), iOS
(Apple), or Windows Phone (discontinued).
ATM (Automated Teller Machine): Embedded Operating Systems
that are customized for their specific hardware and security
requirements.
Self-driving car: a combination of Real-time Operating Systems
(RTOS) for critical control tasks and Embedded Operating Systems for
managing other functionalities.
Jet-fighter:Real-time Operating Systems (RTOS) or Embedded
Operating Systems tailored for aviation applications.
Unmanned Aerial Vehicles (drones): Embedded Operating Systems
optimized for lightweight and efficient operation.
Company’s resource management server:Network Operating
System or a Server Operating System depending on its role and the
services it provides. This could be a Linux distribution like Ubuntu
Server or a Windows Server OS.

Exercise 02: (Computer architecture)


1. Von Neumann Architecture:

architecture: how to link the components to achieve efficiency.

1. main components of a computer:


1. Central Processing Unit (CPU): Responsible for executing
instructions and performing calculations.
2. Memory Unit: Stores data and instructions that the CPU can access.
3. Input/Output (I/O) Devices: Facilitate communication between the
computer and external devices such as keyboards, mice, displays, and
storage devices.
2. the system used by these components to communicate:
The main communication system used in Von Neumann Architecture is the
shared bus system. In this system, the CPU, memory, and I/O devices are
connected to a shared bus. The CPU can send and receive data to and from
memory and I/O devices via the bus. Data transfer occurs serially over the
bus, and each component takes turns accessing the bus.
example: cpu wants to store sum in memory, the address bus puts the
address when the data will be stored and then puts the data in the data
bus, control bus specifies the I/O operation to be performed.
3. a diagram for the components and their connections
4. difference between harvard architecture and VNA:
separate memory units are used for data and instructions. This means that
the CPU can fetch data and instructions simultaneously, potentially
improving performance compared to Von Neumann Architecture, where data
and instructions share the same memory unit.
de facto model: Von Neumann Architecture due to its simplicity and
flexibility.

2. CPU and Memory dependence:

1. computing:

211 = 2* 210=2KB
220 = 1MB
223 = 8MB
229 = 512MB
237 = 128GB
246 = 64TB
255 = 32PB

​byte units
2. Q. consider RAM that can store 1 byte per physical location (i.e., row). Each
location is identified by an address. Each address is expressed in 8 bits (1
byte). What is the size of this memory in bytes?
Method :
1. Find out how many different addresses are possible with 8 bits.
2. Each address corresponds to one byte of memory.
3. Multiply the number of addresses by the size of each memory
location (which is 1 byte).
solution:
1. Number of Addresses: With 8 bits, you can represent 28
different combinations.
28=256
2. Size of Memory in Bytes: Each of these 256 addresses
corresponds to one byte of memory.
So, the size of memory in bytes is 256 bytes.
3. Q. consider a computer with a 32-bit CPU (it can process 32 bits at a time).
The CPU is connected to a byte-addressable central memory (each memory
address corresponds to one byte of data). how much memory can be addressed
in this computer (in multiples of bytes)?
an address is 1 byte, the number of addresses is 232 possible
combinations, then the memory that can be addressed is 1 * 232 = 232
= 4GB.
4. Q. consider a computer with a 16-bit CPU (Central Processing Unit), which
is connected to a word-addressable memory.how much memory can be
addressed in this computer?
number of addresses = 216 , number of bytes in an address = 2 (word
size), so the addressable memory = 2 * 216 = 217 = 128KB

Você também pode gostar