'Platform Technology Prelims

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

The OS, as a computer interface, provides services to the following areas (Stallings, 2018):

• Program development: The OS provides a variety of facilities and services in the form of utility
programs, such as editors and debuggers, for program development, which is also referred to
as application programdevelopment tools.
• Program execution: The OS handles different processes, such as loading data into the memory
and scheduling, which must be performed to execute programs.

• Access to I/O devices: The OS provides a uniform interface that hides complex sets of
instructions for I/O devices' operation.
• Control access to files: The OS encompasses a detailed understanding of the structure of data
contained in a file storage and can provide some protection mechanisms to control file access.

• System resource access: The OS controls access to the whole system and to some specific
system resources through access functions and authorizations.

• Error detection and response: The OS can detect errors, such as device failure and
software errors, and provide appropriate responses that would clear the error condition
with the least impact on running applications.

• Performance parameter monitoring: The OS must be able to collect usage statistics from
various processes, such as response time, that can be used as a basis for system performance
improvements.
• Instruction Set Architecture (ISA): The ISA defines the collection of machine language
instructions that a computer can follow. The OS has access to additional machine language
instructions that deal with managing a system's ISA.
• Application Binary Interface (ABI): The ABI defines a standard for binary portability across
programs. It defines the system call interface to the OS and the hardware resources and
services available in a system through the ISA.

• Application Program Interface (API): The API allows a program to the hardware resources and
services available in a system through that ISA, supplemented with high-level language library
calls. It also enables easier porting of application software.

EVOLUTION OF OS
1. SERIAL PROCESSING
• From late 1940s to the mid-1950s, programmers interact directly with computer hardware
since operating systems (OS) are not yet available.
• Computers are run from a console consisting of display lights, toggle switches, an input
device, and a printer. Programs in machine code were loaded via input device, such as a card
reader. Error conditions are indicated by the display lights. If a program executes successfully,
the output is printed.

2. SIMPLE BATCH SYSTEM


• To improve processor utilization, the concept of batch operating system was developed in the
mid-1950s by General Motors Research Laboratories. It processed jobs in bulk, with
predetermined input from files or other data resources.

• The main idea behind batch processing is the utilization of a piece of program known as the
monitor or resident monitor. The monitor provides automatic job sequencing as indicated by
the control cards. If a control card indicates that a program is to be run, the monitor loads the
program into memory and transfers control to it. When the program completes, it transfers the
control back to the monitor. Then, it reads the next control card, loads the appropriate
program, and so on. This cycle is repeated until all control cards are interpreted for the job.

3. MULTI-PROGRAMMED BATCH SYSTEMS


• This kind of operating system is more sophisticated compared to single- programmed
systems. Several ready-to-run jobs must be kept in the main memory, requiring some form of
memory management. If several jobs areready to run, the processor decides which one to run,
and that decision requires a specific algorithm for scheduling. It basically allows the processor
to handle multiple jobs at a time.

4. TIME -SHARING SYSTEMS


• multiple users simultaneously access the system through terminals, with the operating
system interleaving the execution of each user program in a short burst time or quantum
computation.

5. Compatible Time-sharing System (CTSS)


was one of the first time- sharing operating systems that was developed. It was developed
at the Massachusetts Institute of Technology (MIT) by the group Project MAC, for the IBM
709 computer system.

KERNEL COMPONENTS OF WINDOWS OS


1. Windows Executive – This contains the core OS modules/services for specific functions
and provides an API for user-mode software. The following are its functions:
a. I/O manager - This provides a framework through which I/O devices are
accessible to applications.
b. Cache manager – This improves the performance of file-based I/O by allowing
recently referenced file data to reside in the main memory for quick access.
c. Object manager – This creates, manages, and deletes Windows Executive objects
that are used to represent resources such as processes, threads, and
synchronization objects, while enforcing uniform rules for retaining, naming, and
setting the security of the objects.
d. Plug-and-play manager – This determines which drivers are required to support
a particular device and loads those drivers.
e. Power manager - This coordinates the power consumption among various
devices. It can be configured to reduce power by shutting down idle devices or
the entire system, or setting the processor to sleep.
f. Security reference monitor – This enforces the access validation and audit-
generation rules for all protected objects including files, processes, address
spaces, and I/O devices.
g. Virtual memory manager – This manages virtual addresses,physical memory, and
paging files on a disk.
h. Process/thread manager – This creates, manages, and deletes processes and
thread objects.
i. Configuration manager – This is responsible for implementing and managing the
system registry, which serves as the repository for both system-wide and per-
user settings of various parameters.
j. Advanced local procedure call (ALPC) facility – This implements an efficient
cross-process call mechanism for communication between local processes
implementing services and subsystems.
k. Windows Kernel – This is considered the core software of the OS. It controls the
execution of the processors. This manages thread scheduling, process switching,
exception and interrupt handling, and multiprocessor synchronization. Note that
the Kernel's own code does not run in threads.
l. Hardware abstraction layer (HAL) – This isolates the OS from platform-specific
hardware variances. It makes each computer's system bus, direct memory access
(DMA) controller, interrupt controller, system timers, and memory controller
look the same to the Windows Executive and Kernel components.
m. Device drivers – These are dynamic libraries that extend the functionality of the
Windows Executive. These include hardware device drivers that translate user
I/O function calls into specifichardware device I/O request, and software
components for implementing file systems, network protocols, and any other
system extensions that need to run in kernel-mode.
n. Windowing and graphing system – This implements the graphical user interface
(GUI), such as the user interface controls and illustrations.

PROCESS
• A process can be a program in execution.
• A process can be an instance of a program running on a computer.
• A process can be considered as an entity that can be assigned to and executed on a
processor.

• A process can be treated as a unit of activity that executes a sequence of instructions, a


current state, and an associated set of system resources.
• A process can also be defined as an environment that consists of a number of elements for
executing a user-level program.

There are two (2) essential elements of a process, PROGRAM CODE – which can be shared with
other processes that are executing the same program
SET OF DATA associated with the program code. Note that a computer's kernel can execute
multiple processes at a time, thus supporting thousands of processes on a single system
(Gregg, 2021).

At any given point in time, while a program is executing, the process itself can be uniquely
characterized by the following elements:

• Identifier – It is a unique identifier for each process.


• Process State – It indicates the current activity of a process.
o New – The process is being created.
o Ready – The process is waiting to be assigned to a processor.
o Running – The instructions are being executed.
o Waiting – The process is waiting for a particular event to occur.
o Terminated – The process has finished the execution.

• Priority – It refers to the priority level relative to other processes.


• Program counter – It indicates the address of the next instruction to be executed for a
particular process.
• Memory pointer – It contains pointers to program codes and data associated with the
process, including any memory blocks shared with other processes.
• Context data – These are the data present in a processor's registers during process execution.

PROCESS STATE MODELS


1. TWO-STATE Process Model (Stallings, 2018)
An operating system controls the course of execution that involves the process of determining
an interleaving pattern for execution and allocating resources to processes.
• NOT RUNNING state – When the OS creates a new process, it creates a process control block
for the new process and adds the new process into the not running state of the system. Then,
the process waits for an opportunity to execute.
• RUNNING state – The dispatch portion of the OS selects a particular process to run. Then, it
enters the running state. Intermittently, the currently running process will be interrupted and
the dispatch portion has to select other processes to run. Subsequently, the interrupted
process returns to the queue in the not running state, while a completed process exits the
system.

2. FIVE-STATE Process Model (Stallings, 2018)


This model naturally handles processes through the implementation of five unique states which
are the following:
• NEW state: A process that has just been created and has not yet been admitted to the pool of
executable processes by the OS.
• READY state: A process that is prepared to execute when given the opportunity.
• RUNNING state: The process that is currently being executed.
• BLOCKED state/WAITING state: A process that cannot execute until some event occurs, such
as the completion of an I/O operation.
• EXIT state: A process that has been released from the pool of executable processes by the OS,
either because it halted or it was terminated.

FOUR DIFFERENT TYPES OF TABLE MAINTAIN BY OS:


1. MEMORY tables – These are used to keep track of both the main and the secondary
memory. A part of the main memory is reserved for OS utilization, while the remaining
parts are available for the processes' utilization. Note that processes are maintained on
the secondary memory using some sort of virtual memory or a simple swapping
mechanism. The memory tables must encompass the following information:

o The allocation of the main memory processes


o The allocation of the secondary memory processes
o Any protection attribute for the main or the virtual memory
o Any information needed to manage the virtual memory

2. I/O tables – These are used by the OS to manage the input and output devices and channels
of a computer system at any given point in time.
3. File tables – These tables hold information regarding the existence of files and its
corresponding attributes through a file management system.

4. Process tables – These tables are maintained by the OS to manage processes.

PROCESS LOCATION: At a minimum, a process must include a program to be executed.


Associated to this program is a set of data locations for local and global variables and any
defined constants. Thus, a process will always encompass sufficient memory to hold a program
and its corresponding data.
Process control blocks are also referred to as PROCESS IMAGES. The location of a process image
will depend on the memory management scheme being used. In the simplest case, a process
image is maintained as a continuous block of memory maintained in the secondary memory.

PROCESS ATTRIBUTES: A multiprogramming system requires a great deal of information about


each process that resides in a process control block. There are different types of information
that might be of use to an OS without considering any details as to how that information is
organized.
The information in a process control block can be grouped into three (3) categories:
1. PROCESS IDENTIFICATION – This involves unique numeric identifiers that are assigned to
specific processes, which can simply be an index into a primary process table, or identifiers for
cross-referencing process tables.
2. PROCESSORS STATE information – This consists of processor registers' information. During
process execution, information are in the registers. When a process is interrupted, all
information in the registers must be saved so it can be restored when the process resumes
execution.

3. PROCESS CONTROL INFORMATION– This contains the additional information needed by the
OS to control and coordinate various active processes, such as the data structure, resource
ownership and utilization information, and process privileges.

MODES OF EXECUTION
USER MODE – This is referred to as the less-privileged mode, since user programs execute in
this mode.
KERNEL MODE - This is referred to as the more-privileged mode, where the software has
complete control of the processor and its instructions, registers, and memory.

TWO POSSIBLE MAIN PROBLEMS IN SERIAL PROCESSING ARE:

1. SCHEDULING: Installations used a hardcopy sign-up sheet to reserve computer time. A user
could sign up for an allocated block of time, but is unable to maximize the allocation. Thus,
resulting in wasted computer processing time.
2. SET-UP TIME: A single program, called a job, involves numerous sequenced set-up processes
that involve mounting and dismounting of tapes and setting up card decks. If an error occurred,
the user had to go back to the beginning of the setup sequence. Thus, a considerable amount of
time was spent in setting up the program before it even runs.

HOW MEMORY TABLES CONTRIBUTE TO EFFECTIVE MANAGEMENT OF COMPUTER


OPERATIONS
Memory tables are used to keep track of both the main and the secondary memory. A part of
the main memory is reserved for OS utilization, while the remaining parts are available for the
processes' utilization. Memory tables encompass the allocation of the main memory processes
and secondary memory processes. Any protection attribute for the main or the virtual memory
and information needed to manage the virtual memory.

IMPORTANCE OF SCHEDULING AND RESOURCE MANAGEMENT IN MODERN OPERATING


SYSTEM.
Modern computer systems consists of processors, memory, storage disks, terminals, network
interfaces, printers as well as other devices. One of the functions of the operating system is to
provide for an orderly and well controlled allocation of the processors, memory and other
resources among the programs or applications that may be competing for them. The Scheduler
is a very important part of the operating system. It performs these tasks using scheduling
algorithm. We would now look at a number of scheduling algorithms employed by the
scheduler in allocating and controlling resource usage.

You might also like