OS
Theory Concept Map
Week
5- Final Paper
William
Warren-Kidd
The University of
Arizona Global Campus
CPT 301 Computer Organization
& Architecture
Instructor Cemal Tepe
October 31, 2022
Section 1:
When categorizing, describe and
provide examples of the major functions of an operating system we must first
the role of the operating system (OS). There is a wide array of things that links
hardware and software to process efficiently within a computer. From the input instructions
given by a user that is translated into computer language, to the memory,
hardware and process that carries out those instructions. An OS primary
functions are as followed: user interface, file management system, accounting, resource
allocation, I/O operations, program execution,
error detection, communication management, protection, and security. A user
interface (UI) is a part of an OS that allows interaction between a user
and the computer. UI can be a command line, batch line, and graphical user
interface (Silberschatz,Galvin, & Gagne, 2014). A file management system is
used for file maintenance (or management) operations. It is a type of software
that manages data files in a computer system. A file management system has
limited capabilities and is designed to manage individual or group files, such
as special office documents and records (Techopedia 2020). Accounting function
keeps track of how much a user uses. Resource
allocation comes into play when multiple users
are sharing multiple jobs resources that are executing simultaneously.
Input-output (I/O) systems transfer
information between computer main memory and the outside world (El-Ghazawi, T.,
Frieder, G. 2003). Program execution refers to the system ability to load and
terminate a program into memory. Error detection allows the system to constantly
detect and fix errors that arise whether from a program or hardware device. Communications
may be implemented via shared memory, in which two or more processes read and
write toa shared section of memory, or message passing, in which packets of information
in predefined formats are moved between processes by the operating system (Silberschatz,Galvin,
& Gagne, 2014). Finally, we have protection and security in which are
considered today the most vital part of an OS. Not having the right or enough
protection and security can lead to your data being vulnerable and captive to
viral attacks.
Figure 1:
Section 2:
When an operating system
brackets sections of a code and is in an execution mode running on the Central
Processing Unit (CPU), it is knowns a being in process. A process also includes
the process stack, which contains temporary data (such as function parameters,
return addresses, and local variables), and a data section, which contains
global variables (Silberschatz,Galvin,
& Gagne, 2014).
As a process executes it
changes it state thus being in a process state and it can be in either of the
following category of states: “New” state which is a process being created like
launching an application for the first time. The “Running” state which is instructions
are being executed is when you are currently using the before mentioned
application. The “Waiting” state is the process awaiting completion or receiving
signal. An example would be using an instant messing application like Cisco
Webex team and waiting for the recipient to reply. The “Ready” state is when the
process is assigns a new instruction to the CPU like for instance opening an
additional chat with another individual in that Webex app. Finally, the “Terminated”
state finishes the total execution of the process or closing the application
when completed.
When a process state is
in memory it is known as a process control block (PCB). Each block of memory contains information about the process state,
program counter, stack pointer, status of opened files, scheduling algorithms, etc.
All these information is required and must be saved when the process is
switched from one state to another. When the process makes a transition from
one state to another, the operating system must update information in the
process’s PCB (Geeksforgeeks.org 2020).
A single process needs all the
resources required for execution in a single-threaded architecture, including
program counters, registers, memory, files, source code, a "stack which
contains the execution history" (Tutorials Point, 2018). Although
programming is easier in a single threaded motivation it in turn takes a heavy
load on a system, using up several resources thus a disadvantage is that it takes
a while. For a multi-threaded motivation and models the benefits outdo its
counterpart single-threaded such as responsiveness, resource sharing, economy,
and scalability. On a system with a single computing core, concurrency merely
means that the execution of the threads will be interleaved over time, because
the processing core can execute only one thread at a time. On a system with
multiple cores, however, concurrency means that the threads can run in
parallel, because the system can assign a separate thread to each core (Silberschatz,Galvin,
& Gagne, 2014). When it comes to a single thread model, it requires communication
with an OS in which it can only execute one request on thread at a time in a servlet
service but will come to a stand still if a process is blocked. However, a multi
thread model does not need to communicate with an OS and carries a subcategory
of threads within such as: Many-to-One Model, One-to-One Model, and
Many-to-Many Model. In addition, it runs more efficiently, and overall uses
fewer resources as possible.
A classic problem in an
OS that refers to the segment
of code or the program which tries to access or modify the value of the
variables in a shared resource is a critical-section problem. The critical section problem is used to design a protocol followed by a group of
processes, so that when one process has entered its critical section, no other
process is allowed to execute in its critical section (Monum, A.2022). To answer the question what software solution
can be used to resolve a critical-section problem, then it must possess three requirements’
knowns as Mutual Exclusion, a Progress, and the last requirement is bounded waiting. The Peterson’s
Solution is used to resolve a critical-section problem because it preserves all
three requirements and holds two shared variables.
·
Mutual Exclusion is assured as only one process can access
the critical section at any time.
·
Progress is also assured, as a process outside the
critical section does not block other processes from entering the critical
section.
·
Bounded Waiting is preserved as every process gets a fair
chance.
Figure 2:
Section 3:
For
a computer to perform efficiently and exceptionally well, there needs to be and
effective memory management in place. Many modern computers enable
multi-programming, the capacity to run many programs concurrently, through
concurrent and/or parallel processing to improve performance and maximize CPU
consumption (Silberschatz, Galvin, & Gagne, 2014). Also, it is the operating
systems (OS) obligation to ensure that memory gets managed correctly in the
sense that processes that request memory are given it and that processes memory
is protected from other processes. To increase performance
and optimize CPU utilization, many modern computers facilitate
multi-programming, the ability to execute multiple programs simultaneously,
through concurrent and parallel processing (Silberschatz, Galvin, & Gagne, 2014).
As professor Tepe stated: some objectives of memory management in an operating system
are reloadability, OS manages memory and processes will be moved around in
memory, memory management must convert logical addresses into a physical
address, first address is stored as virtual address zero, static relocation,
and dynamic relocation.
Difference
between Logical Address and Physical Address in Operating System
|
No |
Logical Address |
Physical Address |
|
1 |
Logical address is
rendered by CPU. |
Physical address is
like a location that is present in the main memory. |
|
2 |
It is a collection of
all logical addresses rendered by the CPU. |
It is a collection of
all physical addresses mapped to the connected logical addresses. |
|
3 |
Logical address of
the program is visible to the users. |
We cannot view the
physical address of the program. |
|
4 |
Logical address is
generated by the CPU. |
Physical address is
computed by MMU. |
|
5 |
We can easily utilize
the logical address to access the physical address. |
We can use the
physical address indirectly. |
Figure 3:
Figure 4:
Section
4:
The file management
system is a logical storage unit that holds a collection of related information
and another important part of an OS. Hardware components such as hard drives,
flash drives, optical drives (CD/DVD) and magnetic tapes. For most users, the
file system is the most visible aspect of an OS. It provides the mechanism for
on-line storage of and access to both data and programs of the operating system
and all the users of the computer system. The file system consists of two
distinct parts: a collection of files, each storing related data, and a directory
structure, which organizes and provides information about all the files in the
system (Silberschatz,
Galvin, & Gagne, 2014).
A
file is a logical unit, and it helps in separating data and places it in the
smallest allocation of logical secondary storage, and files can store several
types of data including numeric, character, and binary. A file management
system's tracking component is key to the creation and management of this
system, where documents containing various stages of processing are shared and
interchanged on an ongoing basis. It consists of a straightforward interface
where stored files are displayed. It allows the user to browse, move, and sort
them according to different criteria such as date of last modification, date of
creation, file type/format, size, etc. (Techopedia, 2020).”
File system consist of multiple concepts.
From the course text ( Operating
system concepts essentials (2nd ed.). the list that falls under the file concept is
as followed:
·
File
Attributes- Name, Identifier, Type, Location, Size, Protection, Time, Date, and
user identification.
·
File
Operations- Creating a file, writing a file, reading a file, Repositioning within
a file, deleting a file, and truncating a file.
·
File
pointer- the system must track the last read–write location as a
current-file-position pointer.
·
File-open
count- tracks the number of opens, closes, and reaches zero on the last close.
·
Disk
location of the file- the system must track the last read–write location as a
current-file-position pointer.
·
Access
rights- The information needed to locate the file on disk is kept in memory so
that the system does not have to read it from disk foreach operation.
Today’s
modern OS stores their data in the cloud and no longer physically on a PC. In the
past and in some cases today, internal storage on a computer is referred to hard
disk and memory. On disk, the file system may contain information about how to
boot an operating system stored there, the total number of blocks, the number and
location of free blocks, the directory structure, and individual files (Silberschatz,
Galvin, & Gagne, 2014). In-memory keeps data that is stored in the Random Access
Memory (RAM) on a computer. It is faster to retrieve data from in-memory as supposed
to on-disk due to lesser usage or CPU instructions however, the disadvantage to
in-memory is that it is more volatile and subject to data loss if the computer
loses power or bluescreen.
Under
the file system implantation structure there sits five common schemes that
defines the logical structure of aa directory. The root directory also known as is the single-level
directory is the simplest has one structured directory and users are restricted
from creating any subdirectories. The disadvantage to this directory is a user
cannot duplicate the same file name that is already on the system. The second
scheme is a two-level directory structure which allows users to create directories
within the root directory thus allowing each user to keep their data separately
within their own director. The benefit of this structure gives access to use
the same name for files, only under different directories. Next, we have the
third scheme that is the most common directory, a tree structured directory
structure. Under this structure each directory has a parent directory separate
from the root directory. Users have access to fetch shared files from one
another, but a disadvantage is each user will have to go through two or more
directories to obtain the shared data. The number four scheme an acyclic-graph
directory structure which allows directories to share subdirectories and files.
Similar file or subdirectory may be in two different directories. The acyclic
graph is a natural generalization of the tree-structured directory scheme (Silberschatz, Galvin,
& Gagne, 2014). A benefit of and acyclic graph is that it offers more
flexibility than a common directory. And the last scheme is known as the general
graph directory. In this type of directory, within a directory we can create
cycle of the directory where we can derive the various directory with the help
of more than one parent directory (Tutorialandexamples.com, 2020).
There
are several types of input and output (I/O) devices that is used as a
communication link that is connected to computers. Not having the right
software and or driver to work the device came be very catastrophic. Input devices
ranging from keyboard, mouse, Dictaphones, webcam, microphones, printers, and
various scanners. Output devices such as monitor display, projectors, speaker/headphones,
printers, and the old school plotters also uses I/O connections that is built
onto system boards. A controller is used to operate some of the common built-in
like system bus, PCI bus, expansion buss, SCSI, and PCI express slot. Much of these
hardware devices communicate through external hard-wired connection like USB
ports, RCA, RJ45 and serial ports. But there is always some form of conflict
between hardware and software whether the device is too old, or the software is
outdated nor compatible. Never-the-less that is where drivers for respected OS
version comes into play and hopefully resolves the issue. So, while it may seem
difficult to integrate new devices with an older system, device drivers help
resolve this issue by providing a standardized interface between devices and
the I/O subsystem, and system calls provide an interface between applications
and the operating system (Silberschatz, Galvin, & Gagne, 2014). Since 1994 communication
through advance technology grew in the wireless and Bluetooth industry, freeing
up unwanted wires/cabling that drew clutter. As great as a wireless connection
sound, the communication speed between wired and wireless is not even just yet.
The external device will send information that is stored in a memory unit this information
is transferred. The CPU will process the information. Data transfer that
happens between the CPU and I/O devices can happen in several diverse ways. The
Programmed I/O, Interrupt- initiated I/O and Direct memory access (DMA). "In
this case, the device-control registers are mapped into the address space of
the processor. The CPU executes I/O requests using the standard data-transfer
instructions to read and write the device-control registers at their mapped
locations in physical memory (Silberschatz, Galvin, & Gagne, 2014).
Figure 4:
Section 5:
Let’s
face it, computer hijacking through viral attack such as ransomware, trojans or
the often-used spyware attack is on an incredibly high increase over the past
decade. The latest technology used to protect OS has been a blessing and
sometimes a curse due to hackers’ manipulation of the software. The
operating system provides a mechanism for deploying
both
of these kinds of protection. In other words, the operating system solves the
protection
problem—that
each object (such as a file) is accessed correctly, and only by processes (or
users)
with
specific access rights to that object (Silberschatz, Galvin, & Gagne,
2014). Protection of a computers data has doubled through built-in OS security
and third-party software application. Regardless there are goals and principles
to protect modern PC. The goal of an OS it to protect, prevent, and restrict any
unauthorized external violators from to gain access to system data information.
The role of protection in a computer system is to provide a mechanism for the
enforcement of the policies governing resource use. These policies can be
established in a variety of ways. Some are fixed in the design of the system,
while others are formulated by the management of a system. Still the individual
users define others to protect their own files and programs. A protection
system must have the flexibility to enforce a variety of policies (Silberschatz,
Galvin, & Gagne, 2014). There are two enactment of principle that is set
into place on a domain level. First the principle of least privileges gives
users, programs, and system a certain amount of access that will allow a task to
be completed. Second from of domain protection that is to the before mention
least privilege is the principle of need-to-know privilege which limits any
damage a compromised process can do in a system. Language-based protection offers
the following advantages: Specification
of protection in a programming language allows the high-level description of
policies for the allocation and use of resources. Language implementation can
provide software for protection enforcement when automatic hardware supported
checking is unavailable. Interpret protection specifications to generate calls
on whatever protection system is provided by the hardware and the operating
system (Chandra, S., 2006). The security model and protection state
of a computing system is the access matrix. It uses specific access rights for
each process running on a domain and for each object on that domain. The access
matrix is a general model of protection that provides a mechanism for
protection without imposing a particular protection policy on the system or its
users (Silberschatz, Galvin, & Gagne, 2014). There are four methods to implement
access matrix and goes as followed:
- Global Table- It is the most basic access
matrix implementation.
- Access Lists for Objects- Each
column in the access matrix can be implemented as an access list for one
object.
- Capability Lists for Domains- is a
list of objects together with the operations allowed on those objects.
- Lock-Key Mechanism- A process
executing in domain can access an object only if that domain has a key
that matches one of the locks of the object.
The
security and protection used to protect programs, systems and networks from
threats has evolved significantly. Cyber security experts are the most demanded
in the IT field today to combat cybercriminal both foreign and domestic. Corporations
and institution however still rely on their own expert staff to protect valued data
from harm. By applying everyday maintenance and perform system check list like viral
scanning can go a long way. The most common techniques used to protect operating systems
include the use of antivirus software and other endpoint protection measures,
regular OS patch updates, a firewall for monitoring network traffic, and
enforcement of secure access through least privileges and user controls
(Hysolate.com).
Reference:
Silberschatz,
A., Galvin, P. B., & Gagne, G., (2014). Operating system concepts essentials (2nd ed.).
Retrieved from https://redshelf.com/
Techopedia (2020). File Management System. https://www.techopedia.com/definition/1832/file-management-system#:~:text=A%20file%20management%20system%20is,special%20office%20documents%20and%20records.
El-Ghazawi, T., Frieder, G. (2003). Input-output operations.
https://dl.acm.org/doi/abs/10.5555/1074100.1074484#:~:text=Input%2Doutput%20(I%2FO,sequence%20of%20I%2FO%20operations.
Geeksforgeeks.org 2020. Process Table and Process
Control Block (PCB). https://www.geeksforgeeks.org/process-table-and-process-control-block-pcb/
Tutorials Point, (2018). Single-threaded and
Multi-threaded Processes. Single-threaded and Multi-threaded Processes. https://www.tutorialspoint.com/single-threaded-and-multi-threaded-processes
Monum, A., (2022). What is the critical section
problem in operating systems?. https://www.educative.io/answers/what-is-the-critical-section-problem-in-operating-systems
Techopedia, (2020). File Management System. What Does
File Management System Mean? https://www.techopedia.com/definition/1832/file-management-system#:~:text=A%20file%20management%20system%20is,special%20office%20documents%20and%20records.
Tutorialandexamples.com, 2020. Directory Structure in
Operating System. https://www.tutorialandexample.com/directory-structure-in-operating-system
Chandra, S., (2006). Language-Based Protection. https://surendar.chandrabrown.org/teach/spr06/cse30341/Lectures/Lecture31.pdf
Hysolate.com. Understanding OS
Security: Threats and Security Controls. https://www.hysolate.com/learn/sandboxing/understanding-os-security-threats-and-security-controls/#:~:text=The%20most%20common%20techniques%20used,least%20privileges%20and%20user%20controls.
No comments:
Post a Comment