Contemporary
operating systems play a crucial role in how individuals interact with
computers. One way to simplify the interaction is to view an operating system
(OS) as a liaison between the user and computer hardware. Means of
communication can be achieved by different user interfaces (UIs), such as a
graphical user interface (GUI), a command line, or a command line. The
"operating system is the one program running at all times on the
computer" (Silberschatz et al., 2014, p.6). Operating systems seamlessly
perform multiple jobs in the background, making the usability of computers more
manageable for the user. An operating system has many vital responsibilities,
making it possible for computers to operate efficiently.
Features of Contemporary Operating
Systems and Their Structures
Process Management ensures processes
sent to the CPU are executed efficiently, including how and when a process is
sent. Often, multiple processes are running at once, and it is process
management regulating the actions. Successful process management entails the
operating system allocating and controlling how much time is utilized per
process to ensure effective execution. Another responsibility of the OS is
Memory Management. Memory Management keeps track of data storage, loading, and
allocation. A series of reads or writes to a specific memory address enables
interaction, allocates which processes require memory, and determines how much
and how long it is needed. Next, there is Storage Management in the list of
vital OS responsibilities. "The operating system abstracts from the
physical properties of its storage devices to define a logical storage
unit"(Silberschatz et al., 2014, p.6). Storage management is the means an
OS uses to store and arrange data in a way that a user can access and
understand. An example of storage management many users are familiar with is
the user of saved files within folders on a desktop. Protection and Security
are the gatekeepers of data and resources within a computer. Although
representing two separate functions, they are often linked together as they
work hand and hand to regulate resources. For multiple users sharing a
computer, "mechanisms ensure that files, memory segments, CPU, and other
resources can be operated on by only those processes that have gained proper authorization
from the operating system." (Silberschatz et al., 2014, p.6). Last on the
list is Device Management, which tracks each device within the system and
utilizes device drivers to communicate between the devices and the operating
system.
How Operating Systems Enable Processes
to Share and Exchange Information
A process contains a process number,
process state, counter, registers, file lists, and memory constraints. Stages
encountered during process execution are referred to as the process state, and
the status describes what occurs. An OS determines how and when a process
should be executed by determining its state within the process control block.
Process states referenced within the process control block are new, ready,
waiting, running, and terminated. The rate at which processes are executed also
depends on the threading model. With a single CPU, single-threaded processes
execute instructions one at a time. A device with a single processor can
simulate running many processes by quickly switching between threads in
different processes. Multi-threaded processes can process multiple tasks
simultaneously. Multithreading can be accomplished using three models. A
many-to-many model allows for several threads to the multiplexed to the same
number of kernels or smaller. A many-to-one model makes it possible to take
threads from multiple users and map them to a single kernel thread. Lastly, a
one-to-one model performs as the name dictates in a one-to-one type of
relationship. Often multiple threads need to access a single variable, referred
to as a critical-section. A problem arises when many threads attempt to access
a critical section simultaneously and when one thread modifies a variable while
another thread tries to access it. When such circumstances occur, a software
solution called Peterson’s Solution can be used as it “is restricted to two
processes that alternate execution between their critical sections and
remainder sections” (Silberschatz et al., 2014, p.208). However, to resolve the
critical-section problem, mutual exclusion, progress, and bonded waiting must
be met.
How Main
Memory and Virtual Memory Can Solve Memory Management Issues
Effective memory management is critical to how an OS
performs. An OS shares space within memory; therefore, proper memory management
is vital. Memory management aims to handle allocation, deallocation, process
tracking, utilization maintenance, and data integrity and ensure appropriate
main memory utilization (GeeksforGeeks, 2021). Main memory utilizes a physical
address, while virtual memory addresses are logical. When a program executes,
the memory management unit (MMU) must map the CPU's logical address spaces into
physical address spaces. Address binding can take place during compilation,
loading, or execution. If finished while compiling, absolute code is produced,
and it might be necessary to recompile the code before running. If completed at
load time, the compiler generates relocatable code because final binding does
not take place until load time, as the physical address was unknown when first
compiled.
How Files, Mass Storage, and I/O are
Handled In a Modern Computer System
File systems management is responsible for collecting and
storing data in a manageable way for a user to access. Secondary storage houses
the file system, separated into sections, and acts as a user interface to
access disk data. How extensive the sections within a file system are will
depend on the size of the disk; however, it is essential to note the section
belonging to the disk is usually fixed. Multiple directory structures can be
utilized in file management. All files stored in one directory is referred to
as a single directory. If there are multiple users, a single directory will be
challenging as there are tracking limitations for multiple user files. More
suitable for multiple users is a two-level directory system. A master file
directory keeps track of user jobs; logins and files are separated by each
username. Tree-structure directories are an option to allow users to create and
manage subdirectories if needed. Acyclic-graph directories enable files to be
located in multiple locations and shared by users, allowing each user to view
the file in a subdirectory. General-graph directories are used to prevent
redundant file searches.
Input devices send information to the operating system to be
processed, whereas output devices display the processed information. Keyboards,
microphones, and a mouse are input devices as they send data to the operating
system to be processed; however, monitors, speakers, and printers are output
devices as they relay the information processed. The CPU and OS are tasked with
determining input and how output transmits to the user.
Necessary Mechanisms to Control
Access of Programs and Users
Domain- and language-based protection in a modern computer
system primarily aims to safeguard data and processes. Another goal is “to
prevent the mischievous, intentional violation of an access restriction by a
user” (Silberschatz et al., 2014, p. 602). The concept of least privilege is used to ensure users only have access to the area they need. Setting up user
rights in this manner ensures users cannot mistakenly access files they should
not access and protects against malicious behaviors. Programmers write within
the code language-based protection and dictate whatever rules are needed within
a program. Ultimately, “the specification of protection in a programming
language allows the high-level description of policies for the allocation and
use of resources” (Silberschatz et al., 2014, p. 622). Domain-based protection
allows access rights to be granted to processes running within the domain on
various objects. An access matrix is visibly represented as a chart of rows and
columns. All entries within the matrix have their own set of corresponding
rights. An “access matrix provides an appropriate mechanism for defining and
implementing strict control for both static and dynamic association between
processes and domains” (Silberschatz et al., 2014, p. 609). Securing networks,
systems, and programs is achieved by utilizing passwords, virus protection,
encryption, firewalls, and multifactor authentication. To further protect
against system vulnerabilities, software patches, along with frequent security
testing, can be performed.
References
GeeksforGeeks. (2021, August 18). Memory
Management in Operating System. GeeksforGeeks. https://www.geeksforgeeks.org/memory-management-in-operating-system/
Silberschatz, A., Galvin, P. B., & Gagne,
G. (2014). Operating system concepts essentials (2nd ed.). Retrieved from https://redshelf.com/