
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
In this study guide, we covered the basics of operating system, software and its types, process scheduling, memory management, and security. We discussed the different process scheduling algorithms, process states, and interrupt handlers. We also covered the concepts of deadlock and starvation, and the dining philosophers problem. Additionally, we discussed the basics of memory management, including memory allocation and deallocation, and memory protection. Finally, we covered the basics of security, including security threats and security measures.## Computing Ethics and Responsibilities
Typology: Schemes and Mind Maps
1 / 24
This page cannot be seen from the preview
Don't miss anything!

















An operating system is the software that controls the overall operation of a computer. It provides the means by which a user can store and retrieve les, provides the interface by which a user can request the execution of programs, and provides the environment necessary to execute the programs requested.
Windows UNIX Mac OS Solaris Linux
Computers were not very exible or ef cient Machines occupied entire rooms Program execution required signi cant preparation of equipment The execution of each program, called a job, was handled as an isolated activity
The separation of users and equipment, which eliminated the physical transition of people in and out of the computer room A computer operator was hired to operate the machine Users submitted their programs, data, and special directions to the operator The operator loaded these materials into the machine's mass storage, where a program called the operating system could read and execute them one at a time
Component Description Job A program, data, and directions
Job Queue A storage organization in which jobs are ordered in rst-in, rst- out fashion Job Control Language
A system used to encode instructions explaining the steps required to prepare the machine for a particular job
Allowed a program being executed to carry on a dialogue with the user through remote terminals Featured real-time processing, where the computer performed tasks under a deadline Required the computer to respond promptly to user input
Provided service to multiple users at the same time Implemented using multiprogramming, where time is divided into intervals and the execution of each job is restricted to only one interval at a time Created the illusion of several jobs executing simultaneously
Key Terms
Embedded systems: computers dedicated to speci c tasks, such as medical devices, vehicle electronics, home appliances, cell phones, or other hand-held computers Embedded operating systems: operating systems designed for embedded systems, often expected to conserve battery power, meet demanding real-time deadlines, or operate continuously with little or no human oversight
Operating System Description
VxWORKS
Developed by Wind River Systems, used in the Mars Exploration Rovers Windows CE Developed by Microsoft, also known as Pocket PC
Palm OS Developed by PalmSource, Inc., especially for use in hand-held devices
Software can be classi ed into two broad categories: application software and system software.
Application software: programs for performing tasks particular to the machine's utilization Examples: spreadsheets, database systems, desktop publishing systems, accounting systems, program development software, and games
System software: software that performs tasks common to computer systems in general Examples: operating systems, utility software
Utility software: software units that extend or customize the capabilities of the operating system Examples: software to format a magnetic disk, copy a le from a magnetic disk to a CD, compress and decompress data, play multimedia presentations, and handle network communication
Category Description Application Software
Programs for performing tasks particular to the machine's utilization
System Software Software that performs tasks common to computer systems in general
Utility Software Software units that extend or customize the capabilities of the operating system Operating System
The software that manages the computer system and provides the infrastructure for application software
Linux: an operating system originally designed by Linus Torvalds while a student at the University of Helsinki Non-proprietary: available, along with its source code and documentation, without charge Reliable: recognized as one of the more reliable operating systems available today## Components of an Operating System
The user interface is the portion of an operating system that handles communication with the user. It acts as an intermediary between the user and the operating system's kernel.
User Interface: The part of an operating system that allows users to interact with the computer.
Device Driver Function Description
Device Communication
Translates generic requests into technical steps required by the device Device Control Carries out operations on the peripheral device
The memory manager is responsible for coordinating the machine's use of main memory. Its duties include:
Assigning memory space for programs and data Ensuring program actions are restricted to allotted space Keeping track of occupied and unoccupied memory areas Creating the illusion of additional memory space through paging Memory Manager Function Description Memory Allocation Assigns memory space for programs and data Memory Protection Ensures program actions are restricted to allotted space Memory Management Keeps track of occupied and unoccupied memory areas
Virtual Memory
Virtual Memory is a large ctional memory space created by paging, which allows a computer to function as though it has more main memory than it actually does.
Paging: a memory management technique that divides main memory into uniform-sized units called pages, which are typically a few KB in size. Main Memory: a computer's primary memory, which is volatile and loses its data when the computer is turned off.
Boot Process
The boot process, also known as booting, is the procedure that transfers the operating system from mass storage into main memory when a computer is turned on.
ifnecessary
Boot Loader: a program permanently stored in a computer's ROM that directs the CPU to transfer the operating system into main memory. ROM: a type of non-volatile memory that can be read but not altered.
Firmware
Firmware is a type of software that is stored in non-volatile memory, such as FlashROM, and is used to perform fundamental input/output activities.
BIOS : a widely used rmware system in PCs. EFI : a newer rmware system used in PCs. Open Firmware: a rmware system used in Sun computers, now a product of Oracle. CFE : a rmware system used in many embedded devices.
Booting Procedure
The booting procedure involves the following steps:
Operating System Architecture
Read ā OnlyMemory
BasicInput / OutputSystem ExtensibleF irmwareInterface
CommonF irmwareEnvironment
A process table is a data structure that contains information about each process in the system, including the memory area assigned to the process, the priority of the process, and whether the process is ready or waiting.
Each time the execution of a program is requested, the scheduler creates a new entry for that process in the process table.
Dispatcher
The dispatcher is the component of the kernel that oversees the execution of the scheduled processes. In a time-sharing/multitasking system, this task is accomplished by multiprogramming, which involves dividing time into short segments called time slices and switching the CPU's attention among the processes as each is allowed to execute for one time slice.
Time Slice Description Time Slice A short segment of time allocated to a process for execution Process Switch The procedure of changing from one process to another
Interrupt A signal generated by the timer circuit to indicate the end of a time slice
Process State
A process's state includes the value of the program counter as well as the contents of the registers and pertinent memory cells. CPUs designed for multiprogramming systems incorporate the task of saving this information as part of the CPU's reaction to the interrupt signal.
Interrupts
Interrupts provide an important tool for coordinating a computer's actions with its environment. There are many situations in which an interrupt signal is generated, each with its own interrupt routine.
Interrupt Description
Power Failure The highest priority interrupt, generated if the computer's power is unexpectedly disrupted Mouse Click An interrupt signal generated when the mouse is clicked Keyboard Press
An interrupt signal generated when a key is pressed on the keyboard
Multiprogramming allows multiple processes to share the CPU's time, increasing the overall ef ciency of the machine. This is because the time that a process is waiting for peripheral devices to complete tasks or for a user to make the next request is not wasted.
Bene ts of Multiprogramming Description
Increased Ef ciency Multiprogramming allows multiple processes to share the CPU's time, increasing the overall ef ciency of the machine
Reduced Waiting Time
The time that a process is waiting for peripheral devices to complete tasks or for a user to make the next request is not wasted
An important task of an operating system is the allocation of the machine's resources to the processes in the system. This includes the allocation of access to les, mass storage space, memory space, space in the process table, and time slices.
A semaphore is a variable that controls the access to a shared resource by multiple processes. In a time-sharing/multitasking operating system, semaphores are used to manage the allocation of resources such as printers and disk drives.
When multiple processes compete for a shared resource, such as a printer, the operating system must ensure that only one process can access the resource at a time.
One approach to controlling access to a shared resource is to use a ag, which is a bit in memory that can be set or cleared.
A ag is a bit in memory whose states are often referred to as set and clear, rather than 1 and 0.
However, this simple ag system has a problem. The task of testing and possibly setting the ag may require several machine instructions, which can lead to con icts between processes.
A semaphore is a variable that controls the access to a shared resource by multiple processes.
A semaphore can be used to guard a critical region of code, ensuring that only one process can execute it at a time.
Step Description
The process checks the state of the semaphore. If it is clear, the process can proceed.
The process clears the semaphore to indicate that it is no longer using the shared resource.
Deadlock is a condition in which two or more processes are blocked from progressing because each is waiting for a resource that is allocated to another.
Condition Description
Multiple processes are competing for a resource that cannot be shared.
Processes are allocated some resources, but not all the resources they need.
Once a resource is allocated, it cannot be forcibly retrieved.
Require each process to request all its resources at one time. Convert non-sharable resources into sharable ones.
Allocate le access according to the needs of the processes, allowing multiple processes to have read access but only one to have write access. Divide the le into pieces, allowing different processes to alter different parts of the le concurrently.
Modern systems continue to multitask by switching rapidly between time slices, but multi-core CPUs can genuinely run multiple processes simultaneously. The dispatcher and scheduler must consider which processes to execute on each core.
Multi-Core CPU Description Multiple independent processors Share the computer's peripherals, memory, and other resources
Dispatcher and scheduler
Must consider which processes to execute on each core
Handling competition among processes becomes more challenging in multi-core systems because disabling interrupts on all cores whenever one needs to enter a critical region would be highly inef cient.
Security: the responsibility of the operating system to protect the computer's resources from access by unauthorized personnel.
The operating system protects the computer's resources by:
Establishing accounts for authorized users Controlling access to the system through login procedures Monitoring activity within the computer system using auditing software
cores
Auditing Software
Auditing software records and analyzes activities within the computer system to detect:
Floods of attempts to login using incorrect passwords Activities within a user's account that do not conform to their past behavior Presence of snif ng software
Attacks from Within
Once an intruder gains access to a computer system, they can:
Explore the system looking for information of interest or places to insert destructive software Use the administrator's account to gain highly privileged access to the operating system
User Carelessness
One of the major obstacles to computer security is the carelessness of users themselves, including:
Selecting easy-to-guess passwords Sharing passwords with friends Failing to change passwords on a timely basis Importing unapproved software into the system
Security Policies
Institutions with large computer installations adopt and enforce policies that catalog the requirements and responsibilities of users to prevent security breaches.## Security Threats and Countermeasures
Password Security
Security Threat Description Accessing Memory Cells Outside Allotted Area
A process can read and alter data being used by other processes Accessing Peripheral Devices Directly
A process can read les without supervision by the system's le manager
Altering the Timer A process can extend its time slice and dominate the machine
When a process's time slice is over, the operating system's dispatcher must decide which process to execute next. The dispatcher uses a scheduling algorithm to make this decision.
First-Come-First-Served : The process that arrives rst is executed rst. Shortest Job First : The process with the shortest burst time is executed rst. Priority Scheduling: The process with the highest priority is executed rst.
A process can be in one of the following states:
State Description Running The process is currently being executed by the CPU. Waiting The process is waiting for a resource or event to occur. Ready The process is ready to be executed by the CPU.
Zombie The process has nished execution but its parent process has not yet acknowledged its termination.
Interrupt Handlers
An interrupt handler is a routine that handles an interrupt, which is a signal to the CPU that an event has occurred. The interrupt handler saves the current state of the process, handles the interrupt, and then restores the process's state.
Deadlock
Deadlock occurs when two or more processes are blocked inde nitely, each waiting for the other to release a resource.
"A deadlock is a situation in which two or more processes are unable to proceed because each is waiting for the other to release a resource."
There are three necessary conditions for deadlock to occur:
Starvation
Starvation occurs when a process is unable to gain access to a resource because other processes are holding onto the resource for an extended period.