OSY Report

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

A

Micro-Project
On

MACOS OPERATING SYSTEM

Submitted To
MSBTE
In Partial Fulfilment of Requirement of Diploma Of
Computer Engineering
Under I Scheme
Submitted By

Mr. Suyash Satish Kerkar


Mr. Manas Dattaram Desai

Ms. Manasvi Sanjay Parab

Ms. Shejal Angad Chandekar

Under the Guidance Of

Mr. Shridhar Mayekar

FOR ACADEMIC YEAR 2023-2024

YASHWANTRAO BHONSALE INSTITUTE OF TECHNOLOGY,

SAWANTWADI
MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION
CERTIFICATE
This is to certify that,

Mr. Suyash Satish Kerkar Roll No.01

Mr. Manas Dattaram Desai Roll No.04

Ms. Manasvi Sanjay Parab Roll No.09

Ms. Shejal Angad Chandekar Roll No.12

Of Fifth semester of diploma in COMPUTER ENGINEERING of institute


Yashwantrao Bhonsale Institute of Technology (1742) has completed the Micro
Project satisfactorily in subject Operating System (22516) for the academic year
2023 to 2024 as prescribed in the curriculum.

Subject Faculty HOD Principal

Seal of

Institution
INDEX

Sr. Topic Name Page


No. No.
1. Abstract 1

2. Introduction 2

3. Overview Of MacOS 3-4

4. Services And Components Of MacOS 5-7

5. Process Management Of MacOS 8-9

6. CPU Scheduling Algorithm used by MacOS 10

7. Memory And File Management Of MacOS 11-12

8. Conclusion 13

9. Reference 14
1.Abstract:-
This report offers a comprehensive exploration of macOS, dissecting its key
components, services, and operational mechanisms.

Beginning with an overview of macOS, this report delves into its evolution, user
interface, and its seamless integration within the Apple ecosystem. It then examines
file management on macOS, detailing its file system hierarchy, navigation tools, and
data security measures.

This report proceeds to unravel the intricate world of CPU scheduling algorithms,
elucidating how macOS efficiently manages processes to optimize system
performance. It also sheds light on process management, outlining how macOS
handles tasks, multitasking, and inter-process communication.

Memory management is another critical aspect covered, explaining how macOS


manages physical and virtual memory, ensuring efficient resource utilization.

By the end of this report, readers will have gained a deep understanding of macOS,
appreciating its elegance, reliability, and the engineering prowess that underlies its
functionality.

1
2.Introduction:-
An operating system (OS) is a fundamental software component that acts as an
intermediary between computer hardware and user applications. It provides a
cohesive and efficient environment for managing system resources and executing
programs. The primary functions of an operating system include process
management, memory management, file system management, device management,
and user interface provision.

Process management involves the creation, scheduling, and termination of processes,


ensuring efficient utilization of CPU resources. Memory management oversees the
allocation and deallocation of memory to processes, optimizing system performance.
File system management organizes and provides access to data stored on various
storage devices. Device management controls and coordinates communication with
hardware devices, ensuring proper operation.

Modern operating systems support multitasking, allowing multiple processes to run


concurrently, and multiprocessing, leveraging multiple CPU cores. They employ
various scheduling algorithms to determine the order in which processes are
executed, aiming to optimize system responsiveness and throughput.

Security is a critical aspect of operating systems, with features such as user


authentication, access control, and encryption. The operating system acts as a
safeguard, preventing unauthorized access and ensuring data integrity.

User interfaces provide a means for users to interact with the system. Graphical user
interfaces (GUIs) offer visual elements, while command-line interfaces (CLIs) allow
users to input commands directly. Additionally, modern operating systems often
include networking capabilities, facilitating communication and resource sharing
among interconnected devices.

In summary, an operating system is a crucial software layer that facilitates efficient


and secure utilization of computer resources, enabling users to run applications
seamlessly on diverse hardware platforms. It plays a central role in orchestrating the
complexities of modern computing environments.

2
3.Overview of MacOS:-
Evolution of macOS:

macOS, previously known as Mac OS X and OS X, has a rich history dating back to
the original Macintosh System Software in 1984. It underwent a significant
transformation in 2001 when Apple introduced Mac OS X, a Unix-based operating
system. This marked a departure from the classic Mac OS and brought in a more
stable and modern foundation. Over the years, macOS has seen numerous updates and
iterations, each introducing new features, enhancements, and performance
improvements. The most recent versions, as of my last knowledge update in
September 2021, include macOS Big Sur and macOS Monterey, showcasing Apple's
commitment to innovation and user experience.

User Interface:

One of macOS's defining features is its elegant and user-friendly graphical user
interface (GUI). The Aqua interface, introduced in Mac OS X, is characterized by its
distinctive design elements, such as the Dock, Finder, and the menu bar at the top of
the screen. The interface is known for its sleek aesthetics, intuitive navigation, and
attention to detail. It promotes a user-centric approach, making it easy for both novice
and experienced users to interact with their Macs seamlessly.

macOS User Interface Preview

3
Seamless Integration within the Apple Ecosystem:

macOS is designed to work seamlessly with other Apple products and services,
creating a cohesive ecosystem. This integration is exemplified by features like iCloud,
which syncs data across macOS, iOS devices, and even Windows PCs, ensuring a
consistent user experience. The Continuity features enable tasks like Handoff, Air
Drop, and Universal Clipboard, allowing users to transition smoothly between Mac,
iPhone, and iPad. Apple's suite of apps, including Safari, Messages, and Photos, are
optimized for macOS, offering a unified experience across all devices.

In summary, macOS has evolved from its early iterations into a sophisticated and
user-centric operating system. Its user interface is renowned for its elegance and ease
of use, while its seamless integration within the Apple ecosystem enhances
productivity and connectivity for users across their various Apple devices and
services.

Apple Ecosystem

4
4.Services and Components of MacOS:-

macOS Architecture Diagram

Services of macOS:

 Graphical User Interface (GUI): macOS boasts an intuitive GUI with a


distinctive design, featuring elements like the Dock, Finder, and menu bar. The
Aqua interface prioritizes user-friendliness and aesthetics.

 Networking Services: macOS provides robust networking services, supporting


various protocols such as TCP/IP, IPv6, Bonjour, and VPN. This enables
seamless connectivity to the internet and local networks.

5
 Security Services: macOS includes advanced security features, including a
built-in firewall, File Vault encryption, Gatekeeper for app security, and
XProtect for malware protection.

 iCloud Integration: iCloud services enable data synchronization across Apple


devices, such as contacts, calendars, photos, and documents, ensuring
continuity and data accessibility.

 Time Machine: A backup service that allows users to effortlessly back up and
restore their data, ensuring data protection and recovery.

 Spotlight Search: An efficient search service that helps users find files,
applications, emails, and even information on the web quickly.

Components of macOS:
 Kernel: The XNU (X is Not Unix) kernel serves as the core component,
responsible for managing system resources, hardware communication, and
process management.

 File System: macOS uses the HFS+ (or APFS in newer versions) file system,
which organizes and manages data on storage devices efficiently, supporting
features like file versioning, snapshots, and encryption.

 Finder: The graphical file management tool that allows users to browse,
organize, and interact with files and folders on the system.

6
 Dock: The Dock is a central component of the GUI, providing quick access to
frequently used applications, files, and folders, and also houses minimized
application windows.

 Terminal: A command-line interface (CLI) for advanced users and developers


to execute commands and scripts.

 System Preferences: The control center where users can customize system
settings, including network configurations, display preferences, security
settings, and more.

 Core Services: These include essential background processes and services that
manage tasks like software updates, system maintenance, and hardware
communication.

 Frameworks: macOS includes various development frameworks such as Cocoa


and Carbon, allowing developers to create applications tailored for the
platform.

7
5.Process Management:-
Processes and Threads in macOS:
 In macOS, a process is an independent program that has its own memory space,
resources, and execution context.
 Each process can have one or more threads, where a thread is the smallest unit
of execution within a process.
 macOS uses a thread model called POSIX threads (Pthreads) for managing
threads. Threads within the same process share memory space, which allows
for efficient communication.

Process Creation and Termination:


 Processes in macOS can be created using the fork() system call, which creates
a new process that is a copy of the parent process. The new process can then be
replaced with a different program using exec() or its variants.
 Termination of processes can occur voluntarily when a program exits or due to
external signals like SIGTERM or SIGKILL. Processes can also be
terminated by the user or system administrator.

Inter-process Communication (IPC) Mechanisms:


 macOS provides various IPC mechanisms to facilitate communication between
processes and threads:
 Mach IPC: macOS is built on the Mach microkernel, which includes a
robust IPC mechanism. Mach messages allow processes to send data and
instructions to each other.
 Unix Pipes: These allow for simple unidirectional communication
between processes using the command line or within scripts.
 Shared Memory: Processes can share memory segments, enabling
efficient data sharing.
 Sockets: Inter-process communication can also occur over network
sockets, which enables communication between processes running on
different machines.

8
 Message Passing: Higher-level frameworks like Apple's XPC (Cross
Process Communication) facilitate secure and efficient communication
between processes in a structured way.

Process Management Tools:


 Activity Monitor: This is a graphical tool that provides a detailed overview of
all processes and system resource usage. You can monitor CPU, memory,
energy, disk, and network usage for each process.
 Terminal: The Terminal application allows users to interact with the command
line interface. Commands like ps, top, and kill can be used to list processes,
monitor system activity, and terminate processes, respectively.
 Xcode: Apple's integrated development environment (IDE), Xcode, includes a
wide range of debugging and profiling tools for process management.
Developers can analyse thread activity, memory usage, and performance
bottlenecks.

9
6.CPU Scheduling Algorithm: -
Round-Robin Scheduling Algorithm:

 Overview: Round-robin is a simple and widely used CPU scheduling


algorithm in macOS. It's designed to provide fair and equal access to CPU
time for all processes in a multi-user or multitasking environment.

 Time Sharing: The key idea behind round-robin is time-sharing. Each


process in the ready queue is given a fixed time quantum or time slice during
which it can execute on the CPU. Once a process's time quantum expires, it's
moved to the back of the queue, and the next process in line gets a chance to
run.

 FIFO Queue: Processes in the ready state are placed in a circular FIFO (First-
In-First-Out) queue. This circular queue ensures that each process gets a turn
in a cyclical fashion.

 Fairness: Round-robin ensures fairness by providing an approximately equal


share of CPU time to each process, regardless of its priority or resource
requirements. Lower-priority processes will get their turn as long as they are
in the ready queue.

 Pre-emption: Round-robin involves pre-emption, meaning that if a process


doesn't voluntarily release the CPU before its time quantum expires (e.g., due
to I/O request), the scheduler forcefully switches to the next process.

 Advantages:
 Fairness: All processes get a chance to run, preventing any single
process from hogging the CPU.
 Simplicity: It's easy to implement and understand.
 Predictability: Since each process is given a fixed time slice, response
times are predictable.

 Drawbacks:
 Inefficient for tasks with varying execution times: If some tasks are
short and others are long, the scheduler may spend unnecessary time
switching between tasks.

10
7.Memory and File Management:-

Memory Management in macOS:

1. Virtual Memory Management:


 macOS employs virtual memory to abstract physical memory resources
from processes and provide a consistent memory address space.
 Explain the concept of virtual memory and its advantages, such as
allowing processes to use more memory than physically available.

2. Memory Protection and Address Space Layout:


 Describe how macOS enforces memory protection by isolating the
memory space of different processes, preventing unauthorized access.
 Discuss the address space layout, including the separation of user-space
and kernel-space memory.

3. Page Management and Swapping:


 Detail how macOS uses paging to manage memory efficiently. Pages are
small fixed-size blocks of memory.
 Explain the process of page swapping, where pages are moved between
RAM and disk storage to free up physical memory for other tasks.

4. Memory Allocation and Deallocation:


 Discuss memory allocation functions like malloc and free and their role
in managing dynamic memory allocation in C/C++.
 Mention how Objective-C and Swift handle memory allocation and
deallocation through reference counting and automatic memory
management.

5. Memory Management Tools:


 Introduce memory management tools available in macOS, such as the
Instruments tool, which helps developers analyse memory usage, detect
leaks, and optimize memory usage in applications.

11
File Management in macOS:

1. File System Overview:


 Explain the file systems supported by macOS, including HFS+
(deprecated) and APFS (Apple File System).
 Discuss the benefits of APFS, such as enhanced data integrity, improved
snapshot support, and space-saving features.

2. Finder and User Interface:


 Describe the Finder, macOS's default file management tool, and its role
in file navigation, organization, and operations (copying, moving,
deleting).
 Explain the Dock and how it provides quick access to commonly used
files and applications.

3. Time Machine Backup System:


 Discuss Time Machine, macOS's built-in backup solution that allows
users to automatically back up their data to an external storage device or
network location.
 Highlight the benefits of Time Machine, such as easy file recovery and
system restore.

4. File Permissions and Security:


 Explain how macOS manages file permissions and access control
through POSIX permissions.
 Discuss macOS's security features related to file management, including
Gatekeeper, which prevents the execution of unsigned or suspicious
applications.

5. Spotlight Search:
 Mention Spotlight, macOS's powerful search feature, which can quickly
locate files, applications, and content across the entire system.
 Explain how Spotlight indexing works and its role in improving file
search efficiency.

6. File Sharing and Cloud Integration:

12
 Briefly touch on macOS's file sharing capabilities, allowing users to
share files and folders with others on a network.

8.Conclusion:-
macOS stands as a robust and user-friendly operating system renowned for its elegant
user interface, efficient memory management, and effective file handling capabilities.
Its advanced memory management techniques, including virtual memory and memory
protection, ensure system stability and security. Additionally, macOS's file
management, led by the Finder and Time Machine, simplifies data organization and
backup. The CPU scheduling algorithm maintains system responsiveness and fair
resource allocation. Overall, macOS continues to evolve, integrating innovative
features and enhanced security measures, securing its place as a preferred choice for
both creative professionals and everyday users in the world of computing.

13
9.References:-

 https://www.os-book.com/

 https://www.kernel.org/doc/html/latest/

 https://docs.freebsd.org/en/books/handbook/

 http://web.stanford.edu/class/cs140/projects/pintos/pintos_2.html

 https://developer.apple.com/documentation/

 https://www.apple.com/macos/sonoma/

Books that we referred:

14

You might also like