The document provides an overview of process, memory, storage, and file management within operating systems, detailing the responsibilities of the OS in managing these resources. It also discusses various computing environments, including traditional computing, mobile computing, distributed systems, client-server computing, peer-to-peer computing, virtualization, cloud computing, and real-time embedded systems. Additionally, it describes fundamental kernel data structures such as lists, stacks, queues, trees, hash functions, and bitmaps.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views23 pages
OS PPT Unit 1.2
The document provides an overview of process, memory, storage, and file management within operating systems, detailing the responsibilities of the OS in managing these resources. It also discusses various computing environments, including traditional computing, mobile computing, distributed systems, client-server computing, peer-to-peer computing, virtualization, cloud computing, and real-time embedded systems. Additionally, it describes fundamental kernel data structures such as lists, stacks, queues, trees, hash functions, and bitmaps.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23
Process Management
• A program does nothing unless its instructions are executed
by a CPU. A program in execution, as mentioned, is a process. • A process needs certain resources—including CPU time, memory, files, and I/O devices—to accomplish its task. • These resources are either given to the process when it is created or allocated to it while it is running. • A program is a passive entity, like the contents of a file stored on disk, whereas a process is an active entity. • A single-threaded process has one program counter specifying the next instruction to execute. • A process is the unit of work in a system. A system consists of a collection of processes, some of which are operating-system processes and the rest of which are user processes The operating system is responsible for the following activities in connection with process management
• The operating system is responsible for the following activities
in connection with process management: • Scheduling processes and threads on the CPUs • Creating and deleting both user and system processes • Suspending and resuming processes • Providing mechanisms for process synchronization • Providing mechanisms for process communication
Process-management techniques discussed later
Memory Management • Main memory is a large array of bytes, ranging in size from hundreds of thousands to billions. Each byte has its own address. • The central processor reads instructions from main memory during the instruction-fetch cycle • For a program to be executed, it must be loaded into memory. • As the program executes, it accesses program instructions and data from memory. • When the program terminates, its memory space is made free for the next program can be loaded and executed. • To improve the utilization of the CPU and the speed of the computer's response to its users, keep several programs in memory, creating a need for memory management. The operating system is responsible for the following activities in connection with memory management
• Keeping track of which parts of memory are currently being
used and who is using them • Deciding which processes (or parts of processes) and data to move into and out of memory • Allocating and deallocating memory space as needed
Memory-management techniques are discussed later
Storage Management
• The operating system abstracts from the physical properties
of its storage devices to define a logical storage unit, the file. • The operating system maps files onto physical media and accesses these files via the storage devices. File-System Management • File management is one of the most visible components of an operating system. • Computers can store information on several different types of physical media. • Magnetic disk, optical disk, and magnetic tape are the most common. • A file is a collection of related information • Files represent programs and data. Data files may be numeric, alphabetic, alphanumeric, or binary. • The operating system implements the abstract concept of a file by managing mass-storage media, such as tapes and disks. • Files are normally organized into directories to make them easier to use. • When multiple users have access to files, it may be desirable to control which user may access a file and how that user may access it. The operating system is responsible for the following activities in connection with file management
• Creating and deleting files
• Creating and deleting directories to organize files • Supporting primitives for manipulating files and directories • Mapping files onto secondary storage • Backing up files on stable (nonvolatile) storage media
File-management techniques are discussed later
Kernel Data Structures
• In this section, we briefly describe several
fundamental data structures used extensively in operating systems. – Lists, Stacks, and Queues – Trees – Hash Functions and Maps – Bitmaps Lists, Stacks, and Queues • List represents a collection of data values as a sequence. The most common method for implementing this structure is a linked list, in which items are linked to one another.
• Linked lists are of several types:
– singly linked list – doubly linked list – circularly linked list • A stack is a sequentially ordered data structure that uses the last in, first out (LIFO) principle for adding and removing items, i.e the last item placed onto a stack is the first item removed. The operations for inserting and removing items from a stack are known as push and pop. • A queue, is a sequentially ordered data structure that uses the first in, first out (FIFO) principle: items are removed from a queue in the order in which they were inserted. • A tree is a data structure that can be used to represent data hierarchically. Data values in a tree structure are linked through parent–child relationships. In a general tree, a parent may have an unlimited number of children. In a binary tree, a parent may have at most two children, which we term the left child and the right child. • A hash function takes data as its input, performs a numeric operation on this data, and returns a numeric value. This numeric value can then be used as an index into a table (typically an array) to quickly retrieve the data. • One use of a hash function is to implement a hash map • A bitmap is a string of n binary digits that can be used to represent the status of n items. • For example, suppose we have several resources, and the availability of each resource is indicated by the value of a binary digit: • 0 means the resource is available • 1 indicates that it is unavailable Computing Environments • How operating systems are used in a variety of computing environments. – Traditional Computing – Mobile Computing – Distributed Systems – Client–Server Computing – Peer-to-Peer Computing – Virtualization – Cloud Computing – Real-Time Embedded Systems Traditional Computing • Consider the “typical office environment.” Just a few years ago, this environment consisted of PCs connected to a network, with servers providing file and print services. Remote access was awkward, and portability was achieved by use of laptop computers. Mobile Computing • Mobile computing refers to computing on handheld smartphones and tablet computers. These devices share the distinguishing physical features of being portable and lightweight. Historically, compared with desktop and laptop computers, mobile systems gave up screen size, memory capacity, and overall functionality Distributed Systems • A distributed system is a collection of physically separate, possibly heterogeneous, computer systems that are networked to provide users with access to the various resources that the system maintains. Access to a shared resource increases computation speed, functionality, data availability, and reliability. Client–Server Computing • As PCs have become faster, more powerful, and cheaper, designers have shifted away from centralized system architecture. Terminals connected to centralized systems are now being supplanted by PCs and mobile devices. Peer-to-Peer Computing • In this model, all nodes within the system are considered peers, and each may act as either a client or a server, depending on whether it is requesting or providing a service. Virtualization • Virtualization is a technology that allows operating systems to run as applications within other operating systems. Cloud Computing • Cloud computing is a type of computing that delivers computing, storage, and even applications as a service across a network. • There are actually many types of cloud computing, – Public cloud—a cloud available via the Internet to anyone willing to pay for the services – Private cloud—a cloud run by a company for that company's own use – Hybrid cloud—a cloud that includes both public and private cloud components Real-Time Embedded Systems • Embedded systems almost always run real-time operating systems. • A real-time system is used when rigid time requirements have been placed on the operation of a processor or the flow of data. • Sensors bring data to the computer. • Processing must be done within the defined constraints, or the system will fail.