A. Sistem Operasi dan kernel eye
os
eyeOS adalah sebuah sistem operasi desktop open source yang
berbasis web, dimana Anda dapat mengakses sistem operasi tersebut melalui
jaringan seperti LAN atau Internet dari web browser seperti Firefox, Chrome dan
lain sebagainya. Meskipun orientasi penyebarannya melaui web, dalam banyak hal,
eyeOS merupakan sistem operasi desktop yang memiliki fitur yang cukup lengkap.
Berbagai aplikasi seperti kalender, RSS Reader, email client, word processor,
spreadsheet, manajer kontak sudah menjadi aplikasi default yang terpasang dalam
sistemnya. Ini adalah sistem dengan konsep cloud
computing yang bertujuan untuk
memungkinkan kolaborasi dan komunikasi di antara pengguna, atau bisa juga
sebagai perlindungan pribadi Anda ketika Anda terjebak menggunakan komputer
orang lain. Secara garis besar eyeOS merupakan terobosan hebat dalam dunia
sistem operasi dekstop, karena memberi warna yang unik dengan menghadirkan
konsep cloud computing.
Kernel
eyeOS
|
<?php
|
|
|
/*
|
|
|
* eyeos - The Open Source
Cloud's Web Desktop
|
|
|
* Version 2.0
|
|
|
* Copyright (C) 2007 - 2010
eyeos Team
|
|
|
*
|
|
|
* This program is free software; you can
redistribute it and/or modify it under
|
|
|
* the terms of the GNU Affero General Public
License version 3 as published by the
|
|
|
* Free Software Foundation.
|
|
|
*
|
|
|
* This program is distributed in the hope
that it will be useful, but WITHOUT
|
|
|
* ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
for more
|
|
|
* details.
|
|
|
*
|
|
|
* You should have received a copy of the GNU
Affero General Public License
|
|
|
* version 3 along with this program in the
file "LICENSE". If not, see
|
|
|
*
<http://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
|
*
|
|
|
* See www.eyeos.org for more details. All
requests should be sent to licensing@eyeos.org
|
|
|
*
|
|
|
* The interactive user interfaces in
modified source and object code versions
|
|
|
* of this program must display Appropriate
Legal Notices, as required under
|
|
|
* Section 5 of the GNU Affero General Public
License version 3.
|
|
|
*
|
|
|
* In accordance with Section 7(b) of the GNU
Affero General Public License version 3,
|
|
|
* these Appropriate Legal Notices must
retain the display of the "Powered by
|
|
|
* eyeos" logo and retain the original
copyright notice. If the display of the
|
|
|
* logo is not reasonably feasible for
technical reasons, the Appropriate Legal Notices
|
|
|
* must display the words "Powered by
eyeos" and retain the original copyright notice.
|
|
|
*/
|
|
|
/**
|
|
|
*
|
|
|
* @package kernel
|
|
|
*/
|
|
|
abstract
class
Kernel
{
|
|
|
private static $Instances = array();
|
|
|
private static $systemDepth = 0;
|
|
|
|
|
|
|
|
|
protected function __construct() {}
|
|
|
|
|
|
public static function getInstance($class)
{
|
|
|
if (!isset(self::$Instances[$class])) {
|
|
|
$object
=
new
$class;
|
|
|
self::$Instances[$class] = $object;
|
|
|
}
|
|
|
return self::$Instances[$class];
|
|
|
}
|
|
|
|
|
|
final protected function __clone() {}
|
|
|
|
|
|
final public static function inSystemMode() {
|
|
|
return (self::$systemDepth > 0);
|
|
|
}
|
|
|
|
|
|
final public static function enterSystemMode() {
|
|
|
++self::$systemDepth;
|
|
|
}
|
|
|
|
|
|
final public static function exitSystemMode() {
|
|
|
if (self::$systemDepth > 0) {
|
|
|
--self::$systemDepth;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
?>
|
Sistem Operasi dan kernel OSV
OSV
diumumkan selama acara Linux Cloud Open
di New Orleans . OSV adalah sebuah sistem operasi baru yang
dirancang untuk Cloud Komputing
. OSV adalah BSD berlisensi dan dirancang untuk kinerja maksimum
aplikasi tunggal yang berjalan di atas hypervisor .
OSV
ditulis dalam C ++ dan dirancang untuk
berjalan pada KVM , contoh EC2 Xen , dan Amazon sementara belum mendukung untuk
VMware atau arsitektur non- x86 . OSV berusaha untuk kinerja yang
unggul , memulai dari nol
manajemen OS , kerangka Java umum , sebuah JVM dioptimalkan , dan beban kerja
cloud umum lainnya . Meskipun tidak didukung oleh kernel Linux , OSV
dikatakan kompatibel dengan program Linux yang ada.
Bagi
mereka yang ingin menyelam lebih dalam ke - satunya sistem baru ini beroperasi,
kode ini pada GitHub ( dan ada juga sampel gambar QCOW2 ) , dan banyak
informasi lebih lanjut dapat ditemukan di OSV.io. Slide presentasi
dari pengumuman CloudOpen dapat ditemukan di Google Docs .
Kernel OSV
|
*
Copyright (C) 2014 Cloudius Systems, Ltd.
|
|
|
*
|
|
|
*
This work is open source software, licensed under the terms of the
|
|
|
* BSD
license as described in the LICENSE file in the top-level directory.
|
|
|
*/
|
|
|
|
|
|
#ifndef _OSV_APP_HH
|
|
|
#define _OSV_APP_HH
|
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
#ifdef _KERNEL
|
|
|
|
|
|
#include <memory>
|
|
|
#include <vector>
|
|
|
#include <osv/sched.hh>
|
|
|
#include <pthread.h>
|
|
|
#include <osv/mutex.h>
|
|
|
#include <osv/elf.hh>
|
|
|
#include <list>
|
|
|
#include <unordered_map>
|
|
|
#include <string>
|
|
|
|
|
|
extern
"C" void __libc_start_main(int(*)(int, char**), int, char**, void(*)(),
|
|
|
void(*)(), void(*)(), void*);
|
|
|
|
|
|
namespace
osv
{
|
|
|
|
|
|
class
application;
|
|
|
using
shared_app_t = std::shared_ptr<application>;
|
|
|
|
|
|
extern
__thread application* override_current_app;
|
|
|
|
|
|
class
launch_error : public std::runtime_error
|
|
|
{
|
|
|
public:
|
|
|
launch_error(std::string
msg) : std::runtime_error(msg) {}
|
|
|
};
|
|
|
|
|
|
class
multiple_join_error : public std::runtime_error
|
|
|
{
|
|
|
public:
|
|
|
multiple_join_error()
: std::runtime_error("Join was
called more than once") {}
|
|
|
};
|
|
|
|
|
|
class
app_registry {
|
|
|
public:
|
|
|
void join();
|
|
|
void push(shared_app_t app);
|
|
|
bool remove(application* app);
|
|
|
private:
|
|
|
std::list<shared_app_t> apps;
|
|
|
mutex lock;
|
|
|
};
|
|
|
|
|
|
struct
application_runtime {
|
|
|
application_runtime(application&
app) : app(app) { }
|
|
|
~application_runtime();
|
|
|
|
|
|
application& app;
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
*
Represents an executing program.
|
|
|
*
|
|
|
*/
|
|
|
class
application : public std::enable_shared_from_this<application> {
|
|
|
public:
|
|
|
/**
|
|
|
*
Returns application of the current thread.
|
|
|
*/
|
|
|
static shared_app_t get_current();
|
|
|
|
|
|
/**
|
|
|
*
Start a new application.
|
|
|
*
args[0] should specify the command to run.
|
|
|
*
|
|
|
*
\param args Arguments passed to the program's main() function.
|
|
|
*
\throw launch_error
|
|
|
*/
|
|
|
static shared_app_t run(const
std::vector<std::string>& args);
|
|
|
|
|
|
/**
|
|
|
*
Start a new application.
|
|
|
*
|
|
|
*
\param command command to execute
|
|
|
*
\param args Parameters which will be passed to program's main().
|
|
|
*
\param new_program true if a new elf namespace must be started
|
|
|
*
\param env pointer to an unordered_map than will be merged in current env
|
|
|
*
\throw launch_error
|
|
|
*/
|
|
|
static shared_app_t run(const std::string&
command,
|
|
|
const
std::vector<std::string>& args,
|
|
|
bool
new_program = false,
|
|
|
const
std::unordered_map<std::string, std::string> *env = nullptr);
|
|
|
|
|
|
static void join_all() {
|
|
|
apps.join();
|
|
|
}
|
|
|
|
|
|
application(const std::string&
command,
|
|
|
const
std::vector<std::string>& args,
|
|
|
bool
new_program = false,
|
|
|
const
std::unordered_map<std::string, std::string> *env = nullptr);
|
|
|
|
|
|
~application();
|
|
|
|
|
|
/**
|
|
|
*
Waits until application terminates.
|
|
|
*
|
|
|
*
@return application's exit code.
|
|
|
*/
|
|
|
int join();
|
|
|
|
|
|
/**
|
|
|
*
Installs a termination callback which will be called when
|
|
|
*
termination is requested or immediately if termination was
|
|
|
*
already requested.
|
|
|
*
|
|
|
*
The callback is called in application's context.
|
|
|
*/
|
|
|
static void on_termination_request(std::function<void()> callback);
|
|
|
|
|
|
/**
|
|
|
*
Will call termination request callbacks. Can be called many times but
|
|
|
*
only the first call has any effect.
|
|
|
*
|
|
|
*
Can be called from a thread which is not this application's thread.
|
|
|
*/
|
|
|
void request_termination();
|
|
|
|
|
|
/**
|
|
|
*
"stop" all threads attached to this application except this one,
and
|
|
|
*
remove them from this application's context. Running threads are not
|
|
|
*
touched (if there is one, false is returned), and other threads are
|
|
|
*
moved to a state that will never run again. This operation is slow and
|
|
|
*
generally unsafe because the stopped threads could be holding resources
|
|
|
*
such as internal OSv mutexes, which will never be released.
|
|
|
*
Only call this method if you are sure that the remaining threads
|
|
|
*
are not in the middle of I/O, memory allocation, or anything else which
|
|
|
*
might be holding critical OSv resources.
|
|
|
*/
|
|
|
static bool unsafe_stop_and_abandon_other_threads();
|
|
|
|
|
|
/**
|
|
|
*
Returns application's return code. May only be called after join() returns.
|
|
|
*/
|
|
|
int get_return_code();
|
|
|
|
|
|
/**
|
|
|
*
Returns the invoked program executable of this application.
|
|
|
*/
|
|
|
std::string get_command();
|
|
|
|
|
|
std::shared_ptr<application_runtime> runtime() const { return _runtime; }
|
|
|
std::shared_ptr<elf::object> lib() const { return _lib; }
|
|
|
|
|
|
elf::program *program();
|
|
|
private:
|
|
|
void new_program();
|
|
|
void clone_osv_environ();
|
|
|
void set_environ(const std::string
&key, const std::string &value,
|
|
|
bool new_program);
|
|
|
void merge_in_environ(bool new_program = false,
|
|
|
const
std::unordered_map<std::string, std::string> *env = nullptr);
|
|
|
shared_app_t get_shared() {
|
|
|
return
shared_from_this();
|
|
|
}
|
|
|
void start();
|
|
|
void main();
|
|
|
void run_main(std::string path, int argc, char** argv);
|
|
|
void run_main();
|
|
|
friend void ::__libc_start_main(int(*)(int, char**), int, char**,
void(*)(),
|
|
|
void(*)(), void(*)(), void*);
|
|
|
|
|
|
private:
|
|
|
using main_func_t = int(int, char**);
|
|
|
|
|
|
pthread_t _thread;
|
|
|
std::unique_ptr<elf::program> _program; // namespace program
|
|
|
std::vector<std::string> _args;
|
|
|
std::string _command;
|
|
|
int _return_code;
|
|
|
bool
_termination_requested;
|
|
|
mutex _termination_mutex;
|
|
|
std::shared_ptr<elf::object> _lib;
|
|
|
std::shared_ptr<elf::object> _libenviron;
|
|
|
main_func_t* _main;
|
|
|
void (*_entry_point)();
|
|
|
static app_registry apps;
|
|
|
|
|
|
// Must be destroyed before _lib, because contained function
objects may
|
|
|
// have destructors which are part of the application's code.
|
|
|
std::list<std::function<void()>> _termination_request_callbacks;
|
|
|
|
|
|
std::shared_ptr<application_runtime> _runtime;
|
|
|
sched::thread* _joiner;
|
|
|
std::atomic<bool> _terminated;
|
|
|
friend struct application_runtime;
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif /* _KERNEL */
|
|
|
|
|
|
namespace
osv
{
|
|
|
/**
|
|
|
*
Creates a new app
|
|
|
*
args Arguments passed to the program's main() function.
|
|
|
*/
|
|
|
void
run(const
std::vector<std::string>& args);
|
|
|
|
|
|
namespace
this_application {
|
|
|
|
|
|
void
on_termination_request(std::function<void()> callback);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#endif
|
B. Sistem OS Virtual bekerja
dalam JVM
Program Java yang telah
dikompilasi adalah platform-neutral bytecodes yang dieksekusi oleh Java Virtual
Machine(JVM). JVM sendiri terdiri dari:
class loader, class
verification, runtime interpreter, Just In-Time(JIT) untuk meningkatkan kinerja
kompilator. Bahasa mesin terdiri dari sekumpulan instruksi yang sangat
sederhana dan dapat dijalankan secara langsung oleh CPU dari suatu komputer.
Sebuah program yang dibuat dengan bahasa tingkat tinggi tidak dapat dijalankan
secara langsung pada komputer. Untuk dapat dijalankan, program tersebut harus
ditranslasikan kedalam bahasa mesin. Proses translasi dilakukan oleh sebuah
program yang disebut compiler.
Setelah proses translasi
selesai, program bahasa-mesin tersebut dapat dijalankan, tetapi hanya dapat
dijalankan pada satu jenis komputer. Hal ini disebabkan oleh setiap jenis
komputer memiliki bahasa mesin yang berbeda-beda. Alternatif lain untuk
mengkompilasi program bahasa tingkat tinggi selain menggunakan compiler, yaitu
menggunakan interpreter.
Perbedaan antara compiler
dan interpreter adalah compiler mentranslasi program secara keseluruhan
sekaligus, sedangkan interpreter menstranslasi program secara instruksi per
instruksi. Java dibuat dengan mengkombinasikan antara compiler dan interpreter.
Program yang ditulis dengan
java di- compile menjadi bahasa mesin. Tetapi bahasa mesin untuk komputer
tersebut tidak benar-benar ada. Oleh karena itu disebut “Virtual” komputer,
yang dikenal dengan Java Virtual Machine (JVM). Bahasa mesin untuk JVM disebut
Java bytecode. Salah satu keunggulan dari Java adalah dapat digunakan atau
dijalankan pada semua jenis komputer. Untuk menjalankan program Java, komputer
membutuhkan sebuah interpreter untuk Java bytecode.
Interpreter berfungsi untuk
mensimulasikan JVM sama seperti virtual
Computer mensimulasikan PC komputer. Java bytecode yang dihasilkan oleh
setiap jenis komputer berbeda-beda, sehingga diperlukan interpreter yang
berbeda pula untuk setiap jenis komputer. Tetapi program Java bytecode yang
sama dapat dijalankan pada semua jenis komputer yang memiliki Java bytecode.
C. Paket Aplikasi yang didukung eyeOS
1. eyeDocs Untuk pembuatan
dokumen eyeOS menyediakan Word Processor yang mampu untuk men-support file
bertipe *.odt dan *.doc. Selain itu kita juga bisa membuat dokumen excel dan
powerpoint.
2.eyeExplorer eyeOS juga
memiliki eyeExplorer yang memiliki fungsi mirip dengan Windows Explorer yang
ada di Wimdows.
3.eyeCalc Jika di Sistem
Operasi berbasis Windows terdapat kalkulator maka di eyeOS juga terdapat
kalkulator yang berbasis flash.
4.eyeSnow Untuk menikmati
efek salju pada desktop anda bisa dengan menginstall aplikasi eyeSnow.
5.eyeNav eyeNave berfungsi
sebagai browser-nya eyeOS seperti firefox atau opera. 6.eyeProcess seperti task
manager-nya windows.
7.eyeFiles berfungsi untuk memanage file-file dari user.
eyeFiles menyediakan fitur-fitur seperti upload file, download,create folder,
copy, paste serta properties untuk
melihat property folder.
8.eyeControl untuk mengganti
wallpaper dan manajemen user yang kita miliki.
9.eyeTrash tempat sampahnya
eyeOS atau lebih kurang sama dengan Recycle Bin di Windows
EyeOS menyediakan aplikasi-aplikasi yang hampir sama
seperti sistem operasi yang biasa pakai.
Aplikasi untuk office (word processor,
spreadsheet, presentation, calendar, dan contact manager), games (chess dan
tetravex), network (web browser, FTP client, public board, internal messaging,
dan RSS reader ) dan entertainment (video player dan mp3 player) semua aplikasi
itu telah disediakan oleh eyeOS. eyeOS dianggap sebagai operating system berbasis web dengan interface browser,
instalasi dan kegunaannya sangat mudah.
Paket Aplikasi yang didukung
OSV
Kami telah menunjukkan bahwa
dalam banyak hal OSv merupakan Sistem operasi yang cocok untuk mesin virtual
dalam "clouds" daripada sistem operasi tradisional seperti Linux. OSv
memiliki tolak ukur performa yang lebih baik dari Linux ,itu seperti membuat
gambar kecil, dimana memiliki waktu boot yang hampir tak terlihat. OSv adalah
proyek muda, dan kami percaya bahwa dengan Pekerjaan lanjutan kami ini dapat
lebih meningkatkan kinerjanya. Sementara OSv meningkatkan kinerja aplikasi yang
ada, beberapa perbaikan yang paling dramatis kita lihat berasal dari penambahan
non-POSIX API untuk OSv. Sebagai contoh, Shrinker API memungkinkan aplikasi
OSv-aware untuk membuat lebih baik menggunakan memori yang tersedia, dan
packet-filtering API mengurangi overhead standar socket API. Kami berencana
untuk terus mengeksplorasi baru interface untuk menambah OSv untuk lebih
meningkatkan aplikasi kinerja. Area eksplorasi akan mencakup jaringan API dan
penjadwalan koperasi. Alih-alih untuk memodifikasi berbagai aplikasi individu,
suatu arah yang menjanjikan masa depan adalah untuk mengubah lingkungan yang
berjalan dengan waktu, seperti JVM, di mana telah menjalankan banyak aplikasi.
Hal ini akan memungkinkan kita untuk menjalankan aplikasi yang tidak
dimodifikasi, selagi masih mendapatkan manfaat dari API OSv baru. Kami
disajikan JVM balon sebagai contoh dari arah ini. Akhirnya, kami berharap bahwa
ketersediaan OSv, dengan Kode modern yang kecil dan kegunaan yang luas (tidak
terbatas bahasa tertentu, hypervisors atau aplikasi) akan mendorong penelitian lebih lanjut tentang sistem
operasi untuk VMs.
D.Kelebihan Dan Kekurangan eyeOS
Kelebihan
1.
Tidak memerlukan
instalasi
2.
Penggunaan yang mudah
3.
Tempat penyimpanan
yang terpadu
4.
Penambahan aplikasi
dapat kita buat sendiri
Kekurangan
1.
Keamanan data yang
bersifat privasi menjadi sulit untuk dilindungi
2.
Aplikasi office yang
sederhana.
Kelebihan
Dan Kekurangan OSV
Kelebihan
1.
Tempat penyimpanan
yang terpadu
2.
Penambahan aplikasi
dapat kita buat sendiri
Kekurangan
1.
Keamanan data yang
bersifat privasi menjadi sulit untuk dilindungi
2.
Instalasi rumit