Nothing Special   »   [go: up one dir, main page]

Operating Systems: - Chapter 1

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

Operating Systems

• Chapter 1:
1- What’s the operating system?
➢ It’s a software program that acts as an intermediate layer between the
computer’s hardware and the user.
2- What are the goals of the operating system? (The main purposes)
➢ Uses the computer hardware in an efficient manner. (Manage resources)
➢ Provides an interface for users to make the computer convenient to use.
➢ Enable communication between the hardware and software.
➢ Execute user programs and make solving user problems easier.
3- Draw the computer system structure and discuss its components.
➢ Computer system can be divided into four components:
1- Hardware → as CPU, Memory, I/O devices, etc.
2- Operating System → as Linux, Windows, etc.
3- Application programs → as compliers, web browsers, games, etc.
4- Users → as people, machines, etc.
➢ Here’s the view of those 4 components:
4- What’s the kernel and mention its main purpose?
➢ The kernel is the central component of the operating system which runs all
the time on the computer.
➢ Its primary purpose is to control and allocate system resources, manage
memory, and provide a level of security to the system.
➢ It’s responsible for performing basic operations as process management,
scheduling, memory management, file management, and I/O operations.
5- What’s the difference between system programs and application programs?
➢ System programs → are associated with the operating system but not a
part of the kernel as device drivers, compliers, firmware as BIOS, etc.
➢ Application programs → are all other programs that aren’t associated with
the operating system as web browsers, spreadsheets, media players, etc.
6- What’s the purpose of interrupt and how it differs from the trap?

Interrupt Trap
• It’s a signal sent by hardware to • It’s an exception raised by a
the CPU to indicate that a software that’s caused by a
problem has occurred, usually specific instruction in the
sent through the bus system. program.
• The software may trigger an • It may be caused either by an
interrupt by executing a special error occurred or user’s request.
operation called system call.

7- Input/output (I/O) operations can occur asynchronously and independently


of the CPU's current execution context. To handle this, the computer system
uses an interrupt-driven I/O cycle. show how it works?
8- Show the storage-device hierarchy.

9- What’s the bootstrap program and mention its main purpose?


➢ It’s a program that’s loaded into the computer's memory when it is turned
on or restarted.
➢ It’s responsible for initializing hardware and loading the OS kernel into
memory so that the operating system can start running. This process is
called booting or bootstrapping.
10- What’s dual-mode operation and mention its purpose?
➢ It's the ability of a computer system to run in two distinct modes:
1- User mode → the processor can only access a limited set of instructions
and memory locations.
2- Kernel mode → the processor can access all resources and execute all
instructions.
➢ The mode bit distinguishes when the system is running user code or kernel
code. (User mode bit is 1, while the kernel mode bit is 0)
➢ Its purpose is to allow OS to protect itself and other system components.
11- How to guarantee that user doesn’t explicitly set the mode bit to kernel?
➢ To ensure that, modern processors have a hardware mechanism called
"privileged instructions" that can only be executed in kernel mode.
➢ So, attempting to execute these instructions in user mode will result in a
"privileged instruction" exception, which the operating system's kernel can
catch and handle appropriately.
12- Compare between the OS activities according to process, memory, file-
system, and mass-storage management.
Process management Memory management
• Creating and deleting both user • Tracking parts of memory that
and system processes. are currently being used.
• Suspending and resuming • Deciding which processes and
processes. data to move into and out of
• Providing mechanisms for process memory.
synchronization, communication, • Allocating and deallocating
and deadlock handling. memory space as needed.

File-system management Mass-storage management


• Creating and deleting files and • Free-space management and
directories. Storage allocation.
• Mapping files onto secondary • Disk scheduling and Partitioning.
storage. • Mounting, unmounting and
• Backup files onto stable (non- protection.
volatile) storage media.

13- Show the characteristics of various types of storage.


14- What’s the virtualization and mention the relation between it and the OS?
➢ Virtualization is the process of creating a virtual version of something,
allowing the OS to run applications from other OSes.
➢ The relationship between them is closely intertwined, as virtualization is
dependent on the underlying OS to provide the resources needed for the
virtual machine to operate, specifically the hardware abstraction layer.
➢ This layer allows the virtual machine to interact with the physical hardware
of the host system, while also providing services such as memory
management, device drivers, and networking support.
15- What are the advantages of multiprocessing or parallel systems and
mention the relation between them and the OS?
➢ There are several advantages including the following:
1- Increased performance → Tasks are divided into smaller parts that can
be processed simultaneously.
2- Increased scalability → Handling larger workloads by adding more
processors.
3- Lower cost → Providing higher performance at a lower cost compared to
traditional single processor systems.
➢ The OS plays a critical role in managing the communication and
coordination between different processors or nodes in the parallel systems.
This involves managing the communication channels, ensuring data
consistency, and detecting and handling errors or failures in the system.
16- Compare between symmetric and asymmetric multiprocessing.
➢ Asymmetric multiprocessing → Each processor is assigned to a specific
task.
➢ Symmetric multiprocessing → Each processor performs all tasks.
17- When it’s appropriate for an operating system to waste resources and not
making efficient use of hardware?
➢ In Security → When the system needs a higher level of security as in
encryption to protect sensitive data and ensure that unauthorized users
can’t access them.
➢ In Debugging → The OS may need to use additional resources to gather
diagnostic information or trace errors.
18- Distinguish between client-server and peer-to-peer models.

Client-Server Peer-to-Peer
• It’s one powerful server • It consists of nodes that can act
providing services to other as both clients and servers.
computers (clients). • Low cost but hard to manage.
• High cost but easy to manage. • Used in small networks only.
• Used in small and large • The software is installed in every
networks. computer.
• The software is installed only in
the server and shared among
the clients.

19- Distinguish between the several types of cloud computing.


➢ Public cloud → Available via Internet to anyone willing to pay.
➢ Private cloud → Runs by a company for the company’s own use.
➢ Hybrid cloud → Includes both public and private cloud components.
20- What are the cloud computing service models?
➢ They are models describe the level of service provided by a cloud provider:
1- IaaS → Provides infrastructure resources as virtual machines.
2- PaaS → Provides a platform for application development and
deployment.
3- SaaS → Provides software applications over the internet.
21- What are the kernel data structures and mention some of them?
➢ Kernel data structures are data structures used by the OS kernel to manage
and control various aspects of the system, some of them are:
1- Linked Lists → Maintain lists of data structures in the kernel.
2- Queues → Manage requests for system resources.
3- Trees → Represent hierarchical relationships between system resources.
4- Hash Tables → Provide efficient access to data structures by using a
hashing function to map keys to indices in an array.

You might also like